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

📄 editprofile.asp

📁 很漂亮
💻 ASP
📖 第 1 页 / 共 2 页
字号:


sql="select * from [user] where username='"&HTMLEncode(username)&"'"
rs.Open sql,Conn,1,3
rs("usermail")=HTMLEncode(Request("usermail"))
rs("userhome")=HTMLEncode(Request("userhome"))
rs("UserIM")=""&HTMLEncode(Request("qq"))&"\"&HTMLEncode(Request("icq"))&"\"&HTMLEncode(Request("uc"))&"\"&HTMLEncode(Request("aim"))&"\"&HTMLEncode(Request("msn"))&"\"&HTMLEncode(Request("Yahoo"))&""
rs.update
rs.close
message=message&"<li>修改资料成功<li><a href=usercp.asp>控制面板首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=usercp.asp>")
end sub




sub editProfileok
username=Request.Cookies("username")
userface=HTMLEncode(Request("userface"))
sign=HTMLEncode(Request.Form("sign"))

if badwords<>empty then
filtrate=split(badwords,"|")
for i = 0 to ubound(filtrate)
sign=ReplaceText(sign,""&filtrate(i)&"",string(len(filtrate(i)),"*"))
next
end if

temp=UCase(sign)
if instr(temp,"[/FLASH]")>0 or instr(temp,"[/RM]")>0 or instr(temp,"[/MP]")>0 then message=message&"<li>签名档中不能含有[FLASH] [RM] [MP]代码"

if Len(sign)>255 then message=message&"<li>签名档不能大于 255 个字节"

if instr(userface,";")>0 then message=message&"<li>头像URL中不能含有特殊符号"

if message<>"" then error(""&message&"")

sql="select * from [user] where username='"&HTMLEncode(username)&"'"
rs.Open sql,Conn,1,3

rs("birthday")=HTMLEncode(Request("birthday"))
rs("userface")=userface
rs("sex")=HTMLEncode(Request("sex"))
rs("sign")=sign
rs("landtime")=now()


rs("UserInfo")=""&HTMLEncode(Request("realname"))&"\"&HTMLEncode(Request("country"))&"\"&HTMLEncode(Request("province"))&"\"&HTMLEncode(Request("city"))&"\"&HTMLEncode(Request("postcode"))&"\"&HTMLEncode(Request("blood"))&"\"&HTMLEncode(Request("belief"))&"\"&HTMLEncode(Request("occupation"))&"\"&HTMLEncode(Request("marital"))&"\"&HTMLEncode(Request("education"))&"\"&HTMLEncode(Request("college"))&"\"&HTMLEncode(Request("address"))&"\"&HTMLEncode(Request("phone"))&"\"&HTMLEncode(Request("character"))&"\"&HTMLEncode(Request("personal"))&""
rs("UserMobile")=""&HTMLEncode(Request("UserMobile"))&""


rs.update
rs.close
message=message&"<li>修改资料成功<li><a href=usercp.asp>控制面板首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=usercp.asp>")
end sub





sub OptionPage
sql="select * from [user] where username='"&Request.Cookies("username")&"'"
Set Rs=Conn.Execute(sql)
%>

<SCRIPT>valigntop()</SCRIPT>
<table width=97% cellspacing=1 cellpadding=4 border=0 class=a2 align=center>
  <form method="POST" name="form"action="EditProfile.asp">
<input type=hidden name="menu" value="optionok">
<tr>
<td height="20" align="center" colspan="2" valign="bottom" class=a1>
<b>编辑论坛选项</b></td>
</tr>
<tr>
    <td height="2" align="right" width="45%" class=a4><b>YBB代码:</b></td>
    <td height="2" align="left" width="55%" class=a4> &nbsp; 
      
<input type=radio name="ybbcode" value="0" <%if Request.Cookies("ybbcode")="0" then%>checked<%end if%> id=ybbcode><label for=ybbcode>关闭</label>
<input type=radio name="ybbcode" value="1" <%if Request.Cookies("ybbcode")="1" then%>checked<%end if%> id=ybbcode_1><label for=ybbcode_1>打开</label> 
    <font color="FF0000">&nbsp;&nbsp; 默认:[打开]</font>
      
</td>
</tr>
<tr>
    <td height="2" align="right" width="45%" class=a3><b>[IMG]代码:</b></td>
    <td height="2" align="left" width="55%" class=a3> &nbsp; 
<input type=radio name="ybbimg" value="0" <%if Request.Cookies("ybbimg")="0" then%>checked<%end if%> id=ybbimg><label for=ybbimg>关闭</label>
<input type=radio name="ybbimg" value="1" <%if Request.Cookies("ybbimg")="1" then%>checked<%end if%> id=ybbimg_1><label for=ybbimg_1>打开</label> 
    <font color="FF0000">&nbsp;&nbsp; 默认:[打开]</font>
</td>
</tr>
<tr>
    <td class=a4 height="2" align="right" valign="middle" width="45%"><b>
    [FLASH][RM][MP]代码:</b></td>
    <td class=a4 height="2" align="left" valign="middle" width="55%"> &nbsp; 
<input type=radio name="YbbMedia" value="0" <%if Request.Cookies("YbbMedia")="0" then%>checked<%end if%> id=YbbMedia><label for=YbbMedia>关闭</label>
<input type=radio name="YbbMedia" value="1" <%if Request.Cookies("YbbMedia")="1" then%>checked<%end if%> id=YbbMedia_1><label for=YbbMedia_1>打开</label> 
    <font color="FF0000">&nbsp;&nbsp; 默认:[打开]</font>
</td>
</tr>

<tr class=a3>
    <td height="2" align="right" width="45%"><b>表情代码:</b></td>
    <td height="2" align="left" width="55%"> &nbsp; 
<input type=radio name="ybbbrow" value="0" <%if Request.Cookies("ybbbrow")="0" then%>checked<%end if%> id=ybbbrow><label for=ybbbrow>关闭</label>
<input type=radio name="ybbbrow" value="1" <%if Request.Cookies("ybbbrow")="1" then%>checked<%end if%> id=ybbbrow_1><label for=ybbbrow_1>打开</label> 
    <font color="FF0000">&nbsp;&nbsp; 默认:[打开]</font>
</td>
</tr>


<tr>
<td height="20" align="center" colspan="2" valign="bottom" class=a1>
<b>编辑帖子选项</b></td>
</tr>


<tr class=a4>
    <td height="2" align="right" width="45%"><b>在帖子中显示用户头像:</b></td>
    <td height="2" align="left" width="55%"> &nbsp; 
<input type=radio name="showface" value="0" <%if Request.Cookies("showface")="0" then%>checked<%end if%> id=showface><label for=showface>关闭</label>
<input type=radio name="showface" value="1" <%if Request.Cookies("showface")="1" then%>checked<%end if%> id=showface_1><label for=showface_1>打开</label> 
    <font color="FF0000">&nbsp;&nbsp; 默认:[打开]</font></td>
</tr>


<tr class=a3>
    <td height="2" align="right" width="45%"><b>在帖子中显示用户签名:</b></td>
    <td height="2" align="left" width="55%"> &nbsp; 
<input type=radio name="sign" value="0" <%if Request.Cookies("sign")="0" then%>checked<%end if%> id=sign><label for=sign>关闭</label>
<input type=radio name="sign" value="1" <%if Request.Cookies("sign")="1" then%>checked<%end if%> id=sign_1><label for=sign_1>打开</label> 
    <font color="FF0000">&nbsp;&nbsp; 默认:[打开]</font></td>
</tr>

<tr>
<td height="20" align="center" colspan="2" valign="bottom" class=a1>
<b>编辑个性选项</b></td>
</tr>

<tr class=a3>
    <td height="2" align="right" width="45%"><b>每页显示主题数:</b></td>
    <td height="2" align="left" width="55%"> &nbsp; 
<select name="pagesetup" size="1">
<option value="">默认</option>
<option value="10" <%if Request.Cookies("pagesetup")="10" then%>selected<%end if%>>10</option>
<option value="20" <%if Request.Cookies("pagesetup")="20" then%>selected<%end if%>>20</option>
<option value="30" <%if Request.Cookies("pagesetup")="30" then%>selected<%end if%>>30</option>
</select>
    </td>
</tr>
<tr class=a4>
    <td height="2" align="right" width="45%"><b>主题列表中突出关键词:</b><br>设定的关键词将用<font color="FF0000">红色</font>显示&nbsp;&nbsp; </td>
    <td height="2" align="left" width="55%"> &nbsp; 
<input size=20 name=key_word value="<%=Request.Cookies("key_word")%>"></td>
</tr>


<tr class=a3>
    <td height="2" align="right" width="45%"><b>过滤用户名单:</b><br><font color="FF0000">多人请用“|”分隔</font>&nbsp;&nbsp; </td>
    <td height="2" align="left" width="55%"> &nbsp; 
<input size=30 name=badlist value="<%=Request.Cookies("badlist")%>"></td>
</tr>



<tr class=a4>
    <td height="1" align="center" width="100%" colspan="2">
