forget.asp
上传用户:syzzy1975
上传日期:2022-07-17
资源大小:670k
文件大小:3k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <%
  3. %><!--#include file="manage/inc/config.asp"--> 
  4. <!--#include file="inc/conn.asp"--> 
  5. <%
  6. dim tmp,step,usernamee
  7. step=request("step")
  8. '第二步传递变量
  9. if step=2  then 
  10. tmp=request.querystring("question")
  11. usernamee=request.querystring("usernamee")
  12. end if
  13. '确认是否存在此用户
  14. set rs=server.CreateObject("adodb.recordset")
  15. if not isempty(request("Submit")) and step=1 then
  16. rs.open "select quesion,answer from [user] where username='"&trim(request("username"))&"' ",conn,1,1
  17. if rs.eof and rs.bof then
  18. call MsgBox("查无此用户,请返回!","Back","None")
  19. response.end
  20. else
  21. response.redirect "forget.asp?step=2&question="&rs("quesion")&"&usernamee="&trim(request("username"))
  22. end if
  23. rs.close
  24. end if
  25. set rs=nothing
  26. %>
  27. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  28. <html>
  29. <head>
  30. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  31. <title>406网络书店</title>
  32. <link href="style.css" rel="stylesheet" type="text/css">
  33. </style>
  34. <!-- European format dd-mm-yyyy -->
  35. <script language="JavaScript" src="calendar.js"></script>
  36. </head>
  37. <body>
  38. <!--#include file="head.htm"-->
  39. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  40.   <tr>
  41.     <td height="300" align="left" valign="top">
  42.       <br>      <br>      <br>      <%if step=1 or step="" then%><FORM name=frmdata  method=post action="">
  43.         
  44.         <table border=0 align="center" cellpadding=0 cellspacing=5>
  45.           <tbody>
  46.             <tr align="left">
  47.               <td colspan="2"><table cellpadding="0" cellspacing="0" border="0">
  48.                 <tr>
  49.                   <td><img src="images/w.gif"></td>
  50.                   <td style="color:#415373">取回密码</td>
  51.                 </tr>
  52.               </table>
  53.               <br></td>
  54.             </tr>
  55.             <tr>
  56.               <td width="108"  align=right>请输入你的用户名:</td>
  57.               <td width="276"  align=left><input type="text" name="username">
  58.               <input type="submit" name="Submit" value="提交">
  59.               <input name="step" type="hidden" id="step" value="1"></td>
  60.             </tr>
  61.         </table>
  62. </form><%end if%>
  63. <%if step=2 then%><FORM name=frmdata  method=post action="repws.asp">
  64.         <table border=0 align="center" cellpadding=0 cellspacing=5>
  65.           <tbody>
  66.             <tr align="left">
  67.               <td colspan="2"><table cellpadding="0" cellspacing="0" border="0">
  68.                   <tr>
  69.                     <td><img src="images/w.gif"></td>
  70.                     <td style="color:#415373">取回密码</td>
  71.                   </tr>
  72.                 </table>
  73.                   <br></td>
  74.             </tr>
  75.             <tr>
  76.               <td width="108"  align=right>您的密码提问:</td>
  77.               <td width="276"  align=left><%=tmp%></td>
  78.             </tr>
  79.             <tr>
  80.               <td  align=right>您的密码答案:</td>
  81.               <td  align=left><input type="password" name="answer">              </td>
  82.             </tr>
  83.             <tr>
  84.               <td colspan="2"  align=center><input name="Submit" type="submit" id="Submit" value="提交">
  85.               <input name="username" type="hidden" id="username" value="<%=usernamee%>">              </td>
  86.             </tr>
  87.           </table>
  88.         <br>
  89.         <br>
  90.       </FORM><%end if%>
  91. </td>
  92.   </tr>
  93. </table>
  94. <!--#include file="foot.htm"-->
  95. </body>
  96. </html>