⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_usermana.asp

📁 庐江二中
💻 ASP
字号:
<%PageName="admin_UserMana"%>
<!--#include file="session.asp"-->
<%checkAdmin2%>
<!--#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"--><br>
<%
Response.Write	"<table border=0 width=80% cellspacing=1 cellpadding=1 bgcolor="&MainBgcolor&">"&_
				"<tr>"&_
				"<td width=0 valign=top>"%>

<%
Response.Write	"</td>"&_
				"<td align=center valign=top>"&_
				"<a href=admin_usersave.asp?act=checkall&page="&currentPage&"><font color=" & AlertFColor & "><b>通过所有用户的验证</b></font></a>"
MaxPerPage=20
topnum=currentPage*MaxPerPage
set rs=conn.execute("select count(id) from Users")
totalPut=rs(0)
rs.Close 
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select top "&topnum&" * from Users order by id desc" 
rs.open sql,conn,1,1
if rs.eof and rs.bof then 
	response.write "<p align='center'>暂时没有会员注册</p>" 
else 
	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 
set rs=nothing			
sub showContent 
i=0 
Response.Write	"<table border=1 width=100% cellspacing=0 cellpadding=0 class=TableLine bordercolordark="&MainBColor&" bordercolorlight="&MainBColor&" bgcolor="&MainCColor&">"&_
				"<tr height=22 bgcolor="&MainTColor&">"&_
				"<td width=10% align=center class=TFColor>ID</td>"&_
				"<td width=30% align=center class=TFColor>会员</td>"&_
				"<td width=20% align=center class=TFColor>等级</td>"&_
				"<td width=10% align=center class=TFColor>修改</td>"&_
				"<td width=10% align=center class=TFColor>锁定</td>"&_
				"<td width=10% align=center class=TFColor>删除</td>"&_
				"<td width=10% align=center class=TFColor>验证</td>"&_
				"</tr>"
do while not rs.eof
	i=i+1
Response.Write	"<tr height=20>"&_
				"<td align=center>"&rs("id")&"</td>"&_
				"<td align=center><a href='admin_UserModify.asp?id="&rs("id")&"' title='会员资料:&#13;&#10;性别:"
	if rs("Sex")=1 then
Response.write	"男"
	else
Response.write	"女"
	end if
Response.Write	"&#13;&#10;信箱:"&rs("Email")&"&#13;&#10;OICQ:"&rs("oicq")&"&#13;&#10;主页名称:"&rs("UserWebName")&"&#13;&#10;主页地址:"&rs("UserWebUrl")&"&#13;&#10;积分:"&rs("UserPoint")&"&#13;&#10;等级:"&Level(rs("UserLevel"))&"&#13;&#10;浏览:"&rs("ReadNews")&"&#13;&#10;发送:"&rs("SendNews")&"&#13;&#10;评论:"&rs("WGBooks")&"&#13;&#10;回复:"&rs("Replay")&"&#13;&#10;登陆:"&rs("logins")&"&#13;&#10;登陆IP:"&rs("LoginIP")&"&#13;&#10;最后登陆:"&rs("lastlogin")&"&#13;&#10;注册时间:"&rs("addDate")&"&#13;&#10;个人说明:"&rs("sign")&"'>"&rs("UserName")&"</td>"&_
				"<td align=center>"&Level(rs("UserLevel"))&"</td>"&_
				"<td align=center style='cursor:hand' onclick=""javascript:window.open('admin_UserModify.asp?id="&rs("id")&"&page="&CurrentPage&"','_self','')"">修改</td>"&_
				"<td align=center style='cursor:hand' onclick=""javascript:window.open('admin_UserSave.asp?id="&rs("id")&"&act=lock&page="&CurrentPage&"','_self','')"">"
	if rs("lockuser")=false then
Response.write	"锁定"
	else
Response.write	"<font color=" & AlertFColor & ">开锁</font>"
	end if
Response.Write	"</td>"&_
				"<td align=center style='cursor:hand' onclick=""javascript:window.open('admin_UserSave.asp?username="&rs("username")&"&act=del&page="&CurrentPage&"','_self','')"">删除</td>"&_
				"<td align=center style='cursor:hand' onclick=""javascript:window.open('admin_UserSave.asp?id="&rs("id")&"&act=check&page="&CurrentPage&"','_self','')"">"
	if rs("ischecked")=false then
Response.write	"<font color=" & AlertFColor & ">待定</font>"
	else
Response.write	"通过"
	end if
Response.Write	"</td>"&_
				"</tr>"
	if i>=MaxPerPage then exit do
rs.movenext
loop
Response.Write	"</table>"
end sub 

function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
Response.Write	"<form method=Post action="&filename&">"&_
				"<center>共<font color="&AlertFColor&"><b>"&totalnumber&"</b></font>位会员"
if CurrentPage<2 then
Response.Write	"&nbsp;首页 上一页"
else
Response.Write	"&nbsp;<a href="&filename&"?page=1>首页</a>"&_
				"&nbsp;<a href="&filename&"?page="&CurrentPage-1&">上一页</a>"
end if
if n-currentpage<1 then
Response.Write	"&nbsp;下一页 末页"
else
Response.Write	"&nbsp;<a href="&filename&"?page="&CurrentPage+1&">下一页</a>"&_
				"&nbsp;<a href="&filename&"?page="&n&">末页</a>"
end if
Response.Write	"&nbsp;页次:<strong><font color="&AlertFColor&">"&CurrentPage&"/"&n&"</font></strong>页"&_
				"&nbsp;转到:<select name=page size=1 onchange='javascript:submit()'>"
for i = 1 to n
Response.Write	"<option value="&i
	if cint(CurrentPage)=cint(i) then Response.Write " selected"
Response.Write	">第"&i&"页</option>"
next
Response.Write	"</select>"&_
				"</form>"
end function
%>
     <table border="1" width="50%" cellspacing="0" cellpadding="0" class="TableLine" bordercolordark="<%=MainBColor%>" bordercolorlight="<%=MainBColor%>" bgcolor="<%=MainCColor%>">
       <form method="POST" action="admin_usersave.asp?act=deldate&page=<%=CurrentPage%>" id=form1 name=form1>
         <tr>
           <td width="100%" height="20" bgcolor="<%=MainTColor%>" align=center class=TFColor background="images/admin/b3.gif"><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>
             <input type="submit" value=" 确定 " name="cmdok">&nbsp; 
             <input type="reset" value=" 清 除 "  name="cmdcancel">
           </td>
         </tr>
       </form>
     </table>
<%Response.Write	"</td>"&_
				"</tr>"&_
				"</table>"
set rs=nothing%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -