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

📄 modifypass.asp

📁 公文下发和上报管理:   在发布和上报文件时
💻 ASP
字号:
<!--#include file="asp/opendb.asp"-->

<script LANGUAGE="JavaScript"> 
<!-- 
window.moveTo((screen.width-350)/2, (screen.height-150)/2) 
//--> 
</script> 
<%
username=request("username")
if request("submit")="确定" then
oldpass=request("oldpass")
newpass=request("newpass")
newpass2=request("newpass2")
if newpass<>newpass2 then
response.write "输入两次新密码不相同,请重新输入"
response.end
end if
set conn=opendb("oabusy","conn","accessdsn")
Set rs=Server.CreateObject("ADODB.recordset")
sql="select * from userinf where username='"&username&"'"
rs.Open sql,conn,1,3
if rs("password")=oldpass then
rs("password")=newpass
rs.Update 
Response.Write "密码修改成功"
else
Response.Write "密码出错"

end if
rs.Close
set rs=nothing
conn.close
set conn=nothing
Response.End 
end if
%>
<html>
<head>
<title>修改<%=username%>密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK 
href="img/Forum.css" type=text/css rel=stylesheet>
</head>
<body bgcolor="#FEF7ED" topmargin="0" leftmargin="0" background="#FEF7ED">
<form name="form1" method="post" action="modifypass.asp">
  <br><center>修改密码</br>
  <table width="86%" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#FEF7ED" bordercolor="#CCCCCC">
    <tr> 
      <td width="33%"><b><font color="#0000FF">用户名</font></b></td>
      <td width="67%"><%=username%> 
        <input type="hidden" name="username" value=<%=username%>>
      </td>
    </tr>
    <tr> 
      <td width="33%">请输入旧密码</td>
      <td width="67%"> 
        <input type="password" name="oldpass">
      </td>
    </tr>
    <tr> 
      <td width="33%">请输入新密码</td>
      <td width="67%"> 
        <input type="password" name="newpass">
      </td>
    </tr>
    <tr> 
      <td width="33%">输入确认密码</td>
      <td width="67%"> 
        <input type="password" name="newpass2">
      </td>
    </tr>
    <tr> 
      <td colspan="2"> 
        <div align="center"> 
          <input type="submit" name="Submit" value="确定">
          <input type="reset" name="Submit2" value="重写">
        </div>
      </td>
    </tr>
  </table>
  <div align="left"></div>
</form>
</body>
</html>

⌨️ 快捷键说明

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