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

📄 edit_massage.asp

📁 办公系统的公文处理
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="md5.inc"-->
<%if session("admin")<>true then response.redirect("list.asp") end if%>
<%
  doing=request.querystring("doing")
  
  '修改密码
  if doing="change_pass" then
       old_pass=trim(request.form("old_pass"))
	   pass1=trim(request.form("pass1"))
	   pass2=trim(request.form("pass2"))
	   if old_pass="" or pass1="" or pass2="" then
	      msg="密码值不能为空"
	   else
	      if pass1<>pass2 then
		      msg="二次新密码不相同"
		  else
		      user=session("user")
			  user_name=session("user_name")
			  old_pass=ucase(md5(old_pass))
		      str="select * from user where 用户名='"&user&"' and 单位='"&user_name&"' and 密码='"&old_pass&"'"
			  set rs=conn.execute(str)
			  if rs.eof then
			      msg="无此用户或原密码错"
			  else
			      pass1=ucase(md5(pass1))
				  str="update user set 密码='"&pass1&"' where 用户名='"&user&"' and 单位='"&user_name&"'"
				  conn.execute(str)
				  msg="密码已修改,请牢记密码"
				  doing=""
			  end if
		  end if
	   end if
  end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改用户密码</title>
<!--#include file="css.css"-->
</head>
<body topmargin="1">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="90"><!--#include file="top.asp"--></td></td>
  </tr>
</table>
 
      <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#98a5d0">
        <tr>
          <td width="140" valign="top"><!--#include file="left.asp"--></td>
          <td width="620" valign="top">
		 <br>
		  <table width="550" height="20" border="0" align="center" cellspacing="1" class="unnamed12">
			<%
    temp1=session("user")
	temp2=session("user_name")
	str="select * from user where 用户名='"&temp1&"' and 单位='"&temp2&"'"
	set rs=conn.execute(str)
 %>
              <form name="form2" method="post" action="edit_massage.asp?doing=change_pass">
                <tr bgcolor="#ffcc99" class="unnamed14">
                  <td width="159" height="30" align="center">用 户 名:</td>
                  <td width="384">  <%=session("user")%></td>
                </tr>
                <tr bgcolor="#FFFFFF" class="unnamed14">
                  <td height="30" align="center">用户单位:</td>
                  <td>  <%=session("user_name")%> </td>
                </tr>
                <tr bgcolor="#ffcc99" class="unnamed14">
                  <td  height="30" align="center">原 密 码:</td>
                  <td> 
                  <input name="old_pass" type="password" id="old_pass"></td>
                </tr>
                <tr bgcolor="#FFFFFF" class="unnamed14">
                  <td  height="30" align="center">新 密 码:</td>
                  <td> 
                  <input name="pass1" type="password" id="pass1"></td>
                </tr>
                <tr bgcolor="#ffcc99" class="unnamed14">
                  <td  height="30" align="center">验证密码:</td>
                  <td> 
                  <input name="pass2" type="password" id="pass2"></td>
                </tr>
                <tr bgcolor="#FFFFFF" class="unnamed14">
                  <td height="40" colspan="2"><div align="center">
                      <input type="submit" name="Submit3" value=" 修 改 ">
            
          <input type="reset" name="Submit4" value=" 重 填 ">
                  </div></td>
                </tr>
              </form>
          </table>
            <table align="center">
              <tr class="unnamed14">
                <td height="40" colspan="2"><div align="center"> <span class="unnamed14h20"><font color="#FF0000">
                    <%if msg<>"" then response.write msg end if%>
                      
                </font></span> </div></td>
              </tr>
            </table>
		  </td>
        </tr>
      </table>
      <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include file="bottom.asp"--></td>
  </tr>
</table>
<%conn.close%>
</body>
</html>

⌨️ 快捷键说明

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