admin_userlist.asp
来自「本程序修改自花香盈路6.0版。所有版权归原作者所有 本站修改后加入了些小偷程」· ASP 代码 · 共 284 行
ASP
284 行
<%Admin="UserSee"%>
<!--#include file="check.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="inc/md5.asp"-->
<%if request.QueryString("hx66")="Modifyinfo" then
Password=trim(request.Form("Password"))
Password2=trim(request.Form("Password2"))
Answer=trim(request.Form("Answer"))
userid=trim(request.QueryString("userid"))
if request("password")=request("pswpassword") then
password=request("password")
else
password=md5(request("password"))
end if
if request("psw")="" then
psw=request("pswpassword")
else
psw=md5(request("psw"))
end if
if request("answer")=request("oldanswer") then
answer=request("answer")
else
answer=md5(request("answer"))
end if
if password<>psw then
response.write"<SCRIPT language=JavaScript>alert(' 两 次 输 入 的 密 码 不 一 致, 请 返 回 ! ');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
sql="select * from [User] where userid=" & userid &""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("Password")=Password
rs("Question")=trim(request.Form("Question"))
rs("Answer")=Answer
rs("Email")=trim(request.Form("Email"))
rs("sex")=request.Form("sex")
rs("Homepage")=trim(request.Form("Homepage"))
rs("QQ")=trim(request.Form("QQ"))
rs("MSN")=trim(request.Form("MSN"))
rs.update
rs.close
set rs=nothing
response.Write"<script language=javascript>alert(' 恭 喜 您 ! 资 料 修 改 成 功 !');this.location.href='admin_userlist.asp';</script>"
end if
if request.QueryString("hx66")="deluser" then
uid=request.QueryString("id")
sql="select * from [User] where userid="&uid&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.delete
rs.close
set rs=nothing
sql="select * from allcount"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("usercount")=rs("usercount")-1
rs.update
rs.close
set rs=nothing
end if
sql="select * from [User] order by LoginTimes desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=lanyubk style="border-collapse: collapse">
<tr class=lanyuss>
<td width="100%" height="23">
<b>普通会员管理</b></td>
</tr>
</table>
<%if request.QueryString("hx66")="adminedit" then%>
<table width="98%" height="250" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" frame="vsides" rules="none" bgcolor="FFFFFF">
<tr>
<td align="center"><%call Modifyinfo()%></td>
</tr>
</table>
<%else
sub userlist()%>
<table width="98%" height="250" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=border%>" frame="vsides" rules="none" bgcolor="FFFFFF">
<tr>
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<!--DWLayoutTable-->
<tr align="center" bgcolor="#FFFFFF">
<td width="15%" height="23">用户名</td>
<td width="5%">性别</td>
<td width="20%">注册日期</td>
<td width="10%">登录次数</td>
<td width="5%">E-mail</td>
<td width="5%">主页</td>
<td width="5%">QQ</td>
<td width="20%">最后登录时间</td>
<%if session("adminlogin")<>sessionvar then%>
<%else%>
<td colspan="2">操作</td>
<%end if%>
</tr>
<%if not rs.eof then
rs.Movefirst
rs.pagesize=adperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
totaldiary=rs.recordcount
if currentpage<>1 then
if(currentpage-1)*adperpage<totaldiary then
rs.move(currentpage-1)*adperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totaldiary mod adperpage)=0 then
totalpages=totaldiary\adperpage
else
totalpages=totaldiary\adperpage+1
end if
i=0
do while not rs.eof and i<adperpage%>
<tr align="center" bgcolor="#FFFFFF">
<td height="21"><%=rs("UserName")%></td>
<td><%=rs("sex")%></td>
<td><%=rs("RegDate")%></td>
<td><%=rs("LoginTimes")%></td>
<td><a href="mailto:<%=rs("email")%>"><img src="img/mail.gif" width="11" height="11" border="0" alt="<%=rs("username")%>的E-mail是<%=rs("email")%>"></a></td>
<td><a href="<%=rs("Homepage")%>"><img src="img/web.gif" width="11" height="11" border="0" alt="<%=rs("username")%>的主页是<%=rs("Homepage")%>"></a></td>
<td><a href="http://friend.qq.com/cgi-bin/friend/user_show_info?ln=<%=rs("QQ")%>" target="_blank"><img src="img/qq.gif" width="16" height="16" border="0" alt="<%=rs("username")%>的QQ号码是<%=rs("QQ")%>"></a></td>
<td><%=rs("LastLoginTime")%></td>
<%if session("adminlogin")<>sessionvar then%>
<%else%>
<td width="36"><a href="?hx66=deluser&id=<%=rs("userid")%>">删除</a></td>
<td width="41"><a href="?hx66=adminedit&id=<%=rs("userid")%>">修改</a></td>
<%end if%>
</tr>
<%i=i+1
rs.movenext
loop
else
If rs.EOF And rs.BOF Then%>
<tr align="center" bgcolor="#FFFFFF">
<td height="21" colspan="11">现在还没有用户!</td>
</tr>
<%end if
end if%>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form2" method="post" action="">
<tr>
<td align="right"><%=currentpage%>/<%=totalpages%>页,<%=totaldiary%>条记录/<%=adperpage%>条每页.
<%
i=1
dy10=false
showye=totalpages
if showye>10 then
dy10=true
showye=10
end if
for i=1 to showye
if i=currentpage then
%>
<%=i%>
<%else%>
<a href="?page=<%=i%>"><%=i%></a>
<%end if
next
if totalpages>currentpage then
if request("page")="" then
page=1
else
page=request("page")+1
end if%>
<a href="?page=<%=page%>" title="下一页">>></a>
<%end if%> </td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%end sub
sub Modifyinfo()
userid=request.QueryString("id")
sql="select * from [user] where userid="&userid&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="520" height="344" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<form name="form2" method="post" action="?hx66=Modifyinfo&userid=<%=userid%>"><tr align="center" bgcolor="#FFFFFF">
<td colspan="2"><p class="style1"><strong>修改用户资料</strong></p></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="95"> 用 户 名:</td>
<td width="322">
<span class="style1"><%=rs("username")%></span> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td> 密 码:</td>
<td>
<input type="password" name="password" size=20 value="<%=rs("password")%>">
<input type=hidden name="pswpassword" value="<%=rs("password")%>">
</tr>
<tr bgcolor="#FFFFFF">
<td> 新密码确认:</td>
<td>
<input type="password" name="psw" value="" size=20 maxlength=13>
<span class="style1"> 不修改密码请留空</span> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td> 密码提示问题:</td>
<td>
<input name="Question" type="text" class="lanyu" id="Question2" value="<%=rs("Question")%>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> 密码提示答案:</td>
<td>
<input type=text name="answer" size=20 value="<%=rs("answer")%>">
<input type=hidden name="oldanswer" value="<%=rs("answer")%>">
<span class="style1">答案采用了MD5加密,如要修改可直接填写。</span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> E-mail:</td>
<td>
<input name="Email" type="text" class="lanyu" id="Email2" value="<%=rs("Email")%>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> 性 别:</td>
<td>
<input type="radio" name="sex" value="男" <%if rs("sex")="男" then response.Write"checked" end if%>>
男
<input name="sex" type="radio" value="女" <%if rs("sex")="女" then response.Write"checked" end if%>>
女</td>
</tr>
<tr bgcolor="#FFFFFF">
<td> 个人主页:</td>
<td>
<input name="Homepage" type="text" class="lanyu" id="Homepage2" value="<%=rs("Homepage")%>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> QQ:</td>
<td>
<input name="QQ" type="text" class="lanyu" id="QQ2" value="<%=rs("QQ")%>"></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="2"><input type="submit" name="Submit" value=" 修改 " class="button">
<input type="reset" name="Submit2" value=" 重填 " class="button">
</td>
</tr></form>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<%end sub
if session("adminlogin")<>sessionvar then%>
<%
if session("userlogin")="" then%>
<table width="760" height="250" border="1" align="center" cellpadding="0" cellspacing="0" frame="vsides" rules="none">
<tr>
<td align="center"><%call guesterror()%></td>
</tr>
</table>
<%else
call userlist()
end if
else
call userlist()
end if
end if
r%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?