📄 qq_gl.asp
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<title>用户管理</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<!--#include file="qq_wjt.asp"-->
<%page =int(Request.QueryString("page"))
id=request.querystring("id")
jb=request.querystring("jb")
cz=request.querystring("cz")
if session("qqyhm") = "" or session("qqjb") <> "admin" then response.Redirect("qq_dl.asp")
if id<>"" and cz="sp" then
exec="update admin set jb='admin' where id="+id
conn.execute exec
conn.close
response.redirect "qq_gl.asp?page="+cstr(page)
end if
if id<>"" and cz="hf" then
exec="update admin set pass='乜乜乜乜乜乜' where id="+id
conn.execute exec
conn.close
response.redirect "qq_gl.asp?page="+cstr(page)
end if
if id<>"" and cz="sc" then
fid = left(id,len(id)-1)
fid = replace(fid,","," or id = ")
fid = " where id=" + fid
if instr(id,",")=0 then fid="where id = "+id
exec="delete from admin "+fid
conn.execute exec
response.redirect "qq_gl.asp?page="+cstr(page)
response.write exec+"<br>"
end if
set rs=server.createobject("adodb.recordset")
exec="select * from admin order by id desc"
rs.open exec,conn,1,1
rs.PageSize =30
If page < 1 Then page = 1
If page > rs.PageCount Then page = rs.PageCount
if not rs.eof then rs.AbsolutePage =page%>
<table width="96%" border="0" cellpadding="1" cellspacing="1" align="center">
<tr height="25" bgcolor="#CCD8E6">
<Td align="center" width="10%">序号</Td>
<td align="center">用户名</td>
<td align="center">昵称</td>
<td align="center">性别</td>
<td align="center" width="10%">密码</td>
<td align="center">级别</td>
<td align="center" width="18%">处理</td>
</tr>
<%For j = 1 To rs.PageSize
If rs.EOF Then Exit For
if rs("jb")="1" or isnull(rs("jb")) then
jb="普通"
else
jb="管理员"
end if
pass = rs("pass")
if isnull(pass) then pass = ""
xb = rs("xb")
if isnull(xb) then xb = "男"%>
<tr height="25" bgcolor="#E3E9F1">
<td align="center">
<input type="checkbox" name="fid" value="<%=rs("id")%>">
<%=rs.pagesize*(page-1)+cstr(j)%></td>
<td align="center"><%=rs("yhm")%></td>
<td align="center"><%=rs("nc")%></td>
<td align="center"><%=xb%></td>
<td align="center"><input type="password" size="8" name="pass<%=i%>" value="<%=setpwd(pass)%>"></td>
<td align="center"><%=jb%></td>
<td align="center">
<%if jb <> "管理员" then%>
<a href="qq_gl.asp?id=<%=rs("id")%>&cz=sp&page=<%=cstr(page)%>" onClick="javascript:return confirm('如确认<%=rs("nc")%>将拥有超级权限?')"><font color="#FF0000">管理权限</font></a>
<%end if%>
<a href="qq_gl.asp?id=<%=rs("id")%>&cz=hf&page=<%=cstr(page)%>" onClick="javascript:return confirm('如确恢复<%=rs("nc")%>密码?')"><font color="#FF0000">恢复密码</font></a>
</td>
</tr>
<%rs.movenext
next%>
</table>
<center>
共注册<font color="#FF0000"><%=rs.recordcount%></font>人
<input type="checkbox" name="qx" onClick="javascript:selectall();">全选
<a href=# onClick="javascript:if(confirm('确定批量删除吗?')) window.location='qq_gl.asp?cz=sc&page=<%=cstr(page)%>&id='+pltj();"><font color="#FF0000">批 量 删 除</font></a>
<hr size="0" color="#CCD8E6" width="778">
第
<%for i=1 to rs.PageCount%>
<a href="qq_gl.asp?lx=<%=lx%>&page=<%=i%>">
<%if i=page then
response.write i
else
response.write "["+cstr(i)+"]"
end if%>
</a>
<%next%>
页
</p>
</center>
<%rs.close
conn.close
set conn=nothing%>
</body>
</html>
<script language="javascript">
var dd="";
function pltj()
{
var list="";
for(var i=0;i<document.all.length;i++){
if (document.all[i].type=="checkbox"&&document.all[i].name!="qx"){
if (document.all[i].checked && i<document.all.length){
list += document.all[i].value + ",";
}
}
}
return list;
}
function selectall()
{
if (dd==""){
for(var i=0;i<document.all.length;i++){
if (document.all[i].type=="checkbox")
document.all[i].checked = true;
}
dd="1";
}
else{
for(var i=0;i<document.all.length;i++){
if (document.all[i].type=="checkbox")
document.all[i].checked = false;
}
dd="";
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -