⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chkpass.asp

📁 仓库管理系统 不错的 大家都来看一下
💻 ASP
字号:
<%response.buffer=true%>
<html>
<head>
<%const title="修改密码"%>
<title><%=title%></title>
<link rel="stylesheet" type="text/css" href="forum.css">
</head>
<body topmargin=0 onload=this.document.input.old_pass.focus()>
<!--#include file=opendb.inc-->
<!--#include file=myprg.asp-->
<%showtitle(title)%>
<%getstorage(session("storage"))%>
<form method=post action=chkpass.asp name=input>
<table align=center border='0' height='40' cellspacing='1' cellpadding='1' bordercolordark='#FFFFFF' bordercolorlight='#DADBFC' bordercolor='#00000'>
  <tr><td align=right>原密码:</td><td><input class=smallinput type=password name=old_pass value=""></td></tr>
  <tr><td align=right>新密码:</td><td><input class=smallinput  type=password name=new_pass value=""></td></tr>
  <tr><td align=right>校验密码:</td><td><input class=smallinput  type=password name=confirm_pass value=""></td></tr>
  <tr><td align=center colspan=2>
   <br>  
   <input  class=smallinput type=submit name=ok value= 确  定 >
   <input  class=smallinput type=reset name=reset value= 清 除 >
   <input  class=smallinput type=button name=retu onclick=history.go(-1) value=" 返 回 ">
  </td></tr>
</table>
</form>
</body>
<!-- #include file=copyright.asp-->
</html>

<%
if Request.ServerVariables("REQUEST_METHOD")="POST" then
sql="select * from user where username='"&session("username")&"' and password='"&request.form("old_pass")&"'"
rs.open sql,conn,3,2
if not rs.eof then
   if request.form("new_pass")=request.form("confirm_pass") then
      rs("password")=request.form("new_pass")
      rs.update
      showsuccess "密码修改成功!"
   else
     showerror "新密码和检验密码不一致,请重新输入!"
   end if
else
     showerror "原密码错误!"
end if
rs.close
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -