<% '========================================================= ' File: mymodify.asp ' Version:5.0 ' Date: 2002-9-11 ' Script Written by satan '========================================================= ' Copyright (C) 2001,2002 AspSky.Net. All rights reserved. ' Web: http://www.aspsky.net,http://www.dvbbs.net ' Email: info@aspsky.net,eway@aspsky.net '========================================================= response.buffer=true stats="修改基本资料" dim sex dim showre dim face,width,height dim birthday dim usercookies call nav() if Cint(GroupSetting(16))=0 then Errmsg=Errmsg+"
"+"
  • 您没有在本论坛修改资料的权限,请登陆或者同管理员联系。" founderr=true end if if not founduser then Errmsg=Errmsg+"
    "+"
  • 您还没有登陆,请登陆后进行修改。" founderr=true end if if founderr then errmsg=errmsg+"
    "+"
  • 您没有登录。" call head_var(2,0,"","") call dvbbs_error() else call head_var(0,0,membername & "的控制面板","usermanager.asp") if request("action")="updat" then call update() if founderr then call dvbbs_error() else sucmsg="
  • 更改资料成功!" call dvbbs_suc() end if else call userinfo() if founderr then call dvbbs_error() end if end if call activeonline() call footer() sub userinfo() dim CanUseTitle,CanUseTitle1,CanUseTitle2 CanUseTitle=false CanUseTitle1=false CanUseTitle2=false set rs=server.createobject("adodb.recordset") sql="Select * from [User] where userid="&userid rs.open sql,conn,1,1 if rs.eof and rs.bof then errmsg=errmsg+"
    "+"
  • 该用户名不存在。" founderr=true exit sub else if Cint(Forum_Setting(6))=1 then CanUseTitle=true end if if CanUseTitle and Cint(forum_setting(60))>0 and rs("article")>Cint(forum_setting(60)) then CanUseTitle1=true elseif CanUseTitle and Cint(forum_setting(60))=0 then CanUseTitle1=true else CanUseTitle1=false end if if CanUseTitle and Cint(forum_setting(61))>0 and DateDiff("d",rs("AddDate"),Now())>Cint(forum_setting(61)) then CanUseTitle2=true elseif CanUseTitle and Cint(forum_setting(61))=0 then CanUseTitle2=true else CanUseTitle2=false end if if CanUseTitle and Cint(forum_setting(62))=1 then if CanUseTitle1 and CanUseTitle2 then CanUseTitle=true else CanUseTitle=false end if elseif CanUseTitle and (CanUseTitle1 or CanUseTitle2) then CanUseTitle=true else CanUseTitle=false end if %>
    控制面板首页 基本资料修改 用户密码修改 联系资料修改 用户短信服务 编辑好友列表 用户收藏管理
    <%if CanUseTitle then%> <%end if%> <%if cint(Forum_Setting(32))=1 then%> <%end if%> <%if Cint(forum_setting(42))=1 then%> <%end if%> <% dim usersetting,setuserinfo,setusertrue if rs("usersetting")<>"" then usersetting=split(rs("usersetting"),"|||") if ubound(usersetting)=1 then if isnumeric(usersetting(0)) then setuserinfo=usersetting(0) else setuserinfo=1 if isnumeric(usersetting(1)) then setusertrue=usersetting(1) else setusertrue=0 else setuserinfo=1 setusertrue=0 end if else setuserinfo=1 setusertrue=0 end if %> <% dim userinfo dim realname,character,personal,country,province,city,shengxiao,blood,belief,occupation,marital, education,college,userphone,address if rs("userinfo")<>"" then userinfo=split(rs("userinfo"),"|||") if ubound(userinfo)=14 then realname=userinfo(0) character=userinfo(1) personal=userinfo(2) country=userinfo(3) province=userinfo(4) city=userinfo(5) shengxiao=userinfo(6) blood=userinfo(7) belief=userinfo(8) occupation=userinfo(9) marital=userinfo(10) education=userinfo(11) college=userinfo(12) userphone=userinfo(13) address=userinfo(14) else realname="" character="" personal="" country="" province="" city="" shengxiao="" blood="" belief="" occupation="" marital="" education="" college="" userphone="" address="" end if else realname="" character="" personal="" country="" province="" city="" shengxiao="" blood="" belief="" occupation="" marital="" education="" college="" userphone="" address="" end if %>
    基本设置选项
    头    衔 "" then%><%=htmlencode(RS("title"))%><%end if%>" size=15 maxlength=13>
    性    别
    请选择您的性别
    checked <%end if%>name="Sex">酷哥 checked <%end if%> value="0">靓妹
    生    日
    如不想填写,请全部留空
    头    像
    您可以选择一个个性图片,当你发表时将显示在您的名字下方。
    <%if (Cint(forum_setting(54))>0 and rs("article")>Cint(forum_setting(54))) or Cint(forum_setting(54))=0 then%> 如果你填写了下面的自定义头像部分,那么你的头像以自定义的为准。否则,请你留空自定义头像的所有栏目!
    关于自定义头像
    你也可以在这里给出你自定义头像的 URL 地址,头像的高度和宽度(像素)。 如果不想要自定义头像,请将相应栏目栏目全部留空! <%end if%>
    论坛头像选择 [头像预览] " width=<%=rs("width")%> height=<%=rs("height")%>>
    <%if (Cint(forum_setting(54))>0 and rs("article")>Cint(forum_setting(54))) or Cint(forum_setting(54))=0 then%> <% if Cint(Forum_Setting(7))=1 then %> <% end if %>
    自定义头像地址:>
    宽    度:>0---<%=forum_setting(57)%>的整数
    高    度:>0---<%=forum_setting(57)%>的整数
    <%END IF%>
    个人照片
    如果您有照片在网上,请输入网页地址。此项可选
    "" then%><%=htmlencode(rs("userphoto"))%><%end if%>" size=30 maxlength=100>
    门    派
    如果您有兴趣,可加入以下门派
    <%set grs=nothing%>
    签    名
    不能超过 250 个字符
    文字将出现在您发表的文章的结尾处。
    其他选项
    有回帖时是否提示您
    当您的帖子有人回复后有信息通知您
    > 提示我 > 不提示
    选择Cookie的保留时间 > 1天 > 1个月 > 1年 > 不保留
    是否开放您的基本资料
    开放后别人可以看到您的性别、Email、QQ等信息
    checked<%end if%>> 开放 checked<%end if%>> 不开放
    是否开放您的真实资料
    开放后别人可以看到您的真实姓名、联系方式等信息
    checked<%end if%>> 开放 checked<%end if%>> 不开放
     个人真实信息(以下内容建议填写)
     真实姓名:
    性 格:  
    <% dim KidneyType,theKidney KidneyType="多重性格,乐天达观,成熟稳重,幼稚调皮,温柔体贴,活泼可爱,普普通通,内向害羞,外向开朗,心地善良,聪明伶俐,善解人意,风趣幽默,思想开放,积极进取,小心谨慎,郁郁寡欢,正义正直,悲观失意,好吃懒做,处事洒脱,疑神疑鬼,患得患失,异想天开,多愁善感,淡泊名利,见利忘义,瞻前顾后,循规蹈矩,热心助人,快言快语,少言寡语,爱管闲事,追求刺激,豪放不羁,狡猾多变,贪小便宜,见异思迁,情绪多变,水性扬花,重色轻友,胆小怕事,积极负责,勇敢正义,聪明好学,实事求是,务实实际,老实巴交,圆滑老练,脾气暴躁,慢条斯理,诚实坦白,婆婆妈妈,急性子" theKidney=split(KidneyType, ",") for i = 0 to ubound(theKidney) response.write "0 then '如果有此项性格 response.write "checked" end if response.write ">"&trim(theKidney(i))&" " if ((i+1) mod 5)=0 then response.write "
    " '每行显示六个性格进行换行 next %>
    个人简介:  
     国  家:
     联系电话:
     通信地址:
     省  份:
     城  市:
     生  肖:
     血  型:
     信  仰:
     职  业:
     婚姻状况:
     最高学历:
     毕业院校:
     
    <% end if rs.close set rs=nothing end sub sub update() dim CanUseTitle,CanUseTitle1,CanUseTitle2 Dim SplitUserTitle CanUseTitle=false CanUseTitle1=false CanUseTitle2=false if request("sex")="" then errmsg=errmsg+"
    "+"
  • 请选择您的性别。" founderr=true elseif request("sex")=0 or request("sex")=1 then sex=request("sex") else errmsg=errmsg+"
    "+"
  • 您输入的字符非法。" founderr=true end if if request("showRe")="" then errmsg=errmsg+"
    "+"
  • 请选择有回帖时是否提示您。" founderr=true elseif request("showRe")=0 or request("showRe")=1 then showRe=request("showRe") else errmsg=errmsg+"
    "+"
  • 您输入的字符非法。" founderr=true end if if request("myface")<>"" and ((Cint(forum_setting(54))>0 and myarticle>Cint(forum_setting(54))) or Cint(forum_setting(54))=0) then if request("width")="" or request("height")="" then errmsg=errmsg+"
    "+"
  • 请输入图片的宽度和高度。" founderr=true elseif not isInteger(request("width")) or not isInteger(request("height")) then errmsg=errmsg+"
    "+"
  • 您输入的字符不合法。" founderr=true elseif Cint(request("width"))>Cint(forum_setting(57)) then errmsg=errmsg+"
    "+"
  • 您输入的图片宽度不符合标准。" founderr=true elseif Cint(request("height"))>Cint(forum_setting(57)) then errmsg=errmsg+"
    "+"
  • 您输入的图片高度不符合标准。" founderr=true else if Cint(forum_setting(55))=0 then if instr(lcase(request("myface")),"http://")>0 or instr(lcase(request("myface")),"www.")>0 then errmsg=errmsg+"
    "+"
  • 本论坛设置了不允许连接外部网址做头像。" founderr=true end if end if face=request("myface") width=request("width") height=request("height") end if else if request("face")="" then errmsg=errmsg+"
    "+"
  • 请选择您的个性头像。" founderr=true else face=request("face") end if end if if width="" or height="" then width=forum_setting(38) height=forum_setting(39) end if if strLength(request("Signature"))>250 then errmsg=errmsg+"
    "+"
  • 签名只能在250个字符以内。" founderr=true end if if request.Form("birthyear")="" or request.form("birthmonth")="" or request.form("birthday")="" then birthday="" else birthday=trim(Request.Form("birthyear"))&"-"&trim(Request.Form("birthmonth"))&"-"&trim(Request.Form("birthday")) if not isdate(birthday) then birthday="" end if dim userinfo,usersetting userinfo=checkreal(request.Form("realname")) & "|||" & checkreal(request.Form("character")) & "|||" & checkreal(request.Form("personal")) & "|||" & checkreal(request.Form("country")) & "|||" & checkreal(request.Form("province")) & "|||" & checkreal(request.Form("city")) & "|||" & request.Form("shengxiao") & "|||" & request.Form("blood") & "|||" & request.Form("belief") & "|||" & request.Form("occupation") & "|||" & request.Form("marital") & "|||" & request.Form("education") & "|||" & checkreal(request.Form("college")) & "|||" & checkreal(request.Form("userphone")) & "|||" & checkreal(request.Form("address")) usersetting=request.Form("setuserinfo") & "|||" & request.Form("setusertrue") set rs=server.createobject("adodb.recordset") sql="Select * from [User] where userid="&userid rs.open sql,conn,1,3 if rs.eof and rs.bof then errmsg=errmsg+"
    "+"
  • 该用户名不存在。" founderr=true else rs("face")=replace(face,"'","") rs("width")=width rs("height")=height rs("sex")=sex rs("sign")=trim(request("Signature")) rs("userphoto")=request("userphoto") rs("showRe")=showRe rs("UserGroup")=request("groupname") '判断是否允许提交头衔 if Cint(Forum_Setting(6))=1 then CanUseTitle=true end if if CanUseTitle and Cint(forum_setting(60))>0 and rs("article")>Cint(forum_setting(60)) then CanUseTitle1=true elseif CanUseTitle and Cint(forum_setting(60))=0 then CanUseTitle1=true else CanUseTitle1=false end if if CanUseTitle and Cint(forum_setting(61))>0 and DateDiff("d",rs("AddDate"),Now())>Cint(forum_setting(61)) then CanUseTitle2=true elseif CanUseTitle and Cint(forum_setting(61))=0 then CanUseTitle2=true else CanUseTitle2=false end if if CanUseTitle and Cint(forum_setting(62))=1 then if CanUseTitle1 and CanUseTitle2 then CanUseTitle=true else CanUseTitle=false end if elseif CanUseTitle and (CanUseTitle1 or CanUseTitle2) then CanUseTitle=true else CanUseTitle=false end if if request("title")<>"" and CanUseTitle then if trim(forum_setting(63))<>"" then SplitUserTitle=split(forum_setting(63),"|") for i=0 to ubound(SplitUserTitle) if instr(lcase(request("title")),lcase(SplitUserTitle(i)))>0 then Errmsg=Errmsg + "
    " + "
  • 您设定的头衔中包含了系统禁止使用的字符" FoundErr=true exit sub end if next end if if len(request("title"))>Cint(forum_setting(59)) then Errmsg=Errmsg + "
    " + "
  • 您设置的头衔超过了本论坛允许的长度,头衔最大长度为"&forum_setting(59)&"字节。" FoundErr=true exit sub end if rs("title")=htmlencode(request("title")) end if if birthday<>"" then rs("birthday")=birthday end if rs("userinfo")=userinfo rs("usersetting")=usersetting rs("bbstype")=request("bbstype") rs.Update usercookies=request("usercookies") select case usercookies case 0 Response.Cookies("aspsky")("usercookies") = usercookies case 1 Response.Cookies("aspsky").Expires=Date+1 Response.Cookies("aspsky")("usercookies") = usercookies case 2 Response.Cookies("aspsky").Expires=Date+31 Response.Cookies("aspsky")("usercookies") = usercookies case 3 Response.Cookies("aspsky").Expires=Date+365 Response.Cookies("aspsky")("usercookies") = usercookies end select Response.Cookies("aspsky")("tempid") = request("bbstype") Response.Cookies("aspsky").path=cookiepath end if rs.close set rs=nothing '****************** '对上传头象进行过滤与改名 if Cint(Forum_Setting(7))=1 then on error resume next dim objFSO,upfilename,newfilename dim upface,memberid set rs=conn.execute("select userid,face from [user] where userid="&userid) memberid=rs(0) upface=trim(rs(1)) newfilename="" upfilename=split(upface,"/") if ubound(upfilename)=1 and upfilename(0)="uploadFace" then if instr(upfilename(1),"_")=0 then newfilename="uploadFace/"&memberid&"_"&upfilename(1) Set objFSO = Server.CreateObject("Scripting.FileSystemObject") if objFSO.fileExists(Server.MapPath(upface)) then objFSO.movefile ""&Server.MapPath(upface)&"",""&Server.MapPath(newfilename)&"" end if If Err.Number = 0 Then conn.execute("update [user] set face='"&replace(newfilename,"'","")&"' where userid="&userid) end if set objFSO=nothing end if end if rs.close set rs=nothing end if '对上传头象进行过滤与改名结束 '**************** end sub function checkreal(v) dim w if not isnull(v) then w=replace(v,"|||","§§§") checkreal=w end if end function %>