📄 admin_usermana.asp
字号:
<%if Session("IsAdmin")<>true or Session("KEY")<>"super" then response.redirect "admin_login.asp"%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<!--#include file="top.asp"-->
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="750" id="AutoNumber1" height="1">
<tr>
<td width="5" background="images/line_bg02.gif" height="1">
<img border="0" src="images/line_bg02.gif"></td>
<td width="741" height="1">
<img border="0" src="images/new.gif" width="1" height="1"><table border="0" width="740" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td valign=top width=196 rowspan="2">
<!--#include file="admin_left.asp"-->
</td>
<td valign=top width=4 background="images/line_bg02.gif" rowspan="2"> </td>
<td width="540" valign="top" align="center">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from user order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>暂时没有用户注册</p>"
else
MaxPerPage=20
PageUrl="admin_UserMana.asp"
totalPut=rs.recordcount
if currentpage<1 then currentpage=1
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
else
currentPage=1
showpage totalput,MaxPerPage,PageUrl
showContent
showpage totalput,MaxPerPage,PageUrl
end if
end if
end if
rs.close
sub showContent
i=0
%>
<table border="1" width="540" cellspacing="0" cellpadding="0" class="TableLine" style="border-collapse: collapse" bordercolor="#0D5777">
<tr>
<td width="52" height=22 align=center bgcolor="#0D5777">ID</td>
<td width="178" height=22 align=center bgcolor="#0D5777">用户名</td>
<td width="142" height=22 align=center bgcolor="#0D5777">
最后一次登陆的IP地址</td>
<td width="52" height=22 align=center bgcolor="#0D5777">修改</td>
<td width="53" height=22 align=center bgcolor="#0D5777">锁定</td>
<td width="54" height=22 align=center bgcolor="#0D5777">删除</td>
</tr>
<%
do while not rs.eof
i=i+1
%>
<tr>
<td align=center width="52"><%=rs("id")%> </td>
<td align=center width="178"><a href="admin_UserModify.asp?id=<%=rs("id")%>" title="用户资料: 密码:<%=rs("Password")%> 性别:<%if rs("Sex")=1 then%>男<%else%>女<%end if%> 信箱:<%=rs("Email")%> OICQ:<%=rs("oicq")%> 真实姓名:<%=rs("TrueName")%> 省份:<%=rs("Address")%> 联系地址:<%=rs("ContactAddress")%> 收听:<%=rs("Listens")%> 点歌:<%=rs("SMusics")%> 登陆:<%=rs("logins")%> 登陆IP:<%=rs("LoginIP")%> 最后登陆:<%=rs("lastlogin")%> 注册时间:<%=rs("addDate")%> 个人说明:<%=rs("sign")%>"><%=rs("UserName")%> </td>
<td align=center width="142"><%=rs("loginip")%> </td>
<td align=center width="52"><input type=button name=edit value=修改 onclick="javascript:window.open('admin_UserModify.asp?id=<%=rs("id")%>','_self','')"></td>
<td align=center width="53"><input type=button name=lock value=<%if rs("lockuser")=false then%>"锁定"<%else%>"开锁"<%end if%> onclick="javascript:window.open('admin_UserSave.asp?id=<%=rs("id")%>&act=lock','_self','')"></td>
<td align=center width="54"><input type=button name=del value=删除 onclick="javascript:window.open('admin_UserDel.asp?id=<%=rs("id")%>','_self','')"></td>
</tr>
<%
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
%>
<form method=Post action="<%=filename%>?classid=<%=classid%>">
<center>共<font color="<%=AlertFColor%>"><b><%=totalnumber%></b></font>位用户
<%if CurrentPage<2 then%>
首页 上一页
<%else%>
 <a href="<%=filename%>?page=1&classid=<%=classid%>">首页</a>
<a href="<%=filename%>?page=<%=CurrentPage-1%>&classid=<%=classid%>">上一页</a>
<%
end if
if n-currentpage<1 then
%>
下一页 末页
<%else%>
<a href="<%=filename%>?page=<%=CurrentPage+1%>&classid=<%=classid%>">下一页</a>
<a href="<%=filename%>?page=<%=n%>&classid=<%=classid%>">末页</a>
<%end if%>
页次:<strong><font color="<%=AlertFColor%>"><%=CurrentPage%>/<%=n%></font></strong>页
转到:<select name="page" size="1" onchange="javascript:submit()">
<%for i = 1 to n%>
<option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
<%next%>
</select>
</form>
<%end function%>
<table border="1" width="70%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#0D5777">
<form method="POST" action="admin_usersave.asp?act=deldate&page=<%=CurrentPage%>" id=form1 name=form1>
<tr>
<td width="100%" height="20" align=center class=TFColor bgcolor="#1A4051"><b>删除过期用户</b></td>
</tr>
<tr>
<td width="30%" align=center>最后登陆间隔天数大于:<input type="text" name="selectdate" size="20"></td>
</tr>
<tr>
<td width="30%" align=center>登陆次数小于:<input type="text" name="selecttimes" size="20"></td>
</tr>
<tr>
<td align=center bgcolor="#1A4051">
<input type="submit" value=" 确定 " name="cmdok">
<input type="reset" value=" 清 除 " name="cmdcancel">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
<td width="5" background="images/line_bg02.gif" height="1">
<img border="0" src="images/line_bg02.gif"></td>
</tr>
<tr>
<td width="750" height="5" colspan="3" background="images/line_bg01.gif">
<img border="0" src="images/line_bg01.gif"></td>
</tr>
</table>
</center>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<%
set rs=nothing
conn.close
set conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -