📄 admin_list.asp
字号:
<!--#include file="mdb.asp"-->
<%Admin="adminSee"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<%
'****************************************************
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录,或者超时了!请重新登录');this.top.location.href='admin.asp';</script>")
response.end
end if
%>
<HTML>
<HEAD>
<TITLE>管理中心—管理员管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=StyleSheet>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
</HEAD>
<body onkeydown=return(!(event.keyCode==78&&event.ctrlKey)) >
<script language="javascript">
function hxStudio() {
for (var i=0;i<document.hxStudioH.hxStudioID.length;i++) {
var e=document.hxStudioH.hxStudioID[i];
e.checked=!e.checked;
}
}
</script>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<tr class=Hxcmsss>
<td colspan="5"><b>会员管理-> <%
if request("dj")="0" then response.write "待认证管理员"
if request("dj")="1" then response.write "栏目管理员"
if request("k")<>"" then response.write "所有用户-> 搜索结果("&request("k")&")"
if request("dj")<>"0" and request("dj")<>"1" and request("dj")<>"2" and request("k")="" then response.write "所有用户"%></b>
①:待认证管理员 ②:栏目管理员</td>
</tr>
</table>
<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
MaxPerPage=20 '###每页显示条数
set rs=server.CreateObject("ADODB.RecordSet")
if request("k")<>"" then
kkk=" and admin_name like '%"&request("k")&"%'"
end if
if request("dj")<>"" then
sql="select * from admin where dj="&request("dj")&" and dj<>4"&kkk&" order by admin_id desc"
else
sql="select * from admin where dj<>4"&kkk&" order by admin_id desc"
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>还没找到任何用户</p>"
else
totalPut=rs.recordcount
rs.move (currentPage-1)*MaxPerPage
rs.pagesize=MaxPerPage '得到每页数
mpage=rs.pagecount '得到总页数
%>
</table>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<form action="admin_save.asp?dj=<%=request("dj")%>&page=<%=currentPage%>&k=<%=request("k")%>" method=post name="hxStudioH">
<tr class=Hxcmsds>
<td width="100%" colspan="5"><%call page()%></td>
</tr>
<tr align="center" class=Hxcmsqs>
<td width="10%">ID</td>
<td width="10%"><a href="javascript:hxStudio()">选择</a></td>
<td>管理员名称</td>
<td width="15%">管理员级别</td>
<td width="15%">状态</td>
</tr>
<%
i=0
do while not rs.EOF%>
<tr align="center" class=Hxcmsds>
<td width="10%"><%=rs("admin_id")%></td>
<td width="10%"><input type="checkbox" name="hxStudioID" value="<%=rs("admin_id")%>"></td>
<td><a href="admin_edit.asp?admin_id=<%=rs("admin_id")%>"><%=rs("admin_name")%></td>
<td width="15%"><%
if rs("dj")=0 then response.write "<font color=""#808080"">待认证管理员</font>"
if rs("dj")=1 then response.write "<font color=""#0000FF"">栏目管理员</font>"
%></td>
<td width="15%"><%if rs("lock")=1 then%><font color=#FF0000>已锁定</font><%else%>正常<%end if%></td>
</tr>
<%i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop %>
<tr align="center" class=Hxcmsqs>
<td width="10%">ID</td>
<td width="10%"><a href="javascript:hxStudio()">选择</a></td>
<td>管理员名称</td>
<td width="15%">管理员级别</td>
<td width="15%">状态</td>
</tr>
<tr class=Hxcmsqs>
<td width="100%" colspan="9"><input onClick="{if(confirm('确定删除选定用户吗!?')){this.document.hxStudioH.submit();return true;}return false;}" type="submit" value="删除" name="hxStudioDo">
| <input onClick="{if(confirm('确定锁定选定用户吗!?')){this.document.hxStudioH.submit();return true;}return false;}" type="submit" value="锁定" name="hxStudioDo">
|
<input onClick="{if(confirm('确定激活选定用户吗!?')){this.document.hxStudioH.submit();return true;}return false;}" type="submit" value="激活" name="hxStudioDo">
| <select size="1" name="newdj">
<option value=""></option>
<option value="0">①:待认证管理员</option>
<option value="1">②:栏目管理员</option>
</select><input onClick="{if(confirm('确定修改选定用户级别吗!?')){this.document.hxStudioH.submit();return true;}return false;}" type="submit" value="等级" name="hxStudioDo">
| <input type="text" name="k" size="13"><input type="submit" value="搜索用户名" name="hxStudioDo"></td>
</tr>
<tr class=Hxcmsqs>
<td width="98%" colspan="5"><%
call page()
sub page()%>页次:<b><font color="#FF0000"><%=currentPage%></font>/<%=mpage%></b>,每页<b><%=MaxPerPage%></b>个,<%if request("k")<>"" then%><font color="#FF0000">搜到</font><%else%>当前<%end if%>用户<b><%=totalPut%></b>个
<%
pageno=currentPage
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
%>
[ <%if cint(pageno)>1 then%><a href=admin_list.asp?admin_id=<%=request("admin_id")%>&k=<%=request("k")%>><%end if%><<-</a> <%if cint(pageno)>1 then%><a href=admin_list.asp?admin_id=<%=request("admin_id")%>&page=<%=pageno-1%>&k=<%=request("k")%>><%end if%><-</a><%
pp=cint(pageno)-3
if pp<1 then
pp=1
end if
for pno=pp to mpage
p=p+1
if pno=cint(pageno) then%> <font color="#FF0000"><%=pno%></font><%else%> <a href=admin_list.asp?admin_id=<%=request("admin_id")%>&page=<%=pno%>&k=<%=request("k")%>><%=pno%></a><%end if%>
<%
if p>=7 then exit for
next%> <%if cint(pageno)< mpage then%> <a href=admin_list.asp?admin_id=<%=request("admin_id")%>&page=<%=pageno+1%>&k=<%=request("k")%>><%end if%>-></a> <%if cint(pageno)< mpage then%><a href=admin_list.asp?admin_id=<%=request("admin_id")%>&page=<%=mpage%>&k=<%=request("k")%>><%end if%>->></a> ]<%
end sub%></td>
</tr>
</form>
</table>
<%end if%>
<%
set rs=nothing
conn.close
set conn=nothing
'****************************************************
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -