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

Jsp/Servlet

开发平台:

Java

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <%
  3. %><!--#include file="manage/inc/config.asp"--> 
  4. <!--#include file="inc/conn.asp"--> 
  5. <!--#include file="inc/chk.asp"--> 
  6. <%
  7. if NOT isempty(request("ChangePwsSubmit")) then
  8. dim username
  9. username=request.cookies(cookieName)("username")
  10. set rs=server.CreateObject("adodb.recordset")
  11. rs.open "select password from [user] where username='"&username&"'",conn,1,3
  12. if md5(trim(request("password")))<>trim(rs("password")) then
  13. call MsgBox("对不起,您输入的原密码错误!","Back","None")
  14. else
  15. rs("password")=md5(trim(request("password1")))
  16. rs.update
  17. rs.close
  18. set rs=nothing
  19. call MsgBox("密码更改成功!","none","none")
  20. end if
  21. end if
  22. %>
  23. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  24. <html>
  25. <head>
  26. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  27. <title>东区网上书店</title>
  28. <link href="style.css" rel="stylesheet" type="text/css">
  29. </head>
  30. <body>
  31. <!--#include file="head.htm"-->
  32. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  33.   <tr>
  34.     <td width="219" align="left" valign="top"><!--#include file="uleft.asp"-->      <br></td><td width="561" align="left" valign="top">
  35.       <br>      <table border="0" cellpadding="0" cellspacing="0">
  36.         <tr>
  37.           <td><img src="images/w.gif" width="18" height="18"></td>
  38.           <td style="color:#415373">修改密码</td>
  39.         </tr>
  40.       </table>      <br>      <form name="form1" method="post" action="">
  41.         <table  border="0" align="center" cellpadding="3" cellspacing="3">
  42.           <tr>
  43.             <td>旧密码:</td>
  44.             <td><input name="password" type="password" id="password"></td>
  45.           </tr>
  46.           <tr>
  47.             <td>新密码:</td>
  48.             <td><input name="password1" type="password" id="password1"></td>
  49.           </tr>
  50.           <tr>
  51.             <td>确 认:</td>
  52.             <td><input name="password2" type="password" id="password2"></td>
  53.           </tr>
  54.           <tr align="center">
  55.             <td colspan="2"><input name="ChangePwsSubmit" type="submit" id="ChangePwsSubmit" value="确认"></td>
  56.           </tr>
  57.         </table>
  58.       </form>      <br>
  59.       </td>
  60.   </tr>
  61. </table>
  62. <!--#include file="foot.htm"-->
  63. </body>
  64. </html>