<input type="submit" name="Submit2" value=" 确 定 "></td>
</tr>


</table>
<SCRIPT>valignbottom()</SCRIPT>
</form><%
end sub



sub optionok


Response.Cookies("ybbcode")=Request("ybbcode")
Response.Cookies("ybbimg")=Request("ybbimg")
Response.Cookies("YbbMedia")=Request("YbbMedia")
Response.Cookies("ybbbrow")=Request("ybbbrow")
Response.Cookies("showface")=Request("showface")
Response.Cookies("sign")=Request("sign")
Response.Cookies("badlist")=Request("badlist")
Response.Cookies("key_word")=Request("key_word")
Response.Cookies("pagesetup")=Request("pagesetup")



Response.Cookies("ybbcode").Expires=date+365
Response.Cookies("ybbimg").Expires=date+365
Response.Cookies("YbbMedia").Expires=date+365
Response.Cookies("ybbbrow").Expires=date+365
Response.Cookies("eremite").Expires=date+365
Response.Cookies("newmessage").Expires=date+365
Response.Cookies("showface").Expires=date+365
Response.Cookies("sign").Expires=date+365
Response.Cookies("badlist").Expires=date+365
Response.Cookies("key_word").Expires=date+365
Response.Cookies("pagesetup").Expires=date+365
message=message&"<li>更新设置成功<li><a href=usercp.asp>控制面板首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=usercp.asp>")
end sub



sub pass
sql="select * from [user] where username='"&Request.Cookies("username")&"'"
Set Rs=Conn.Execute(sql)
%>
<SCRIPT>valigntop()</SCRIPT>
<table width=97% cellspacing=1 cellpadding=4 border=0 class=a2 align=center>
  <form method="POST" name="form"action="EditProfile.asp">
<input type=hidden name="menu" value="passok">
<tr>
<td height="20" align="center" colspan="2" valign="bottom" class=a1>
<b>用户密码修改</b></td>
</tr>
<tr class=a4>
    <td height="2" align="right" width="45%"><b> 原密码:</b></td>
    <td height="2" align="left" width="55%"> &nbsp; 
      <input type="password" name="olduserpass" size="40">
</td>
</tr>
<tr class=a3>
    <td height="2" align="right" width="45%"><b> 新密码:</b><br>
      <font color="#FF0000">如不更改密码此处请留空</font></td>
    <td height="2" align="left" width="55%"> &nbsp; 
      <input type="password" name="userpass" size="40" maxlength="16">
</td>
</tr>
<tr class=a4>
    <td height="2" align="right" width="45%"><b>确认新密码:</b><br>
      <font color="#FF0000">请与您的新密码保持一致</font></td>
    <td height="2" align="left" valign="middle" width="55%"> &nbsp; 
      <input type="password" name="userpass2" size="40" maxlength="16"></td>
</tr>
<tr class=a3>
    <td height="1" align="right" width="45%"><b>密码提示问题:</b></td>
    <td height="1" align="left" width="55%"> &nbsp; 
      <input type="text" name="question" size="40" value="<%=rs("question")%>">
</td>
</tr>
<tr class=a4>
    <td height="1" align="right" width="45%"><b>密码提示答案:</b><br>
	<font color="#FF0000">如不更改答案此处请留空</font></td>
    <td height="1" align="left" width="55%" class=a4> &nbsp; 
      <input type="text" name="answer" size="40" value=""></td>
</tr>
<tr class=a3>
    <td align="center" width="100%" colspan="2">
<input type="submit" name="Submit" value=" 确 定 "></td>
</tr>
</table>
<SCRIPT>valignbottom()</SCRIPT>
</form>
<%
end sub

sub passok
username=Request.Cookies("username")
userpass=Trim(Request("userpass"))
olduserpass=Trim(Request("olduserpass"))
userpass2=Trim(Request("userpass2"))
question=HTMLEncode(Request("question"))

sql="select * from [user] where username='"&HTMLEncode(username)&"'"
rs.Open sql,Conn,1,3


if md5(olduserpass)<>rs("userpass") then message=message&"<li>您的原密码错误"

if userpass<>userpass2 then message=message&"<li>您的新密码和确认新密码不同"

if message<>"" then error(""&message&"")
if userpass<>empty then rs("userpass")=md5(userpass)
rs("question")=question
if Request("answer")<>empty then rs("answer")=md5(Request("answer"))
rs("landtime")=now()
rs.update
rs.close
message=message&"<li>修改资料成功<li><a href=usercp.asp>控制面板首页</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=usercp.asp>")
end sub


htmlend
%>

⌨️ 快捷键说明

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