📄 userlostpass.asp
字号:
<!--#include file="head.asp"-->
<!--#include file="md5.asp"-->
<br>
<table align=center width=300 cellspacing=0 cellpadding=0>
<tr>
<td class="mframe-t-left"></td>
<td class="mframe-t-mid">
<span class="mframe-t-text">找回密码</span>
</td>
<td class="mframe-t-right"></td>
</tr>
</table>
<table align=center width=300 cellspacing=0 cellpadding=0>
<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 width=95% align=center>
<tr><td width=60>
<b>新密码:</b>
</td><td>
<input name="LsNewPass" type="password" maxlength="50" id="LsNewPass" Size="15" />
</td></tr>
<tr><td colspan=2 height=30 align=center>
<input type="submit" name="btStep3" value="下一步" />
</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 width=95% 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" />
<span style="color: Red">*</span> </td>
</tr>
<tr><td colspan=2 height=30 align=center>
<input type="submit" name="btStep2" value="下一步" />
</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 width=95% align=center>
<tr><td width=60>
<b>会员名:</b>
</td><td>
<input name="LsName" type="text" maxlength="50" id="LsName" Size="15" />
<span style="color: Red">*</span> </td>
</tr>
<tr><td colspan=2 height=30 align=center>
<input type="submit" name="btStep1" value="下一步" id="btStep1" />
</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 width=300 cellspacing=0 cellpadding=0 >
<tr>
<td class="mframe-b-left"></td>
<td class="mframe-b-mid"> </td>
<td class="mframe-b-right"></td>
</tr>
</table>
<br>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -