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

📄 modifyuserpwd.asp

📁 SUZI网络订房系统
💻 ASP
字号:
<%
if request.cookies("userloginok")="" then
  response.redirect "login.htm"
end if
%>
<!--#include file="conn.asp"-->
<%
if request("action")="update" then
	set rs_pwd=server.createobject("adodb.recordset")
	sqlpwd="select * from userb where userid='"&request("uid")&"' and password='"&request("OldPwd")&"'"
	rs_pwd.open sqlpwd,conn,1,1
	if rs_pwd.recordcount=0 then
%>
		<script language="vbscript">
			<!--
  			window.alert"您输入的密码不正确!"
  			window.history.go(-1)
			//-->
		</script>
<%
	else
	rs_pwd.close
	set rs_userinfo=server.createobject("adodb.recordset")
	sqltext="select * from userb where userid='"&request("uid")&"'"
	rs_userinfo.open sqltext,conn,3,3
	
	rs_userinfo("password")=request("pwd")
	
	rs_userinfo.update
	rs_userinfo.close
	conn.close
%>
	<script language="vbscript">
	<!--
	  window.alert"恭喜,口令修改成功!"
	  window.history.go(-1)
	//-->
	</script>
<%
	end if
else

dim uid ,upwd
uid=trim(Request("uid"))
set rs=server.createobject("adodb.recordset")
sqltext="select * from userb where userid='" & uid & "'"
rs.open sqltext,conn,1,1
%><html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="style.css" type="text/css">
<title>修改Email地址</title>
<SCRIPT language=JavaScript>

	<!--//

	function pwdform_onsubmit() {
		var r1
		r1 = new RegExp("[^A-Za-z0-9]", "");
		if (document.pwdform.OldPwd.value.length == 0) {
			window.alert("请输入旧口令!");
			document.pwdform.OldPwd.focus();
		}
		else if (document.pwdform.Pwd.value.length < 4) {
			window.alert("口令不得少于4个字符!!");
			document.pwdform.Pwd.select();
			document.pwdform.Pwd.focus();
		}
		else if (document.pwdform.Pwd2.value != document.pwdform.Pwd.value) {
			window.alert("两次输入的口令不一致!!");
			document.pwdform.Pwd2.select();
			document.pwdform.Pwd2.focus();
		}
		else {
			return true;
		}
		return false;
	}


	//-->
	</SCRIPT>

</head>

<body>

<p> </p>
<div align="center">
  <center>
  <table border="0" cellspacing="0" width="95%" height="234">
    <tr>
      <td width="100%" height="3" valign="top" colspan="3">
        <hr color="#FF0000" size="1">
      </td>
    </tr>
    <tr>
      <td width="24%" height="232" valign="top" bgcolor="#6688CC">
        <div align="center">
          <table border="0" width="100%" cellpadding="3" class=main1>
            <tr>
              <td width="7%"></td>
              <td width="93%"><a href="UserInfo.asp?uid=<%=rs("userid")%>">查询个人资料</a></td>
            </tr>
            <tr>
              <td width="7%"></td>
              <td width="93%"><a href="ModifyUserInfo.asp?uid=<%=rs("userid")%>">修改个人资料</a></td>
            </tr>
            <tr>
              <td width="7%"></td>
              <td width="93%"><a href="ModifyUserEmail.asp?uid=<%=rs("userid")%>">修改Email地址</a></td>
            </tr>
            <tr>
              <td width="7%"></td>
              <td width="93%"><a href="ModifyUserPwd.asp?uid=<%=rs("userid")%>">修改口令</a></td>
            </tr>
            <tr>
              <td width="7%"></td>
              <td width="93%"><a href="OrderInfo.asp?uid=<%=rs("userid")%>">订单修改&amp;查询</a></td>
            </tr>
            <tr>
              <td width="7%"></td>
              <td width="93%"></td>
            </tr>
            <tr>
              <td width="7%"></td>
              <td width="93%"></td>
            </tr>
            <tr>
              <td width="7%"></td>
              <td width="93%"></td>
            </tr>
          </table>
        </div>
      </td>
      <td width="2%" height="232"></td>
      <td width="74%" height="232" valign="top">
        <div align="center">
        <FORM name=pwdform onsubmit="return pwdform_onsubmit();" 
        action=ModifyUserPwd.asp method=post>
        <input type=hidden name=uid value=<%=rs("userid")%>>
        <input type=hidden name=action value="update">
          <table border="0" cellpadding="3" width="100%" class=main1 cellspacing="1" height="269">
            <tr>
              <td width="100%" bgcolor="#1F60A0" colspan="2" height="15"><font class="medium" color="white"><b>会员服务                 
                &gt;&gt; 修改口令</b></font></td>                   
            </tr>
            <tr>
              <td width="100%" colspan="2" height="28">
                </td>
            </tr>
            <tr>
              <td width="100%" bgcolor="#1F60A0" colspan="2" height="15"><font class="medium" color="#ffffff">更改口令</font></td>
            </tr>
            <tr>
              <td width="21%" align="right" bgcolor="#EFEFEF" height="22"><font class="medium"><span class="medium">旧口令</span></font><font class="medium">:</font></td>
              <td width="79%" height="22"><INPUT TYPE="PASSWORD" NAME="OldPwd" MAXLENGTH="20" CLASS="medium" style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 147; border: 1 solid black"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size="20"> 
              </td>
            </tr>
            <tr>
              <td width="21%" align="right" bgcolor="#EFEFEF" height="61"><font class="medium">新口令:</font></td>
              <td width="79%" height="61"><INPUT TYPE="PASSWORD" NAME="Pwd" MAXLENGTH="20" CLASS="medium" style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 147; border: 1 solid black"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size="20"> 
                <br>
                <br>
                <font color="#cc0000"><b>可使用任何英文字母及阿拉伯数字组合,密码不得少于4个字符</b></font><font color="#666666">,例如:Harrison168P。</font> 
              </td>
            </tr>
            <tr>
              <td width="21%" align="right" bgcolor="#EFEFEF" height="22">
              <span class="medium">再输一遍口令</span><font class="medium">:</font></td>
              <td width="79%" height="22"><INPUT TYPE="PASSWORD" NAME="Pwd2" MAXLENGTH="20" CLASS="medium" style="font-family: 新细明体, 宋体, Arial; font-size: 14px; height: 20; background-color: #f3f3f3; width: 147; border: 1 solid black"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size="20"> 
              </td>
            </tr>
  </center>
            <tr>
              <td width="100%" align="right" colspan="2" height="15">
                <p align="left"></td>
            </tr>
            <tr>
              <td width="100%" align="right" colspan="2" height="27">
                <p align="center"><input type=submit value=递交 class=medium name=submitReg>
<input type=reset value=重填 class=medium name=resetReg></td> 
            </tr>
  <center>
            
          </table>
          </form>
        </div>
      </center>
  </table>

</body>

<%
rs.close
conn.close
end if
%>

⌨️ 快捷键说明

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