📄 mymodify.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/chkinput.asp"-->
<%
'mymodify.asp
Dvbbs.LoadTemplates("usermanager")
Dvbbs.Stats=Dvbbs.MemberName&template.Strings(1)
Dvbbs.Nav()
Dvbbs.Head_var 0,0,template.Strings(0),"usermanager.asp"
Dim Sql,Rs,TempStr,ErrCodes
If Cint(Dvbbs.GroupSetting(16))=0 Then
Dvbbs.AddErrCode(28)
Dvbbs.Showerr()
End If
If Dvbbs.userid=0 Then
Dvbbs.AddErrCode(6)
Dvbbs.Showerr()
Else
Response.Write Template.Html(0)
If Request("action")="updat" Then
update()
Else
Userinfo()
End If
If ErrCodes<>"" Then Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
End If
Dvbbs.ActiveOnline()
Dvbbs.Footer()
Sub Userinfo()
Dim CanUseTitle,CanUseTitle1,CanUseTitle2,i,CanUserInfo
Dim My_info,My_infotemp,My_Cookies,ShowUserInfo
Dim UseRsetting,SetUserInfo,SetUserTrue,ShowRe
Dim signtrue
Dim FoundUseMagic,iMagicFace,mRs,iMagicMoney,iMagicTicket
FoundUseMagic = False
My_infotemp=Template.Html(5)
My_Cookies=Request.Cookies(Dvbbs.Forum_sn)("usercookies")
CanUseTitle=False
CanUseTitle1=False
CanUseTitle2=False
CanUserInfo=False
'UserID=0,UserName=1,UserEmail=2,UserPost=3,UseRsign=4,UseRsex=5,UserFace=6,UserWidth=7,UserHeight=8,JoinDate=9,UserGroup=10,UserTitle=11,UserBirthday=12,UserPhoto=13,UserInfo=14,UseRsetting=15
sql="Select UserID,UserName,UserEmail,UserPost,UseRsign,UseRsex,UserFace,UserWidth,UserHeight,JoinDate,UserGroup,UserTitle,UserBirthday,UserPhoto,UserInfo,UseRsetting from [DV_User] where userid="&Dvbbs.userid
Set Rs=Dvbbs.Execute(Sql)
If Rs.eof And Rs.bof Then
Dvbbs.AddErrCode(32)
Exit Sub
Else
Sql=Rs.GetString(,,"#§§#","","")
End If
Rs.close :Set Rs=Nothing
My_info= Split(Sql,"#§§#")
If Cint(Dvbbs.Forum_Setting(6))=1 Then CanUseTitle=True
If CanUseTitle And Cint(Dvbbs.Forum_Setting(60)) > 0 And Clng(My_info(3)) > Cint(Dvbbs.Forum_Setting(60)) Then
CanUseTitle1 = True
ElseIf CanUseTitle And Cint(Dvbbs.Forum_Setting(60)) = 0 Then
CanUseTitle1 = True
Else
CanUseTitle1 = False
End If
If CanUseTitle and Cint(Dvbbs.Forum_Setting(61))>0 And DateDiff("d",My_info(9),Now())>Cint(Dvbbs.Forum_Setting(61)) Then
CanUseTitle2=True
ElseIf CanUseTitle And Cint(Dvbbs.Forum_Setting(61))=0 Then
CanUseTitle2=True
Else
CanUseTitle2=False
End If
If CanUseTitle And Cint(Dvbbs.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
signtrue=My_info(4)
If My_info(14)<>"" Then
ShowUserInfo=split(My_info(14),"|||")
If ubound(ShowUserInfo)=14 Then
CanUserInfo=True
End If
End If
UseRsetting=split(My_info(15),"|||")
If UBound(UseRsetting)=2 Then
If isnumeric(UseRsetting(0)) Then Setuserinfo=cint(UseRsetting(0)) Else Setuserinfo=1
If isnumeric(UseRsetting(1)) Then Setusertrue=cint(UseRsetting(1)) Else Setusertrue=0
If isnumeric(UseRsetting(2)) Then ShowRe=cint(UseRsetting(2)) Else ShowRe=0
Else
Setuserinfo=1
Setusertrue=0
ShowRe=0
End If
'魔法头像部分
If Dvbbs.Forum_Setting(98)="1" And Dvbbs.GroupSetting(69)="1" Then My_infotemp=Replace(My_infotemp,"{$usermagicface}",Template.Html(20))
My_infotemp=Replace(My_infotemp,"{$usermagicface}","")
iMagicFace = Split(My_info(6),"|")
If Ubound(iMagicFace) = 1 Then
My_info(6) = iMagicFace(1)
If Dvbbs.Forum_Setting(98)="1" Then
Set mRs = Dvbbs.Plus_Execute("Select iMoney,iTicket From Dv_Plus_Tools_MagicFace Where MagicFace_s = " & iMagicFace(0))
If Not (mRs.Eof And mRs.Bof) Then
FoundUseMagic = True
iMagicMoney = mRs(0)
iMagicTicket = mRs(1)
End If
mRs.Close
Set mRs=Nothing
End If
End If
If Dvbbs.Forum_Setting(98)="1" Then
If FoundUseMagic Then
My_infotemp=Replace(My_infotemp,"{$isselect}","checked")
My_infotemp=Replace(My_infotemp,"{$firstmagicface}",iMagicFace(0))
My_infotemp=Replace(My_infotemp,"{$magicmoney}",iMagicMoney)
My_infotemp=Replace(My_infotemp,"{$magicticket}",iMagicTicket)
Else
My_infotemp=Replace(My_infotemp,"{$isselect}","")
Set mRs = Dvbbs.Plus_Execute("Select Top 1 MagicFace_s,iMoney,iTicket From Dv_Plus_Tools_MagicFace Order By ID")
If Not (mRs.Eof And mRs.Bof) Then
My_infotemp = Replace(My_infotemp,"{$firstmagicface}",mRs(0))
My_infotemp = Replace(My_infotemp,"{$magicmoney}",mRs(1))
My_infotemp = Replace(My_infotemp,"{$magicticket}",mRs(2))
Else
My_infotemp = Replace(My_infotemp,"{$firstmagicface}",0)
My_infotemp = Replace(My_infotemp,"{$magicmoney}",0)
My_infotemp = Replace(My_infotemp,"{$magicticket}",0)
End If
mRs.Close
Set mRs=Nothing
End If
End If
'魔法头像部分
'管理员与超版自定义头像不受发帖数限制 2005-3-10 Dv.Yz
If (Dvbbs.Master Or Dvbbs.SuperBoardMaster) And Clng(My_info(3)) < Cint(Dvbbs.Forum_Setting(54)) Then My_info(3) = Cint(Dvbbs.Forum_Setting(54))
'用My_info(3)判断是否有自定义头像权限,更新page_usermanager模板界面(5)、(7) Dv.Yz 2005-1-27
My_infotemp = Replace(My_infotemp, "{$SetFace_info}", SetUserFace(Cint(Dvbbs.Forum_UploadSetting(0)), My_info(6)&"", My_info(7), My_info(8), My_info(3)))
If cint(Dvbbs.Forum_Setting(32))=1 Then
My_infotemp=Replace(My_infotemp,"{$SetGroup_info}",SetUserGroup(My_info(10)))
Else
My_infotemp=Replace(My_infotemp,"{$SetGroup_info}","")
End If
My_infotemp = Replace(My_infotemp,"{$signlength}",Clng(Dvbbs.GroupSetting(56)))
My_infotemp=Replace(My_infotemp,"{$user_Id}",My_info(0))
My_infotemp=Replace(My_infotemp,"'{$Dvbbs.FoundIsChallenge}'",Lcase(Dvbbs.FoundIsChallenge))
If CanUseTitle Then
My_Infotemp = Replace(My_Infotemp, "{$SetTitle_info}", SetUserTitle(Dvbbs.Htmlencode(My_info(11))))
Else
My_Infotemp = Replace(My_infotemp, "{$SetTitle_info}", "")
End If
My_infotemp=Replace(My_infotemp,"{$checked_sex}",My_info(5))
My_infotemp=Replace(My_infotemp,"{$user_Birthday}",My_info(12))
My_infotemp=Replace(My_infotemp,"{$user_Photo}",Dvbbs.htmlencode(Trim(My_info(13))))
My_infotemp=Replace(My_infotemp,"{$user_Signature}",signtrue)
My_infotemp=Replace(My_infotemp,"{$showRe}",ShowRe)
My_infotemp=Replace(My_infotemp,"{$user_Cookies}",My_Cookies)
My_infotemp=Replace(My_infotemp,"{$user_Setuserinfo}",Setuserinfo)
My_infotemp=Replace(My_infotemp,"{$user_Setusertrue}",Setusertrue)
If CanUserInfo=True Then
My_infotemp=Replace(My_infotemp,"{$user_Realname}",ShowUserInfo(0))
My_infotemp=Replace(My_infotemp,"{$user_character}",Chk_KidneyType("character",ShowUserInfo(1),template.Strings(15)))
My_infotemp=Replace(My_infotemp,"{$user_Personal}",ShowUserInfo(2))
My_infotemp=Replace(My_infotemp,"{$user_Country}",ShowUserInfo(3))
My_infotemp=Replace(My_infotemp,"{$user_Province}",ShowUserInfo(4))
My_infotemp=Replace(My_infotemp,"{$user_City}",ShowUserInfo(5))
My_infotemp=Replace(My_infotemp,"{$user_College}",ShowUserInfo(12))
My_infotemp=Replace(My_infotemp,"{$user_Phone}",ShowUserInfo(13))
My_infotemp=Replace(My_infotemp,"{$user_Address}",ShowUserInfo(14))
My_infotemp=Replace(My_infotemp,"{$user_shengxiao}",chk_select(ShowUserInfo(6),template.Strings(11)))
My_infotemp=Replace(My_infotemp,"{$user_blood}",chk_select(ShowUserInfo(7),"A,B,AB,O"))
My_infotemp=Replace(My_infotemp,"{$user_belief}",chk_select(ShowUserInfo(8),template.Strings(16)))
My_infotemp=Replace(My_infotemp,"{$user_occupation}",chk_select(ShowUserInfo(9),template.Strings(12)))
My_infotemp=Replace(My_infotemp,"{$user_marital}",chk_select(ShowUserInfo(10),template.Strings(13)))
My_infotemp=Replace(My_infotemp,"{$user_education}",chk_select(ShowUserInfo(11),template.Strings(14)))
Else
My_infotemp=Replace(My_infotemp,"{$user_Realname}","")
My_infotemp=Replace(My_infotemp,"{$user_character}",Chk_KidneyType("character","",template.Strings(15)))
My_infotemp=Replace(My_infotemp,"{$user_Personal}","")
My_infotemp=Replace(My_infotemp,"{$user_Country}","")
My_infotemp=Replace(My_infotemp,"{$user_Phone}","")
My_infotemp=Replace(My_infotemp,"{$user_Address}","")
My_infotemp=Replace(My_infotemp,"{$user_Province}","")
My_infotemp=Replace(My_infotemp,"{$user_City}","")
My_infotemp=Replace(My_infotemp,"{$user_Cartype}","")
My_infotemp=Replace(My_infotemp,"{$user_College}","")
My_infotemp=Replace(My_infotemp,"{$user_shengxiao}",chk_select("",template.Strings(11)))
My_infotemp=Replace(My_infotemp,"{$user_blood}",chk_select("","A,B,AB,O"))
My_infotemp=Replace(My_infotemp,"{$user_belief}",chk_select("",template.Strings(16)))
My_infotemp=Replace(My_infotemp,"{$user_occupation}",chk_select("",template.Strings(12)))
My_infotemp=Replace(My_infotemp,"{$user_marital}",chk_select("",template.Strings(13)))
My_infotemp=Replace(My_infotemp,"{$user_education}",chk_select("",template.Strings(14)))
End If
Response.write My_infotemp
End Sub
Sub update()
If Dvbbs.chkpost=False Then
Dvbbs.AddErrCode(16)
Exit Sub
End If
Dim CanUseTitle,CanUseTitle1,CanUseTitle2
Dim SplitUserTitle,i,sex,showRe,face,width,height,birthday,usercookies,usertitle
Dim tMagicFace,iMagicFace,tMagicMoney,tMagicTicket,FoundUseMagic,iFace
CanUseTitle=false
CanUseTitle1=false
CanUseTitle2=false
If Not Dvbbs.FoundIsChallenge Then
If Request.Form("sex")="" Then
Dvbbs.AddErrCode(18)
ElseIf isInteger(Request.Form("sex")) Then
sex=Request.Form("sex")
Else
Dvbbs.AddErrCode(18)
End If
End If
If Request.Form("showRe")="" Then
ErrCodes=ErrCodes+"<li>"+template.Strings(17)
ElseIf isInteger(Request.Form("showRe")) Then
showRe=cint(Request.Form("showRe"))
Else
Dvbbs.AddErrCode(18)
End If
'管理员与超版自定义头像不受发帖数限制 2005-3-10 Dv.Yz
If (Dvbbs.Master Or Dvbbs.SuperBoardMaster) And Clng(Dvbbs.MyUserInfo(8)) < Cint(Dvbbs.Forum_Setting(54)) Then Dvbbs.MyUserInfo(8) = Cint(Dvbbs.Forum_Setting(54))
If Request.Form("myface") <> "" And ((Clng(Dvbbs.Forum_Setting(54)) > 0 And Not Clng(Dvbbs.MyUserInfo(8)) < Clng(Dvbbs.Forum_Setting(54))) Or Clng(Dvbbs.Forum_Setting(54))=0) And Not InStr(LCase(Request.Form("myface")),"dv_getcode.asp")>0 Then
If Request.Form("width")="" or Request.Form("height")="" Then
ErrCodes=ErrCodes+"<li>"+template.Strings(18)
ElseIf not isInteger(Request.Form("width")) or not isInteger(Request.Form("height")) Then
Dvbbs.AddErrCode(18)
ElseIf Cint(Request.Form("width"))>Cint(Dvbbs.Forum_Setting(57)) Then
ErrCodes=ErrCodes+"<li>"+template.Strings(19)
ElseIf Cint(Request.Form("height"))>Cint(Dvbbs.Forum_Setting(57)) Then
ErrCodes=ErrCodes+"<li>"+template.Strings(20)
Else
If Cint(Dvbbs.Forum_Setting(55))=0 Then
If InStr(lcase(Request.Form("myface")),"http://")>0 or instr(lcase(Request.Form("myface")),"www.")>0 Then
ErrCodes=ErrCodes+"<li>"+template.Strings(21)
End If
End If
Face=Request.Form("myface")
width=Request.Form("width")
height=Request.Form("height")
End If
Else
Dvbbs.Forum_userface = Split(Dvbbs.Forum_userface,"|||")
If Request.Form("face")="" Then
Face=Dvbbs.Forum_userface(0)&Dvbbs.Forum_userface(1)
Else
Face=Request.Form("face")
End If
End If
face=Dv_FilterJS(Replace(face,"'",""))
face=Replace(face,"..","")
face=Replace(face,"\","/")
face=Replace(face,"^","")
face=Replace(face,"#","")
face=Replace(face,"%","")
face=Replace(face,"|","")
'魔法表情检查部分
tMagicFace = Request("tMagicFace")
If tMagicFace = "" Or Not IsNumeric(tMagicFace) Then tMagicFace = 0
tMagicFace = Cint(tMagicFace)
iMagicFace = Request("iMagicFace")
If iMagicFace = "" Or Not IsNumeric(iMagicFace) Then iMagicFace = 0
iMagicFace = Clng(iMagicFace)
If tMagicFace = 1 And iMagicFace > 0 And Dvbbs.Forum_Setting(98)="1" Then
Set Rs = Dvbbs.Plus_Execute("Select iMoney,iTicket,MagicSetting From Dv_Plus_Tools_MagicFace Where MagicFace_s = " & iMagicFace)
If Rs.Eof And Rs.Bof Then
face = "0|" & face
tMagicMoney = 0
tMagicTicket = 0
Else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -