📄 losspass.asp
字号:
<!--#include file="conn.asp" -->
<!-- #include file="inc/info.asp" -->
<!-- #include file="inc/const.asp" -->
<!-- #include file="inc/md5.asp" -->
<%response.buffer=true
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: losspass.asp
'Version:2.0
'UpdateTime: 2004-10-4 16:31:23
'Script Written by www.aspease.com
'=========================================================
action=request("action")
if action="step1" then
call step1
elseif action="step2" then
call step2
else
stats=easelosspassstats
call header
call main
end if
call activeonline()
footer
sub main
response.Write("<table width=""750"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">")
response.Write(" <form ""frm1"" action=""?action=step1"" method=""post""> " & tr)
response.Write(" <td width=""11"" height=""41""></td>")
response.Write(" <td><div align=""left"">" & easelosspasstitlestr & "</div></td>")
response.Write(" <td width=""11"">" & ctdr & tr)
response.Write(" <td width=""11"" height=""100""></td>")
response.Write(" <td bgcolor=""#F1F2F2"" height=""18"" align=""center"" id=""b2"">")
response.Write(" <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" id=""b2"" height=""100%"">")
response.Write(" <tr>")
response.Write(" <td><div align=""left""></div>"&ctdr&tr)
response.Write(" <td> ")
response.Write(" <div align=""center"">" & easelosspassenterusername)
response.Write(" <input type=""text"" name=""username"" size=""20"">")
response.Write(" <input name=""r1"" type=""radio"" value=""username"" checked>")
response.Write(easelosspassget1)
response.Write(" <input type=""radio"" name=""r1"" value=""email"">" & easelosspassget2)
response.Write(" </div>"&ctdr&tr&tdstr&ctr&tr)
response.Write(" <td> <div align=""center""> <input type=""submit"" name=""submit"" value=""" & easelosspassnextbtn & """></div>")
response.Write(" </td>")
response.Write(" </tr>")
response.Write(" </table>")
response.Write(" </td>")
response.Write(" <td width=""11"" height=""18""> </td>")
response.Write(" </tr>")
response.Write(" <tr> ")
response.Write(" <td width=""11""></td>")
response.Write(" <td> </td>")
response.Write(" <td width=""11""></td>")
response.Write(" </tr></form>")
response.Write("</table>")
end sub
sub step1
if rst("r1")="username" then
stats=easelosspassstats2
header
username=request("username")
set rs=server.createobject("adodb.recordset")
sql="select * from users where regUsername="&sqlstr(username)&""
rs.open sql,conn,1,1
if not rs.eof then
response.Write("<table width=""750"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">")
response.Write(" <tr>")
response.Write(" <td width=""11"" height=""41""></td>")
response.Write(" <td>" & easelosspassstats2 & " </td>")
response.Write(" <td width=""11""></td>")
response.Write(" </tr>")
response.Write(" <tr>")
response.Write(" <td width=""11"" height=""100""></td>")
response.Write(" <td bgcolor=""#F1F2F2"" height=""18"" align=""center"" id=""b2"">")
response.Write(" <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" id=""b2"" height=""100%"">")
response.Write(" <form name=""form"" method=""post"" action=""?action=step2""><tr>")
response.Write(" <td width=""47%"">")
response.Write(" <div align=""right"">" & easelosspassquestion & "</div></td>")
response.Write(" <td width=""53%"">")
If trim(rs("regQuestion"))<>"" Then
response.Write(rs("regQuestion"))
Else
response.Write("<script language=javascript>{alert( '" & easelosspassnoanswer & "');")
response.Write(chr(10))
response.Write("location.href='losspass.asp';}")
response.Write(chr(10))
response.Write("</script>")
response.Write(chr(10))
response.End()
end if
response.Write("</td>")
response.Write(" </tr>")
response.Write(" <tr>")
response.Write(" <td><div align=""right"">" & easelosspassanswer)
response.Write(" ")
response.Write(" </div></td>")
response.Write(" <td><input type=""text"" name=""answer""></td>")
response.Write(" </tr>")
response.Write(" <tr>")
response.Write(" <td colspan=""2"">")
response.Write(" <div align=""center"">")
response.Write(" <input type=""hidden"" name=""username"" value=""")
response.Write( username )
response.Write(""">")
response.Write(" <input name=""submit"" type=""submit"" value=""" & easelosspassnextbtn & """>")
response.Write(" </div></td>")
response.Write(" </tr></form>")
response.Write(" </table></td>")
response.Write(" <td width=""11"" height=""18""> </td>")
response.Write(" </tr>")
response.Write(" <tr>")
response.Write(" <td width=""11""></td>")
response.Write(" <td> </td>")
response.Write(" <td width=""11""></td>")
response.Write(" </tr>")
response.Write("</table>")
else
response.Write("<script language=javascript>{alert( '" & easelosspassnullusermsg & "');location.href='losspass.asp';}</script>")
response.End()
end if
end if
if rst("r1")="email" then
header
username=rst("username")
set rs=conn.execute("select * from users where regusername="&sqlstr(username)&"")
if not rs.eof then
email=trim(rs("regEmail"))
'begin send email
'end here
response.Write("<script language=javascript>{alert( '" & easelosspasssendstr & email & ",\n" & easelosspasssendstr2 & "');location.href='login.asp';}</script>")
response.End()
else
response.Write("<script language=javascript>{alert( '" & easelosspassnullusermsg & "');location.href='losspass.asp';}</script>")
response.End()
end if
end if
end sub
sub step2
stats=easelosspassstats3
header
if rst("submit")=easeupdatebtn then
n1=rst("newpass")
n2=rst("renewpass")
if n1<>n2 then
response.Write("<script language=javascript>{alert( '" & easelosspasserr1msg & "');location.href='losspass.asp';}</script>")
response.End()
else
conn.execute("update users set regpassword="&sqlstr(md5(n1))&" where regusername="&sqlstr(rst("username"))&"")
response.Write("<script language=javascript>{alert( '" & easelosspassokmsg & "');location.href='login.asp';}</script>")
response.End()
end if
else
username=request("username")
sql="select * from users where regUsername="&sqlstr(username)&" and reganswer="&sqlstr(rst("answer"))&""
set rs=conn.execute(sql)
if not rs.eof then
response.Write("<table width=""750"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">")
response.Write(" <tr>")
response.Write(" <td width=""11"" height=""41""></td>")
response.Write(" <td>" & easelosspassstats3 & "</td>")
response.Write(" <td width=""11""></td>")
response.Write(" </tr>")
response.Write(" <tr>")
response.Write(" <td width=""11"" height=""100""></td>")
response.Write(" <td bgcolor=""#F1F2F2"" height=""18"" align=""center"" id=""b2"">")
response.Write(" <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" id=""b2"" height=""100%"">")
response.Write(" <form name=""form"" method=""post"" action='?action=step2' onsubmit=""return isok(this)"">")
response.Write(" <tr>")
response.Write(" <td width=""47%"">")
response.Write(" <div align=""right"">" & easelosspassnewpwd & "</div></td>")
response.Write(" <td width=""53%""><input name=""newpass"" type=""password"" id=""newpass""></td>")
response.Write(" </tr>")
response.Write(" <tr>")
response.Write(" <td><div align=""right"">" & easelosspassrenewpwd & " </div></td>")
response.Write(" <td><input name=""renewpass"" type=""password"" id=""renewpass""></td>")
response.Write(" </tr>")
response.Write(" <tr>")
response.Write(" <td colspan=""2"">")
response.Write(" <div align=""center""> ")
response.Write(" <input name=""username"" type=""hidden"" value=""")
response.Write(rst("username"))
response.Write("""> ")
response.Write(" <input name=""submit"" type=""submit"" value=""" & easeupdatebtn & """>")
response.Write(" </div>"&ctdr)
response.Write(" </form>"&aspeasetableclose)
response.Write(" </td>")
response.Write(" <td width=""11"" height=""18""> "&ctdr&tr)
response.Write(" <td width=""11""></td>")
response.Write(" <td> </td>")
response.Write(" <td width=""11"">"&ctdr&aspeasetableclose)
else
response.Write(" <script language=javascript>{alert( '" & easelosspasserranswermsg & "');location.href='losspass.asp';}</script> ")
response.end
end if
end if
end sub
'=========================================================
'Copyright (C) 2003-2004 AspEase.Com. All rights reserved.
'Web: http://www.aspease.com
'Email: byhucn@126.com,lzz9812@163.com
'=========================================================
'
'FileName: losspass.asp
'Version:2.0
'UpdateTime: 2004-10-4 16:31:23
'Script Written by www.aspease.com
'=========================================================%>
<script language="javascript">
<!--
function isok(theform)
{
if (theform.newpass.value=="")
{
alert("请填写新密码!");
theform.newpass.focus();
return (false);
}
if (theform.renewpass.value=="")
{
alert("请填写确认密码!");
theform.renewpass.focus();
return (false);
}
if (theform.newpass.value != theform.renewpass.value)
{
alert("两次输入的密码不同!");
theform.newpass.focus();
return (false);
}
return (true);
}
-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -