📄 userlostpass.asp
字号:
<!--#include file="top.asp"-->
<!--#include file="md5.asp"-->
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="500">
<table width=300 align=center cellpadding=0 cellspacing=0 class="tbale-bgcolor">
<tr>
<td class="mframe-t-left"></td>
<td class="mframe-t-mid">找回密码</span> </td>
<td class="mframe-t-right"></td>
</tr>
</table>
<table align=center cellpadding=0 cellspacing=0 class="tbale-bgcolor">
<tr>
<td height="93" class="mframe-m-left"></td>
<td class="mframe-m-mid" style="padding:10px; line-height:130%"> <form name="myForm" method="post" action="UserLostPass.asp" id="myForm" onSubmit="return check();">
<%
if Request("method") = 3 then
LsNewPass = Qcdn.checkStr(Trim(Request.Form("LsNewPass")))
LsNewPass = md5(LsNewPass,16)
userid = Request.Form("userid")
sql = "Update [article_User] set [password] = '"& LsNewPass &"' where unid = " & userid
conn.execute(sql)
Response.write("<center>密码修改成功,请回<a href='index.asp'>首页</a>登陆。</center>")
elseif Request("method") = 2 then
LsAnswer = Qcdn.checkStr(Trim(Request.Form("LsAnswer")))
userid = Request.Form("userid")
Sql = "Select Unid from [article_User] where answer = '"& LsAnswer &"'"
Set Rs = conn.execute(sql)
if Rs.eof and Rs.bof then
Response.write("<center>找回密码问题不符!<p><a href='UserLostPass.asp'>返回</a></center>")
Response.End()
rs.close
else
rs.close
end if
%>
<table align=center>
<tr>
<td width=60> <b>新密码:</b> </td>
<td> <input name="LsNewPass" type="password" maxlength="50" id="LsNewPass" Size="15" / class=input2>
</td>
</tr>
<tr>
<td colspan=2 height=30 align=center> <input type="submit" name="btStep3" value="下一步" / class=input2>
</td>
</tr>
</table>
<input type="hidden" name="method" value="3">
<input type="hidden" name = "userid" value="<%=userid%>">
<script language="JavaScript">
function check(){
if (myForm.LsNewPass.value ==""){
alert("请输入新密码!");
myForm.LsNewPass.focus();
return false;
}
return true;
}
</script>
<%
elseif Request("method") = 1 then
LsName = Qcdn.checkStr(Trim(Request.Form("LsName")))
Sql = "Select question,unid from [article_User] where username = '"& LsName &"'"
Set Rs = conn.execute(Sql)
if Rs.eof and Rs.bof then
Response.write("<center>没有这个会员!<p><a href=# onclick='javascript:history.back();'>返回</a></center>")
Response.End()
rs.close : set rs = nothing
else
question = RS(0)
userid = rs(1)
end if
Rs.close : set rs = nothing
%>
<table align=center>
<tr>
<td width=60> <b>问题:</b> </td>
<td> <%=question%> </td>
</tr>
<tr>
<td> <b>答案:</b> </td>
<td> <input name="LsAnswer" type="password" maxlength="100" id="LsAnswer" Size="15" / class=input2>
<span style="color: Red">*</span> </td>
</tr>
<tr>
<td colspan=2 height=30 align=center> <input type="submit" name="btStep" value="下一步" / class=input2>
</td>
</tr>
</table>
<input type="hidden" name="method" value="2">
<input type="hidden" name = "userid" value="<%=userid%>">
<script language="JavaScript">
function check(){
if (myForm.LsAnswer.value ==""){
alert("请输入密码提示答案!");
myForm.LsAnswer.focus();
return false;
}
return true;
}
</script>
<%
elseif Request("method") = "" then
%>
<table align=center>
<tr>
<td width=60> <b>会员名:</b> </td>
<td> <input name="LsName" type="text" maxlength="50" id="LsName" Size="15" / class=input2>
<span style="color: Red">*</span> </td>
</tr>
<tr>
<td colspan=2 height=30 align=center> <input type="submit" name="btStep1" value="下一步" id="btStep1" / class=input2>
</td>
</tr>
</table>
<input type="hidden" name="method" value="1">
<script language="JavaScript">
function check(){
if (myForm.LsName.value ==""){
alert("请输入会员名!");
myForm.LsName.focus();
return false;
}
return true;
}
</script>
<%end if%>
</form></td>
<td class="mframe-m-right"></td>
</tr>
</table>
<table align=center cellpadding=0 cellspacing=0 class="tbale-bgcolor" >
<tr>
<td width="364" class="mframe-b-left"></td>
<td width="42" class="mframe-b-mid"> </td>
<td width="362" class="mframe-b-right"></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -