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

📄 repass.asp

📁 wanzhengban 完整版 wanzhengban 完整版
💻 ASP
字号:
<!--#include file="top.asp"-->
<!-- #include file="MD5.asp" -->
<div align="center">
<%user_name=request("user_name")
question=request("question")
answer=request("answer")
pass1=md5(request("pass1"))
pass2=md5(request("pass2"))
if request("action")="repass1" then%><PRE> </PRE>
<table border="0" cellpadding="0" cellspacing="5" width="630" bgcolor="#EEEEEE"><tr><td align="center" bgcolor="#EEEEEE">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="img/pattern.gif" style="border: 1px solid #C0C0C0">
<%
if user_name="" then
response.write "<tr><td colspan=3 align=center height=100>请输入用户名,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> !</td></tr>"
else	
sql="select * from [user] where username='"&user_name&"'"
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td colspan=3 align=center height=100>没有这个用户名,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> !</td></tr>"
else
if rs("question")="" or rs("answer")="" then
response.write "<tr><td colspan=3 align=center height=100>您没有填写密码保护资料,无法找回密码,请联系管理员,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> !</td></tr>"
else
%> <tr> 
    <td colspan="3" align="center" height="30">第二步:请输入密码保护问题答案</td>
 </tr>
   	<form method="POST" name="form" action="repass.asp?action=repass2"><tr> 
    <td align="right" height="30" width="200">用户名:</td>
    <td height="30" width="25"></td>
    <td height="30" width="400"><%=rs("username")%><input name="user_name" type="hidden" value="<%=rs("username")%>"></td>
   </tr>
   	<tr> 
    <td align="right" height="30" width="200">预设的密码保护问题:</td>
    <td height="30" width="25"></td>
    <td height="30" width="400"><%=rs("question")%><input name="question" type="hidden" value="<%=rs("question")%>"></td>
   </tr>
   	<tr>
    <td align="right" height="30" width="200">请输入密码保护答案:</td>
    <td height="30" width="25"></td>
    <td height="30" width="400"><input name="answer" type="text" class=input size="20"></td>
    </tr>
   	<tr><td align="center" colspan="3" height="30"><input type=submit value=下一步 name="submit1"></td></tr>
   </form>
<%end if
end if
rs.close
end if
%>
</table>
</td></tr></table><PRE> </PRE>
<%elseif request("action")="repass2" then%><PRE> </PRE>
<table border="0" cellpadding="0" cellspacing="5" width="630" bgcolor="#EEEEEE"><tr><td align="center" bgcolor="#EEEEEE">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="img/pattern.gif" style="border: 1px solid #C0C0C0">
<%sql="select * from [user] where username='"&user_name&"' and question='"&question&"' and answer='"&answer&"'"
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td colspan=3 align=center height=100>密码找回答案错误,请确认,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> !</td></tr>"
else%>
 <form method="POST" name="form2" action="repass.asp?action=repass3"><tr> 
    <td colspan="3" align="center" height="30">第三步:请重新设定密码</td>
   </tr>
   	<tr> 
    <td width="200" align="right" height="30">用户名:</td>
    <td width="25" height="30"></td>
    <td width="400" height="30"><%=rs("username")%><input name="user_name" type="hidden" value="<%=rs("username")%>"></td>
   </tr>
   	<tr> 
    <td width="200" align="right" height="30">新密码:</td>
    <td width="25" height="30"></td>
    <td width="400" height="30"><input name="pass1" type="text" class=input size="20"></td>
   </tr>
   	<tr>
    <td width="200" align="right" height="30">确认新密码:</td>
    <td width="25" height="30"></td>
    <td width="400" height="30"><input name="pass2" type="text" class=input size="20"></td>
    </tr>
   	<tr> 
    <td align="center" colspan="3" height="30">
		<input type=submit value=下一步 name="submit1"></td>
   </tr>
   </form>
<%
rs.close
end if
%></table>
</td></tr></table><PRE> </PRE>
<%elseif request("action")="repass3" then%><PRE> </PRE>
<table border="0" cellpadding="0" cellspacing="5" width="630" bgcolor="#EEEEEE"><tr><td align="center" bgcolor="#EEEEEE">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="img/pattern.gif" style="border: 1px solid #C0C0C0">
<%set rs=server.createobject("adodb.recordset")	
sql="select * from [user] where username='"&user_name&"'"
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td colspan=3 align=center height=100>没有这个用户,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> !</td></tr>"
else
if pass1<>pass2 then
response.write "<tr><td colspan=3 align=center height=100>两次密码必须相同,请确认,<a href=# onClick=history.go(-1)><font color=#ff0000>返回</font></a> !</td></tr>"
else
rs("userpass")=pass1
rs.update
rs.close
response.write "<tr><td colspan=3 align=center height=100>密码修改成功,请<a href=index.htm><font color=red>返回首页</font></a>重新登录</td></tr>"
end if
end if%>
</table></td></tr></table><PRE> </PRE>
<%else%>
<PRE> </PRE>
<table border="0" cellpadding="0" cellspacing="5" width="630" bgcolor="#EEEEEE"><tr><td align="center" bgcolor="#EEEEEE">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="img/pattern.gif" style="border: 1px solid #C0C0C0">
 <form method="POST" name="form1" action="repass.asp?action=repass1">
   <tr><td height="60" colspan="3" align="center" width="100%">第一步:用户密码找回 </td></tr>
   	<tr> 
    <td align="right" height="30" width="230">请输入您的用户名:</td>
    <td align="center" height="30" width="165">
	<input name="user_name" type="text" class=input size="16"></td>
    <td height="30" width="230">
		<input type=submit value=下一步 name="submit"></td>
   </tr>
   	<tr> 
    <td align="center" height="60" colspan="3" width="100%">
	注意:没有填写密码保护资料的客户无法通过此方法找回密码,请直接与<a href="mailto:<%=rs7("mail")%>">管理员</a>联系!</td>
   </tr>
</form></table>
</td></tr></table><PRE> </PRE>  
<%end if%><!--#include file="copy.asp"-->

⌨️ 快捷键说明

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