📄 forgetpwd.inc
字号:
<%
'************************************************************************************************
' 函数名 : FrmInputAccountid()
' 输 入 : 无
' 输 出 : 一张表单,输入用户名,可以提交
' 功能描述: 输入用户名,提交以后,在frmInputAnswer判断是否存在该用户,如果存在,则显示用户密码提示问题
' 调用模块: forgetpwd.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-08-07
' 版 本 :
'************************************************************************************************
function frmInputAccountid()
frmInputAccountid=_
"<form name=""frmInputAccountid"" action=""forgetpwd.asp"" method=""post""> " & _
"<table cellspacing=0 cellpadding=0 border=0 width=""350"" align=center background=""../images/bg/btmtx.gif"">" & _
"<tr height=""10px""><td> </td></tr>"&_
"<tr height=""25px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:black"">" &_
" 请输入用户名: "&_
" <input type=""text"" name=""accountid"" style=""border:solid 1px gray;font-size:9pt"" size=30 maxlength=20>"&_
"<tr height=""1px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:black"">" &_
" <input type=hidden name=""flag"" value=1>"&_
"<tr height=""45px"">"&_
" <td colspan=3 align=center>"&_
" <img border=0 style=""cursor:hand""src=""../images/button/ok.gif"" name=""btnOk1"">"&_
" "&_
" <img border=0 style=""cursor:hand"" src=""../images/button/clear.gif"" name=""btnClear1"">"&_
" "&_
" <img border=0 style=""cursor:hand"" src=""../images/button/cancel.gif"" name=""btnCancel"">"&_
" </td>"&_
"<tr height=""40px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:white"" align=center>上海市电信公司信息世界分公司<br> ©All rights reserved by Shanghai Telecommunication company information world Branch</td></tr>"&_
"</table></form>"
end function
'************************************************************************************************
' 函数名 : FrmInputAnswer()
' 输 入 : 无
' 输 出 : 一张表单,提供相应用户的密码提示问题,输入密码提示问题的答案,可以提交
' 功能描述: 输入答案,在frmAnswer中判断是否正确,如果正确,则显示登录密码
' 调用模块: forgetpwd.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-08-07
' 版 本 :
'************************************************************************************************
Function FrmInputAnswer()
dim sSQL, rs
dim flag
flag=0
dim sTemp, sTempButtons, sQuestion
sSQL = "select * from T_account where account_id = "& Tosql(sAccountid,"text")
dim conn:set conn=DBConnection
set rs=OpenRs(conn, sSQL)
if Not rs.EOF then
sQuestion = getvalue(rs,"question")
if sQuestion = "" then
flag=1
else
frmInputAnswer=_
"<form name=""frmInputAnswer"" action=""forgetpwd.asp"" method=""post""> " & _
"<table cellspacing=0 cellpadding=0 border=0 width=""350"" align=center background=""../images/bg/btmtx.gif"">" & _
"<tr height=""10px""><td> </td></tr>"&_
"<tr height=""25px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:black"">" &_
" 您的提示问题: "&Tohtml(sQuestion)&_
"<tr height=""25px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:black"">" &_
" 请输入答案: "&_
" <input type=""text"" name=""answer"" style=""border:solid 1px gray;font-size:9pt"" size=30 maxlength=20>"&_
"<tr height=""1px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:black"">" &_
" <input type=hidden name=""flag"" value=2>"&_
" <input type=hidden name=""accountid"" value="""&sAccountid&""">"&_
"<tr height=""20px"">"&_
" <td colspan=3 align=center>"&_
" <img border=0 style=""cursor:hand""src=""../images/button/ok.gif"" name=""btnOk2"">"&_
" "&_
" <img border=0 style=""cursor:hand"" src=""../images/button/clear.gif"" name=""btnClear2"">"&_
" "&_
" <img border=0 style=""cursor:hand"" src=""../images/button/cancel.gif"" name=""btnCancel"">"&_
" </td>"&_
"<tr height=""40px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:white"" align=center>上海市电信公司信息世界分公司<br> ©All rights reserved by Shanghai Telecommunication company information world Branch</td></tr>"&_
"</table>"
end if
else
flag=2
end if
CloseRs(rs)
Disconnect(conn)
if flag=1 then
response.write "<script language=""javascript"">alert('对不起,您没有设置密码提示问题,不能取回密码!')</script>"
response.write "<script language = vbscript>history.go(-1)</script>"
elseif flag =2 then
response.write "<script language=""javascript"">alert('对不起,不存在该用户!')</script>"
response.write "<script language = vbscript>window.navigate(""forgetpwd.asp"")</script>"
end if
end function
'************************************************************************************************
' 函数名 : FrmAnswer()
' 输 入 : 无
' 输 出 : 一张表单,判断用户输入的答案,如果正确,则显示用户密码
' 功能描述: 显示登录密码
' 调用模块: forgetpwd.asp
' 作 者 : 蔡晓燕
' 日 期 : 2002-08-07
' 版 本 :
'************************************************************************************************
Function FrmAnswer()
dim sSQL, rs,flag
dim sTemp, sTempButtons, sAnswerold, sPwd
sSQL = "select * from T_account where account_id = "& Tosql(sAccountid,"text")
flag=0
dim conn:set conn=DBConnection
set rs=OpenRs(conn, sSQL)
if not rs.eof then
sAnswerold = rs("answer")
sPwd = rs("password")
if sAnswer = sAnswerold then
frmAnswer=_
"<form name=""frmAnswer"" action=""forgetpwd.asp"" method=""post""> " & _
"<table cellspacing=0 cellpadding=0 border=0 width=""350"" align=center background=""../images/bg/btmtx.gif"">" & _
"<tr height=""10px""><td> </td></tr>"&_
"<tr height=""25px"">"&_
" <td colspan=3 align=center style=""font-family:Arial, Helvetica, sans-serif;color:black"">" &_
" 您的登录密码: "&Tohtml(sPwd)&_
"<tr height=""25px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:black"">" &_
" "&_
"<tr height=""1px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:black"">" &_
" <input type=hidden name=""flag"" value=2>"&_
"<tr height=""20px"">"&_
" <td colspan=3 align=center>"&_
" <img border=0 style=""cursor:hand""src=""../images/button/ok.gif"" name=""btnCancel"">"&_
" </td>"&_
"<tr height=""40px"">"&_
" <td colspan=3 style=""font-family:Arial, Helvetica, sans-serif;color:white"" align=center>上海市电信公司信息世界分公司<br> ©All rights reserved by Shanghai Telecommunication company information world Branch</td></tr>"&_
"</table>"
else
flag=1
end if
else
flag=2
end if
CloseRs(rs)
Disconnect(conn)
if flag=1 then
response.write "<script language=""javascript"">alert('对不起,您输入的答案错误!')</script>"
response.write "<script language = vbscript>history.go(-1)</script>"
' elseif flag=2 then
response.write "<script language=""javascript"">alert('对不起,不存在该用户!')</script>"
response.write "<script language = vbscript>window.navigate(""forgetpwd.asp"")</script>"
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -