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

📄 recoverpasswd.asp

📁 ASP整套的建站源代码
💻 ASP
字号:
<!-- #include file="setup.asp" -->

<%
username=server.htmlencode(Trim(Request("username")))
userpass=Trim(Request("userpass"))
if Request("username")="" then
error("<li>用户名称没有填写")
end if

if instr(username," ")>0 then:error("<li>非法操作"):end if

sql="select * from user where username='"&username&"'"
rs.Open sql,Conn,1,3
if rs.eof then
error("<li>"&username&"的用户资料不存在")
end if
if ""&rs("birthyear")&""="" or ""&rs("birthmonth")&""="" or ""&rs("birthday")&""="" then
error("<li>您注册的时候没有填写出生日期,所以无法通过此功能找回密码")
end if
if Request("birthyear")<>rs("birthyear") or Request("birthmonth")<>rs("birthmonth") or Request("birthday")<>rs("birthday") then
error("<li>出生日期填写错误")
end if

if Request("menu")=2 then

if ""&rs("answer")&""="" or ""&rs("question")&""="" then
error("<li>您注册的时候没有填写密码提示问题或者密码提示答案,所以无法通过此功能找回密码")
end if
if Request("answer")<>rs("answer") then
error("<li>答案错误")
end if
if Request("userpass")="" then
error("<li>请输入新的密码")
end if
if Request("userpass")<>Request("userpass2") then
error("<li>您2次输入的密码不同")
end if

rs("userpass")=userpass
rs.update
rs.close


succtitle="更改密码成功"
message=message&"<li><a href=index.asp>返回论坛首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=index.asp>")


end if

top
%>




<table width=750 align="center" border="0">
<tr>
<td vAlign="top" width="30%">
<img src="images/logo.gif" border="0"></td>
<td vAlign="center" align="top">&nbsp;<font color=#000000><img
src="images/closedfold.gif" width="14" height="14"> <a href="index.asp"><%=clubname%></a><br>
&nbsp;<img
height=15
src="images/coner.gif"
width=15><img
src="images/openfold.gif"> 更改密码</font></td>
</tr>
</table>


<br>



<form method="POST" action=RecoverPasswd.asp>
<input type=hidden name=username value=<%=Request("username")%>>
<input type=hidden name=birthyear value=<%=Request("birthyear")%>>
<input type=hidden name=birthmonth value=<%=Request("birthmonth")%>>
<input type=hidden name=birthday value=<%=Request("birthday")%>>
<input type=hidden name=menu value=2>
<TABLE cellSpacing=0 cellPadding=0 width=333 align=center bgColor=a4b6d7
border=0 style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none">
<TR>
<TD style="border-right: 0px none; border-top: 0px none">
<TABLE cellSpacing=1 cellPadding=6 width="100%" border=0 style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none">
<TBODY></TBODY></TABLE></TD></TR></TABLE>



<table width="333" border="1" cellspacing="0" cellpadding="2" align="center" bordercolor=ACABC4 style="border-left:0px none; border-top:0px none; border-bottom:1px none; border-collapse: collapse">
<tr bgcolor=ACABC4>
<td width="328" style="border-right: 0px none; border-top: 0px none" background=images/title_sub.gif height="25"><div align="center">
<font color=#000000>更改密码</font></div>
</td></tr><tr>
<td height="19" width="328" valign="top" bgcolor="#F2F8FF" style="border-right: 0px none; border-top: 0px none">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%" align="right" height="20">请回答问题:</td>
<td width="50%" height="20"><%=rs("question")%></td>
</tr>
<tr>
<td width="50%" align="right" height="20">答案:</td>
<td width="50%" height="20"><input size="15" value name="answer"></td>
</tr>
<tr>
<td width="50%" align="right" height="20">请输入新的密码:</td>
<td width="50%" height="20"><input type="text" size="15" name="userpass"></td>
</tr>
<tr>
<td width="50%" align="right" height="20">请再次输入密码:</td>
<td width="50%" height="20"><input type="text" size="15" name="userpass2"></td>
</tr>
</table>
<input type="submit" value=" 确定 " name="Submit1"> <input type="reset" value=" 取消 " name="Submit">
</div></td></tr> </form></table>
<br>
<center>
<a href=javascript:history.back()>BACK </a><br>

<%
htmlend
%>

⌨️ 快捷键说明

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