repws.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. if request("username")="" then 
  7. call MsgBox("非法使用!","Back","None")
  8. response.end
  9. end if 
  10. dim tmp
  11. set rs=server.CreateObject("adodb.recordset")
  12. '提交修改密码
  13. if not isempty(request("SubmitRePws"))  then
  14. if request("password")<>request("password2") then call MsgBox("再次输入密码不一致!","Back","None")
  15. rs.open "select password from [user] where username='"&trim(request("username"))&"'",conn,1,3
  16. rs("password")=md5(trim(request("password2")))
  17. rs.update
  18. rs.close
  19. call MsgBox("您的密码取回成功,请登录!","GoUrl","login.asp")
  20. response.end
  21. end if
  22. rs.open "select answer from [user] where username='"&trim(request("username"))&"' ",conn,1,1
  23. tmp=trim(rs("answer"))
  24. rs.close
  25. if tmp<>md5(request("answer")) then
  26. call Msgbox("对不起,您输入的问题答案不正确","Back","None")
  27. response.end
  28. end if
  29. set rs=nothing
  30. %>
  31. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  32. <html>
  33. <head>
  34. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  35. <title>406网络书店</title>
  36. <link href="style.css" rel="stylesheet" type="text/css">
  37. </style>
  38. <!-- European format dd-mm-yyyy -->
  39. <script language="JavaScript" src="calendar.js"></script>
  40. </head>
  41. <body>
  42. <!--#include file="head.htm"-->
  43. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  44.   <tr>
  45.     <td height="300" align="left" valign="top">
  46.       <br>      <br>      <br>      <FORM name=frmdata  method=post action="">
  47.           <table border=0 align="center" cellpadding=0 cellspacing=5>
  48.             <tbody>
  49.               <tr align="left">
  50.                 <td colspan="2"><table cellpadding="0" cellspacing="0" border="0">
  51.                     <tr>
  52.                       <td><img src="images/w.gif"></td>
  53.                       <td style="color:#415373">取回密码</td>
  54.                     </tr>
  55.                   </table>
  56.                     <br></td>
  57.               </tr>
  58.               <tr>
  59.                 <td width="108"  align=right>请输入新密码:</td>
  60.                 <td width="276"  align=left><input type="password" name="password">
  61.                 </td>
  62.               </tr>
  63.               <tr>
  64.                 <td  align=right>请确认新密码:</td>
  65.                 <td  align=left><input type="password" name="password2">
  66.                 </td>
  67.               </tr>
  68.               <tr>
  69.                 <td colspan="2"  align=center><input name="SubmitRePws" type="submit" id="Submit" value="提交">
  70.                   <input name="username" type="hidden" id="username" value="<%=request("username")%>">
  71.                 </td>
  72.               </tr>
  73.           </table>
  74.           <br>
  75.           <br>
  76.         </FORM>
  77. </td>
  78.   </tr>
  79. </table>
  80. <!--#include file="foot.htm"-->
  81. </body>
  82. </html>