📄 edituserinfo.asp
字号:
<TABLE border=0 class=font width="100%" cellpadding="0" cellspacing="8">
<TR>
<TD width="150" height="25" align=center class="tar"> <p>*你的密码: </TD>
<TD width="80%" height="25"> <input name="txl_password1" type=password class=fminpt id="txl_password1" size=15 maxLength=15>
(<font color="gray">如果要修改密码,请在这里填入密码,前后空格无效</font>) </TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>*验证密码: </TD>
<TD height="25"> <input name="txl_password2" type=password class=fminpt id="txl_password2" size=15 maxlength=15>
(<font color="gray">请填入刚才输入的密码</font>) </TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>*电子邮件: </TD>
<TD height="25"> <input name=txl_email class=fminpt id="txl_email" value="<%=rs("email")%>" size=36 maxLength=40>
(<font color="gray">请填入常用的邮箱,这个将是您的密码保密邮箱</font>) </TD>
</TR>
<TR>
<TD height="25" align=center class="tar">*真实姓名:</TD>
<TD height="25"><input name="txl_truename" type=text class=fminpt id="txl_truename" value="<%=rs("sname")%>" size=14 maxlength=20>
(<font color="gray">真实姓名请填写中文</font>) </TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>*密码提示: </TD>
<TD height="25"> <input name=txl_question class=fminpt id="txl_question" value="<%=rs("pwdquest")%>" size=36 maxLength=30>
</TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>*提示答案: </TD>
<TD height="25"> <input name=txl_answer class=fminpt id="txl_answer" value="<%=rs("pwdanswer")%>" size=36 maxlength=30>
</TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>QQ号码: </TD>
<TD height="25"> <input name=txl_oicq class=fminpt id="txl_oicq" onkeyup='this.value=this.value.replace(/\D/gi,"")' value="<%=rs("oicq")%>" size=15 maxlength=15>
(<font color="gray">如果没有QQ号码请填入8个0</font>) </TD>
</TR>
<TR bgcolor="#D8D6ED">
<TD height="25" colspan="2" align=center bgcolor="#CCCCCC"><font color="#000000">为了联系方便,请仔细填写以下信息,此信息对班级好友及游客保密</font></TD>
</TR>
<TR>
<TD height="25" align=center class="tar">家庭电话:</TD>
<TD height="25"><input name=txl_homephone class=fminpt id="txl_homeaddr3" value="<%=rs("homephone")%>" size=15 maxlength=20></TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>家庭地址: </TD>
<TD height="25"> <input name=txl_homeaddr class=fminpt id="txl_homeaddr" value="<%=rs("homeaddr")%>" size=36 maxlength=50>
</TD>
</TR>
<TR>
<TD height="25" align=center class="tar">家庭邮编:</TD>
<TD height="25"><input name=txl_homezip class=fminpt id="txl_homezip" onKeyUp='this.value=this.value.replace(/\D/gi,"")' value="<%=rs("homezip")%>" size=6 maxlength=6></TD>
</TR>
<TR>
<TD height="25" align=center class="tar">目前联系号码:</TD>
<TD height="25"><input name=txl_newphone class=fminpt value="<%=rs("newphone")%>" size=15 maxlength=20></TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>目前地址: </TD>
<TD height="25"> <input name=txl_newaddr class=fminpt value="<%=rs("newaddr")%>" size=36 maxlength=50>
</TD>
</TR>
<TR>
<TD height="25" align=center class="tar">目前邮编:</TD>
<TD height="25"><input name=txl_newzip class=fminpt onkeyup='this.value=this.value.replace(/\D/gi,"")' value="<%=rs("newzip")%>" size=6 maxlength=6></TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>你的性别: </TD>
<TD height="25"> <select name="txl_sex" id="txl_sex">
<option value="男" <%If rs("sex")="男" then Response.Write("select")%>>男</option>
<option value="女" <%If rs("sex")="女" then Response.Write("select")%>>女</option>
</select> </TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>用户头像: </TD>
<TD height="25"> <input name=txl_userpic class=fminpt id="txl_userpic" readonly size=4 maxlength=4>
<span style='cursor:hand' title='查看头像代号' onclick="setface();">查看头像代号<%=showuserpic(rs("pic"),rs("picwidth"),rs("picheight"))%>
</span><select name="select" onChange="document.txlfrm.txl_FaceUrl.value=this.options[this.selectedIndex].value;document.all('faceimg').src='../'+this.options[this.selectedIndex].value">
<% Call DisplayFaceSelect%>
</select><span style='cursor:hand' title='上传头像' onclick="javascript:winsteps_open_window('uploadface.asp',520,150);return false;">上传头像</span></TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>头像地址: </TD>
<TD height="25"> <input name="txl_FaceUrl" type="text" class="fminpt" id="txl_FaceUrl" onChange="javascript:changeface2();" value="<%=rs("pic")%>" size="36">
<font color="gray">(网上图片填入完整的URL路径) </font></TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>头像大小: </TD>
<TD height="25"> 宽:
<input name=Form_FaceWidth class=fminpt id="txl_FaceWidth" onChange="javascript:changeface2();" value="<%=rs("picwidth")%>" size=3 >
(<%=facewidthmin%>-<%=facewidthmax%>) 高:
<input name=Form_FaceHeight class=fminpt id="txl_FaceHeight" onchange="javascript:changeface2();" value="<%=rs("picheight")%>" size=3 >
(<%=faceheightmin%>-<%=faceheightmax%>) </TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>你的生日: </TD>
<TD height="25" align="left"> <p>
<select name="txl_byear" id="txl_byear">
<% dim selected
for i=1950 to 2003
if i=1980 then
selected="selected"
else
selected=""
end if
Response.Write("<option value='"&i&"' "&selected&">"&i&"</option>")
next
%>
<option value="<%=year(rs("birthday"))%>" selected><%=year(rs("birthday"))%></option>
</select>
年
<select name="txl_bmonth" id="txl_bmonth">
<%for i=1 to 12
Response.Write("<option value='"&i&"'>"&i&"</option>")
next%>
<option value="<%=month(rs("birthday"))%>" selected><%=month(rs("birthday"))%></option>
</select>
月
<select name="txl_bday" id="select2">
<%for i=1 to 31
Response.Write("<option value='"&i&"'>"&i&"</option>")
next%>
<option value="<%=day(rs("birthday"))%>" selected><%=day(rs("birthday"))%></option>
</select>
日</TD>
</TR>
<TR>
<TD height="25" align=center class="tar"> <p>签名-UBB: </TD>
<TD height="25" valign="baseline"> <textarea name=txl_Underwrite cols=34 rows=5 class=fmtxtra id="textarea"><%=rs("sign")%></textarea>
(<font color="gray">255字符内</font>) </TD>
</TR>
<TR>
<TD height="25" align=center class="tar">新用户注册<br>
邮件通知:</TD>
<TD height="25"><input type="radio" name="new_reg_mail_inform" value="1" <%if rs("new_reg_mail_inform")=1 then Response.Write("checked")%>>
通知
<input type="radio" name="new_reg_mail_inform" value="0" <%if rs("new_reg_mail_inform")=0 then Response.Write("checked")%>>
不要通知</TD>
</TR>
<TR>
<TD height="25" colspan="2" align=center><input name="send" type="submit" id="send" style="border:1px solid #666666;height:20px;" onFocus="this.blur()" value="修改">
<input type="reset" name="Submit32" value="重写" style="border:1px solid #666666;height:20px;" onFocus="this.blur()"></TD>
</TR>
</TABLE>
</form>
<%
Rs.close
set rs=nothing
end sub
%>
<%Sub saveedit
If Session("username")="" Then
Call printerror ("修改资料出错","<li>您还没有登录或者会话超时,请先<a href='"&const_txl_HomeUrl&"user/login.asp'>登录</a>!</li>","97%")
Exit Sub
End If
dim rs
If outsitesubmit then
Call printerror ("更新资料出错","<li>请不要从外部提交数据!</li>","97%")
Exit Sub
End if
dim username,password,email,truename,question,answer
dim oicq,homephone,homeaddr,homezip,newphone,newaddr
dim newzip,sex,userpic,FaceUrl,FaceWidth,FaceHeight
dim byear,bmonth,bday,ubbsign,pwdchangstr,tmpstr
password=Trim(Request.Form("txl_password1"))
email=Trim(Request.Form("txl_email"))
truename=Trim(Request.Form("txl_truename"))
question=htmlEncode(Trim(Request.Form("txl_question")))
answer=htmlEncode(Trim(Request.Form("txl_answer")))
oicq=Trim(Request.Form("txl_oicq"))
homephone=Trim(Request.Form("txl_homephone"))
homeaddr=Trim(Request.Form("txl_homeaddr"))
homezip=Trim(Request.Form("txl_homezip"))
newphone=Trim(Request.Form("txl_newphone"))
newaddr=Trim(Request.Form("txl_newaddr"))
newzip=Trim(Request.Form("txl_newzip"))
sex=Trim(Request.Form("txl_sex"))
userpic=Trim(Request.Form("txl_userpic"))
FaceUrl=Trim(Request.Form("txl_FaceUrl"))
FaceWidth=Trim(Request.Form("Form_FaceWidth"))
FaceHeight=Trim(Request.Form("Form_FaceHeight"))
If FaceWidth="" or (not isnumeric(FaceWidth)) Then
FaceWidth=0
End If
If FaceHeight="" or (not isnumeric(FaceHeight)) Then
FaceHeight=0
End If
byear=Trim(Request.Form("txl_byear"))
bmonth=Trim(Request.Form("txl_bmonth"))
bday=Trim(Request.Form("txl_bday"))
ubbsign=htmlEncode(Trim(Request.Form("txl_Underwrite")))
Set rs=Server.CreateObject("Adodb.Recordset")
rs.open "select * from ec where studentid='"&Session("username")&"'",conn,1,3
If password<>"" Then
rs("password")=password
pwdchangstr="在更新资料中同时也更新了密码!新密码为<font color=red>"&password&"</font>请在下次登录时用新密码!"
else
pwdchangstr="你的密码没有变化!"
End If
rs("sname")=truename
rs("sex")=sex
rs("oicq")=oicq
rs("email")=email
rs("homephone")=homephone
rs("homeaddr")=homeaddr
rs("homezip")=homezip
rs("newphone")=newphone
rs("newaddr")=newaddr
rs("newzip")=newzip
rs("pwdquest")=question
rs("pwdanswer")=answer
rs("pic")=FaceUrl
rs("updatetime")=now()
rs("birthday")=byear&"-"&bmonth&"-"&bday
rs("picwidth")=Clng(FaceWidth)
rs("picheight")=Clng(FaceHeight)
rs("sign")=ubbsign
rs("picurl")=FaceUrl
rs("new_reg_mail_inform")=Request.Form("new_reg_mail_inform")
rs.update
Rs.close
set rs=nothing
tmpstr="<li>恭喜你,更新资料成功!</li>"&vbcrlf
tmpstr=tmpstr&"<li>"&pwdchangstr&"</li>"&vbcrlf
Call printsuc("更新资料成功",tmpstr,"97%")
End SUb
Function DisplayFaceSelect
dim i,rs,faceurl
on error resume next
set rs=conn.execute ("select faceurl from config where id=1")
faceurl=rs(0)
rs.close
set rs=nothing
faceurl=Split(faceurl,"|")
for i=0 to ubound(faceurl)-1
Response.write "<option value='"&const_FaceUploadurl&faceurl(i)&"'>"&const_FaceUploadurl&faceurl(i)&"</option>"
next
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -