加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
manuser.php 2.06 KB
一键复制 编辑 原始数据 按行查看 历史
rexskz 提交于 2014-08-12 16:19 . .
<?php
if (!defined("IN_SCRS")) exit();
?>
<script src="js/conf.js"></script>
<script>
function releaseConfirm(id){
var xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","releaseConfirm.php?id="+id,true);
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&xmlhttp.status==200)alert("成功!开放了 "+parseInt(xmlhttp.responseText)+" 个队伍的评分权限。");}
xmlhttp.send("");
}
</script>
<div id="content">
<input class="button back" type="button" value="返回" onclick="window.location='?'" />
<input class="button" type="button" value="添加新用户" onclick="window.location='?action=adduser'" />
<h3>用户列表</h3>
<form action="?action=deluser" method="post">
<table>
<tr><!--<th>#</th>--><th style="width:55px;min-width:55px">操作</th><th>用户名</th><th>用户类型</th><th>管理员</th><th>性别</th><th>真实姓名</th><th>手机</th><th>备注</th><th>重获打分权限</th></tr>
<?php
$user_list = $user->get_all_users();
foreach ($user_list as $e) {
$role = get_role_by_id($e['role_id']);
echo "<tr>";
//echo "<td><input type='checkbox' name='chk[]' value='" . $e['topic_id'] . "' /></td>";
echo "<td class='click warning' onclick=\"conf('?action=do_deluser&id=" . $e['user_id'] . "','确定要删除这条记录吗?')\">删除</td>";
echo "<td class='click' onclick=\"window.location.href='?action=edituser&id=" . $e['user_id'] . "'\">" . $e['username'] . "</td>";
echo "<td>" . $role['rolename'] . "</td>";
// 可以删除管理员 还是 只能删除普通用户?
echo "<td>" . (($e['isadmin'] == 1) ? "是" : "") . "</td>";
echo "<td>" . (($e['sex'] == 0) ? "男" : "女") . "</td>";
echo "<td>" . $e['realname'] . "</td>";
echo "<td>" . $e['phone'] . "</td>";
echo "<td>" . $e['comment'] . "</td>";
echo "<td class='click' style=\"color:green;font-weight:bold\" onclick=\"releaseConfirm(" . $e['user_id'] . ")\">√</td>";
echo "</tr>";
}
?>
</table>
<!--<input class="button delete" type="submit" value="批量删除" />-->
</form>
</div>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化