?? 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 + -