📄 usersetup.asp
字号:
<!--#include file="up.asp"--><!--#include file="inc/regfun.asp"--><!--#include file="inc/md5.asp"--><!--#include file="inc/grade.asp"-->
<table align="center" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>" height="28">
<tr>
<td class=td1 width="120" bgcolor="<%=c1%>" background="<%=tbg%>"> <img border="0" src="pic/gl.gif"> 控制面板</td>
<td bgcolor="<%=c2%>" width="100" align="center"><a href=?action=myinfo>修改资料</a></td>
<td bgcolor="<%=c2%>" width="100" align="center"><span lang="zh-cn">
<a href="usersetup.asp?action=mypwd">修改密码</a></span></td>
<td bgcolor="<%=c2%>" width="100" align="center">
<a href="usersetup.asp?action=stylediy">自定义风格</a></td>
<td bgcolor="<%=c2%>" width="100" align="center">
<a href="usersetup.asp?action=display">论坛显示设置</a></td>
<td bgcolor="<%=c2%>"> </td>
</tr>
</table><br>
<%dim action,userinfo,burn,sql
action=request.querystring("action")
if lguserid="" or isnull(lguserid) then response.redirect"login.asp"
select case action
case""
set rs=conn.execute("select top 1 mark,grade,alltopicnum,lasttime from [user] where userid="&lguserid&"")
%>
<%=ttop%>
<table align="center" border="1" bordercolor=<%=c2%> cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
<tr>
<td class=td1 width="100%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28"> <img src="pic/gl.gif" border="0"> 面板功能介绍</td>
</tr>
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<tr>
<td width="100%" bgcolor="<%=c2%>" height="28"> 你的论坛信息如下:</td>
</tr>
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="<%=c2%>">
<tr>
<td width="20%" height="25"> 你发表的话题数:</td>
<td width="25%"> <%=conn.execute("select count(id) from topic where userid="&lguserid&"")(0)%></td>
<td width="10%" rowspan="4"> </td>
<td width="20%"> 新留言数:</td>
<td width="25%"> <%=conn.execute("select count(id) from sms where touserid="&lguserid&" and new=true")(0)%></td>
</tr>
<tr>
<td height="25"> 你发表的总帖数:</td>
<td> <%=rs("alltopicnum")%></td>
<td> 你的留言板信息数:</td>
<td> <%=conn.execute("select count(id) from sms where touserid="&lguserid&"")(0)%></td>
</tr>
<tr>
<td height="25"> 你当前积分:</td>
<td> <%=rs("mark")%></td>
<td> 你的当前IP:</td>
<td> <%=ip%></td>
</tr>
<tr>
<td height="40"> 你当前等级:</td>
<td>
<p> <%=rs("grade")%> 级 「<%gradename(rs("grade"))%>」<br> <img src=images/grade/<%=rs("grade")%>.gif border=0></td>
<td> 最近登陆时间:</td>
<td> <%=rs("lasttime")%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="28" bgcolor="<%=c2%>"> <a href="usersetup.asp?action=stylediy">自定义风格:</a></td>
</tr>
<tr>
<td width="100%" height="50"> 你觉得论坛的风格不好看?那么请使用该项,自定义你喜欢的风格。</td>
</tr>
<tr>
<td width="100%" height="28" bgcolor="<%=c2%>"> <a href="usersetup.asp?action=display">论坛显示设置:</a></td>
</tr>
<tr>
<td width="100%">
<p style="line-height: 150%; margin: 5"> 你不想要显示论坛中的一些附加信息(比如论坛联盟,用户信息……),你想要更快的浏览速度?<br> 请使用该项,将你不想要显示的信息都隐藏掉。</td>
</tr>
</table>
</td>
</tr>
</table>
<%=tbottom%>
<%set rs=nothing%>
<%case"myinfo"
set rs=conn.execute("select*from [user] where userid="&lguserid&" and not del")
userinfo=rs("userinfo")
userinfo=split(userinfo,"|")
burn=userinfo(2)
burn=split(burn,"-")
session(prefix&"regtime")=userinfo(9)
%>
<form method="POST" action="usersetup.asp?action=edit" name="form"><%=ttop%><table align="center" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="<%=tbw%>">
<tr>
<td class=td1 width="100%" bgcolor="<%=c1%>" background="<%=tbg%>" height="28"> <img src="pic/gl.gif" border="0"> 用户注册资料</td>
</tr>
<tr>
<td width="100%" height="25" bgcolor="<%=c2%>"> 必填资料:</td>
</tr>
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="<%=c2%>">
<tr>
<td width="40%">
<p style="line-height: 120%; margin: 4"><b>用户名</b>:<br>你在该论坛注册的用户名,不可以修改</p></td>
<td width="60%"> <b><font color="<%=c1%>"><%=kbbs(lgname)%></font></b></td>
</tr>
<tr>
<td><p style="line-height: 120%; margin: 4"><b>性别</b>:<br>请选择您的性别</td>
<td> <input type=radio name=sex value=1 <%if userinfo(4)=1 then%>checked<%end if%>>
<img src="pic/boy.gif">帅哥 <input type=radio name=sex value=2 <%if userinfo(4)=2 then%>checked<%end if%>>
<img src="pic/girl.gif">靓女</td>
</tr>
<tr>
<td><p style="line-height: 120%; margin: 4"><b>Email地址</b>:<br>请输入有效的邮件地址,这将使您能用到论坛中的所有功能</td>
<td> <input type=text name=email size=30 maxlength=30 value="<%=kbbs(userinfo(0))%>"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="25" bgcolor="<%=c2%>"> 选填资料:</td>
</tr>
<tr>
<td width="100%">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="<%=c2%>" width="100%">
<tr>
<td width="40%"><p style="line-height: 120%; margin: 4"><b>生日:</b>(请按照2000-01-01格式填写)</td>
<td width="60%"> <input type=text name=burn1 size=4 maxlength=4 value="<%=burn(0)%>">年<input type=text name=burn2 size=2 maxlength=2 value="<%=burn(1)%>">月<input type=text name=burn3 size=2 maxlength=2 value="<%=burn(2)%>">日</td>
</tr>
<tr>
<td><p style="line-height: 120%; margin: 4"><b>主页:</b><br>
填写你的个人主页,让大家见识见识</td>
<td> <input type=text name=home size=30 maxlength=255 value="<%=kbbs(userinfo(1))%>"></td>
</tr>
<tr>
<td><p style="line-height: 120%; margin: 4"><B>OICQ号码</B>:<BR>填写您的QQ地址,方便与他人的联系</td>
<td> <input type=text name=qq size=16 maxlength=15 value="<%=userinfo(3)%>"></td>
</tr>
<tr>
<td><p style="line-height: 120%; margin: 4"><b>我的头像:</b><br>使用论坛自带的图像</td>
<td><br> <select name=bbspic size=1 onChange="showimage()" style="font-size: 9pt">
<%for i=1 to checknum(application(prefix&"picnum"))%>
<option value=<%=i%>><%=i%></option>
<%next%>
</select> <img src="headpic/1.gif" name="tus"><script>function showimage(){document.images.tus.src="headpic/"+document.form.bbspic.options[document.form.bbspic.selectedIndex].value+".gif";document.form.mypic.value="headpic/"+document.form.bbspic.options[document.form.bbspic.selectedIndex].value+".gif";document.form.picw.value="<%=checknum(application(prefix&"autopicw"))%>";document.form.pich.value="<%=checknum(application(prefix&"autopich"))%>";}</script> [ <a target="_blank" href="help.asp?action=allheadpic">查看所有头像</a> ]<br>
</td>
</tr>
<tr>
<td><p style="line-height: 120%; margin: 4"><B>自定义头像</B>:<br>如果图像位置中有连接图片将以自定义的为主</td>
<td>
<p style="margin: 8"><input name=mypic size=38 maxlength=100 value="<%=kbbs(userinfo(5))%>"> 完整Url地址<br>图像宽度:<input type=text name=picw size=6 value="<%=kbbs(userinfo(6))%>"> 高度:
<input type=text name=pich size=6 value="<%=kbbs(userinfo(7))%>">(宽最大<%=checknum(application(prefix&"picw"))%> 高最大<%=checknum(application(prefix&"pich"))%>)<br>
<IFRAME name=ad src="upload.asp?action=headpic" frameBorder=0 width="95%" scrolling=no height=37></IFRAME>
</td>
</tr>
<tr>
<td><p style="line-height: 120%; margin: 4"><b>自定义头衔:</b><br>
填写你喜欢的头衔,最多8个字母或汉字。</td>
<td> <%if rs("grade")>=1 then
session(prefix&"tempgrade")=rs("grade")%><input type=text name=diyname size=30 maxlength=255 value="<%=kbbs(userinfo(10))%>"><%else%>该项需要等级为 <b>1</b> 以上的用户才能使用。<%end if%></td>
</tr>
<tr>
<td><p style="line-height: 120%; margin: 4"><B>个性签名</B>:<BR>最多255个字符<BR>文字将出现在您发表的文章的结尾处。体现您的个性。</td>
<td>
<p style="margin: 8">
<TEXTAREA name=gxqm rows=5 wrap=PHYSICAL cols=60 style="font-family: 宋体; font-size: 9pt"><%=kbbs(userinfo(8))%></TEXTAREA></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="40" bgcolor="<%=c2%>" align="center">
<input class=submit type=submit value=我填好了,现在修改! name=Submit> <input class=submit type=reset value=不行,还是重写吧! name=Submit2></td>
</tr>
</table></form>
<%case"edit"
dim password,repassword,email,sex,burn1,burn2,burn3,home,qq,gxqm,picw,pich,bbspic,mypic,toupic
dim canreg,z,sickpass,regtime,userid,newuserinfo,bad,b,diyname
function checkbad(str)
if isnull(str) then exit function
bad=split(application(prefix&"badcontent"), "|")
for b=0 to ubound(bad)
str=Replace(str,bad(b),string(len(bad(b)),"*"))
next
checkbad=str
end function
email=Replace(Request.Form("email"),"'","''")
sex=checknum(request.form("sex"))
burn1=replace(Request.Form("burn1"),"'","")
burn2=replace(Request.Form("burn2"),"'","")
burn3=replace(Request.Form("burn3"),"'","")
home=Replace(Request.Form("home"),"'","''")
home=ubbg(home)
qq=Replace(Request.Form("qq"),"'","''")
gxqm=Request.Form("gxqm")
gxqm=Replace(left(gxqm,255),"'","''")
gxqm=replace(gxqm,"|","│")
gxqm=checkbad(gxqm)
if checknum(session(prefix&"tempgrade"))>=1 then
diyname=Request.Form("diyname")
diyname=Replace(left(diyname,8),"'","")
diyname=replace(diyname,"|","│")
diyname=checkbad(diyname)
end if
picw=Replace(Request.Form("picw"),"'","''")
pich=Replace(Request.Form("pich"),"'","''")
mypic=Replace(Request.Form("mypic"),"'","''")
mypic=ubbg(mypic)
bbspic=Replace(Request.Form("bbspic"),"'","''")
canreg=true
if email="" or sex="" then
canreg=false
mes="·请填写完整必填的资料。<br>"
else
mes=""
email=server.HTMLEncode(email)
if not IsValidEmail(email) then canreg=false : mes=mes&"·你的E-mail填写错误。<br>"
end if
burn=burn1&"-"&burn2&"-"&burn3
if not isdate(burn) then burn="--"
if qq<>"" and (not isnumeric(qq) or (len(qq)<5 or len(qq)>12)) then canreg=false:mes=mes&"·你的 QQ 号码填写错误。<br>"
if mypic="" then
toupic="headpic/"&bbspic&".gif|"&checknum(application(prefix&"autopicw"))&"|"&checknum(application(prefix&"autopich"))
else
if picw<>"" and checknum(picw)<=checknum(application(prefix&"picw")) and pich<>"" and checknum(pich)<=checknum(application(prefix&"pich")) then
toupic=mypic&"|"&picw&"|"&pich
else
canreg=false
mes=mes&"·你的头像大小设置错误。<br>"
end if
end if
if checknum(application(prefix&"headpicset"))<>1 and instr(toupic,"://")>0 then
canreg=false
mes=mes&"·本论坛不允许使用外部头像。<br>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -