📄 user_option.asp
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=true
Response.Expires=0
%>
<!-- #include file="../dsn.asp" -->
<%
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("realname"))
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">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="30" bgcolor="#F5EBCC">
<tr>
<td width="10"> </td>
<%if classflag="1" then%>
<td><%=forumtitle%> > <%=classname%></td>
<%else%>
<td><%=forumtitle%> > <a href="forum_list.asp?classcode=<%=classcode%>"><%=classname%></a> > 阅读帖子</td>
<%end if%>
<td width="100" align="right">
</td>
<td width="10"> </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 width=80 align="center"><b><a href="user_option.asp?userno=<%=userno%>" class=a01><font color=<%=titlecolor%>>个人选项</font></a></b></td>
<td> </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 align="center"><b><font color=<%=titlecolor%>>个人选项设置</font></b></td>
<td> </td>
</tr>
</table>
<table width="100%" 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>
<%=usercode%>(<%=realname%>)
</td>
</tr>
<tr bgcolor="#ffffff">
<td width=120 height=30 align=center>回帖通知:</td>
<td>
<input type=password name=userpass size=20 value='<%=userpass%>' 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>Cookie保留时间:</td>
<td>
<input type=password name=userpass size=20 value='<%=userpass%>' maxlength=20>
<font color="#993300">确认上面输入的密码。</font>
</td>
</tr>
<tr bgcolor="#ffffff">
<td width=120 height=30 align=center>基本资料公开:</td>
<td>
<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="#ffffff">
<td width=120 height=30 align=center>真实资料公开:</td>
<td>
<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">
<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;
if(form("userpass").value==""){alert("密码不能为空!");form("userpass").focus();return false;}
if(form("userpass2").value!=form("userpass").value){alert("两次密码不一致!");
form("userpass").value=""; form("userpass2").value="";form("userpass").focus();return false;}
return flag;
}
</script>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -