?? admin_list.asp
字號:
<%Admin="adminSee"%>
<!--#include file="check.asp"-->
<!--#include file="mdb.asp"-->
<html>
<head>
<title>管理中心 - 聽雪資源網管理系統</title>
<meta copy="程序制作:聽雪 www.26q.net">
<link rel="stylesheet" href="inc/admin.css" type="text/css">
</head>
<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>
<body>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=lanyubk style="border-collapse: collapse">
<tr class=lanyuss>
<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=lanyubk style="border-collapse: collapse">
<form action="admin_save.asp?dj=<%=request("dj")%>&page=<%=currentPage%>&k=<%=request("k")%>" method=post name="hxStudioH">
<tr>
<td width="100%" colspan="5"><%call page()%></td>
</tr>
<tr align="center">
<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">
<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">
<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>
<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>
<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 + -