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

📄 user_chpass.asp

📁 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会
💻 ASP
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=true
Response.Expires=0
%>
<!-- #include file="../dsn.asp" -->
<!-- #include file="init.inc" -->
<%
userno=Request.QueryString("userno")
if userno="" then
	userno=Session("userno")
else
	if Session("userqx")>="1" and Session("userqx")="9" then
	else
		userno=Session("userno")
	end if	
end if		
if userno="" then Response.Redirect "login.asp"

myurl="user_chpass.asp?userno="&userno
backurl="user_center.asp?userno="&userno&"&xgflag=1"
tablename="userinfo"
set cn = Server.CreateObject("ADODB.Connection")
cn.Open(mycnstr)
set rs = Server.CreateObject("ADODB.Recordset")
set rs2 = Server.CreateObject("ADODB.Recordset")
bz=1
if Request.ServerVariables("REQUEST_METHOD")="POST" then
	bz=0
	email=trim(Request.Form("email"))
	userpass=trim(Request.Form("userpass"))

	if bz=0 then
		rs.Open "select * from "+tablename+" where userno="&userno,cn,3,3

		rs("email")=email
		if userpass<>"" then
			rs("userpass")=userpass
		end if	
		rs("updatetime")=now()
		rs.Update
		Response.Write("<script language=Javascript>")
		Response.Write("window.location.href='"+backurl+"'")
		Response.Write("</script>")
		
	end if
else
		sqltext="select * from userinfo where userno="&userno
		rs.Open sqltext,cn,1,1
		if not rs.EOF then
			usercode=trim(rs("usercode"))
			realname=trim(rs("realname"))
			email=trim(rs("email"))
			userpass=trim(rs("userpass"))
		end if
		mytitle=realname
end if	
%>
<!-- #include file="begin.asp" -->  

<%if bz=1 then%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="10"></td>
  </tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="center"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td valign="top"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="30">
              <tr> 
                <td width="20">&nbsp;</td>
                <td>欢迎光临<%=forumtitle%></td>
                <td width="10">&nbsp;</td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="30"  bgcolor="<%=barcolor%>">
              <tr> 
                <td width="10">&nbsp;</td>
                <td width=30 align=center><img src="images/homeflag.gif"></td>
                <%if classflag="1" then%>
                <td><a href="forum.asp"><%=forumtitle%></a>  &gt; 我的主页 &gt; 密码修改</td>
                <%else%>
                <td><a href="forum_list.asp"><%=forumtitle%></a> &gt; 我的主页 &gt; 密码修改</td>
                <%end if%>
                <td width="100" align="right"></td>
                <td width="10">&nbsp;</td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td height="6"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr bgcolor="<%=titlebgcolor%>"> 
				<td height="26" width=30></td>
                <td width=80 align="center"><b><a href="user_center.asp?userno=<%=userno%>" class=a01><font color=<%=titlecolor%>>我的主页</font></a></b></td>
                <td width=80 align="center"><b><a href="user_myedit.asp?userno=<%=userno%>" class=a01><font color=<%=titlecolor%>>资料修改</font></a></b></td>
                <td width=80 align="center"><b><a href="user_chpass.asp?userno=<%=userno%>" class=a01><font color=<%=titlecolor%>>密码修改</font></a></b></td>
                <td>&nbsp;</td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td height="6"></td>
              </tr>
            </table>
            <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr bgcolor="<%=titlebgcolor%>"> 
				<td height="26" width=30></td>
                <td align="center"><b><font color=<%=titlecolor%>>密码修改</font></b></td>
                <td>&nbsp;</td>
              </tr>
            </table>
            <table width="90%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=tablecolor%>">
			<form action="<%=myurl%>" method=post name=editform onsubmit="return checkform(editform)" autocomplete = "off">
				<tr bgcolor="#ffffff"> 
 					<td width=120 height=30 align=center>会员代号:</td>
					<td>&nbsp;
						<%=usercode%>(<%=realname%>)
					</td>
				</tr>
				<tr bgcolor="#ffffff"> 
 					<td width=120 height=30 align=center>新 密 码:</td>
					<td>&nbsp;
						<input type=password name=userpass size=20  maxlength=20><font color=red size=1>*</font>
						<font color="#993300">建议密码由字母与数字混合组成,长度不少于6位。</font>
					</td>
				</tr>
				<tr bgcolor="#ffffff"> 
 					<td width=120 height=30 align=center>确认密码:</td>
					<td>&nbsp;
						<input type=password name=userpass2 size=20  maxlength=20>
						<font color="#993300">确认上面输入的密码。</font>
					</td>
				</tr>
				<tr bgcolor="#ffffff"> 
 					<td width=120 height=30 align=center>电子信箱:</td>
					<td>&nbsp;
						<input type=text name=email size=30 maxlength=60 value="<%=email%>"><font color=red size=1>*</font>
						<font color=993300>请正确填写电子信箱。当您忘记密码时,我们将密码发送到此信箱中</font>
					</td>
				</tr>
                <tr bgcolor="#e4f4e9"> 
					<td height="40" align="center"><br>
					</td>
					<td align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="submit" name="submit" value="确认更新" style="width:75px; height:24px">
					</td>
				</tr>
              </form>
	        </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td height="15"></td>
              </tr>
            </table>
		  </td>
		</tr>	
 	 </table>
	</td>
  </tr>	
</table>
<!-- #include file="end.asp" -->

<script language=Javascript>

	function checkform(form)
	{
		var flag=true;
		return flag;
	}
	
</script>
<%end if%>

⌨️ 快捷键说明

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