📄 reg.asp
字号:
<!--#include file="Conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="inc/chan_const.asp"-->
<!--#include file="inc/chkinput.asp"-->
<!--#include file="inc/email.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/UpiConfig.asp"-->
<%
Dim ComeUrl
ComeUrl = Replace(Lcase(Request.ServerVariables("SCRIPT_NAME")),"reg.asp","")
ComeUrl = "http://" & Lcase(Request.ServerVariables("HTTP_HOST")) & ComeUrl
ComeUrl = ComeUrl & Dvbbs.Forum_Info(11)
Response.Redirect PE_Url & "Reg/User_Reg.asp?ComeUrl="&ComeUrl
Dim Selectinfo(5)
Dvbbs.LoadTemplates("usermanager")
Selectinfo(0)=chk_select("",template.Strings(11))
Selectinfo(1)=chk_select("",template.Strings(12))
Selectinfo(2)=chk_select("",template.Strings(13))
Selectinfo(3)=chk_select("",template.Strings(14))
Selectinfo(4)=Chk_KidneyType("character","",template.Strings(15))
Selectinfo(5)=chk_select("",template.Strings(16))
Dvbbs.LoadTemplates("login")
Dim Stats,ErrCodes
Stats=split(template.Strings(25),"||")
Dvbbs.Stats=Stats(0)
Dvbbs.Nav()
If Cint(dvbbs.Forum_Setting(37))=0 Then
ErrCodes=ErrCodes+"<li>"+template.Strings(26)
Else
If request("action")="apply" Then
Dvbbs.stats=Stats(2)
Dvbbs.Head_var 0,0,Stats(0),"reg.asp"
reg_2()
ElseIf request("action")="save" Then
Dvbbs.stats=Stats(3)
Dvbbs.Head_var 0,0,Stats(0),"reg.asp"
reg_3()
ElseIf request("action")="redir" Then
Dvbbs.stats=Stats(3)
Dvbbs.Head_var 0,0,Stats(0),"reg.asp"
redir()
Else
Dvbbs.stats=Stats(1)
Dvbbs.Head_var 0,0,Stats(0),"reg.asp"
reg_1()
End If
End If
Dvbbs.Showerr()
If ErrCodes<>"" Then Response.redirect "showerr.asp?ErrCodes="&ErrCodes&"&action=OtherErr"
Dvbbs.ActiveOnline
Dvbbs.Footer()
Sub reg_1()
Dim TempLateStr
TempLateStr=template.html(12)
TempLateStr=Replace(TempLateStr,"{$Forum_Name}",Dvbbs.Forum_Info(0))
Response.Write TempLateStr
End Sub
Sub reg_2()
Dim grouploopinfo,TempLateStr,Rs
TempLateStr=template.html(13)
If Dvbbs.forum_setting(78)="0" Then
TempLateStr=Replace(TempLateStr,"{$getcode}","")
Else
template.html(24)=Replace(template.html(24),"{$codestr}",Dvbbs.GetCode())
TempLateStr=Replace(TempLateStr,"{$getcode}",template.html(24))
End If
Set Rs=Dvbbs.Execute("select * from DV_GroupName")
If Rs.eof and Rs.bof Then
grouploopinfo="<option value=无门无派>无门无派</option>"
Else
do while not Rs.eof
grouploopinfo=grouploopinfo & "<option value="&rs("Groupname")&">"&rs("GroupName")&"</option>"
Rs.movenext
loop
End If
Rs.close:Set Rs=Nothing
Dim userregface,i,Forum_userface,FaceDefault
Forum_userface = split(Dvbbs.Forum_userface,"|||")
FaceDefault=Forum_userface(0)&Forum_userface(1)
For i = 1 to Ubound(Forum_userface)-1
userregface = userregface+"<option value="&Forum_userface(0)&Forum_userface(i)
userregface = userregface+">"+Forum_userface(i)+"</option>"
Next
TempLateStr=Replace(TempLateStr,"{$color}",Dvbbs.mainsetting(1))
TempLateStr=Replace(TempLateStr,"{$FaceDefault}",FaceDefault)
TempLateStr=Replace(TempLateStr,"{$Face_select}",userregface)
TempLateStr=Replace(TempLateStr,"{$FaceMaxWidth}",Dvbbs.Forum_Setting(38))
TempLateStr=Replace(TempLateStr,"{$FaceMaxHeight}",Dvbbs.Forum_Setting(39))
TempLateStr=Replace(TempLateStr,"{$ForumFaceMax}",Dvbbs.Forum_Setting(57))
TempLateStr=Replace(TempLateStr,"{$NameLimLength}",Dvbbs.Forum_Setting(40))
TempLateStr=Replace(TempLateStr,"{$NameMaxLength}",Dvbbs.Forum_Setting(41))
TempLateStr=Replace(TempLateStr,"{$Forum_ChanSetting0}",Dvbbs.Forum_ChanSetting(0))
TempLateStr=Replace(TempLateStr,"{$Forum_ChanSetting9}",Dvbbs.Forum_ChanSetting(9))
TempLateStr=Replace(TempLateStr,"{$Forum_Setting7}",Dvbbs.Forum_Setting(7))
TempLateStr=Replace(TempLateStr,"{$Forum_Setting23}",Dvbbs.Forum_Setting(23))
TempLateStr=Replace(TempLateStr,"{$Forum_Setting32}",Dvbbs.Forum_Setting(32))
TempLateStr=Replace(TempLateStr,"{$Forum_Setting54}",Dvbbs.Forum_Setting(54))
TempLateStr=Replace(TempLateStr,"{$Forum_Setting42}",Dvbbs.Forum_Setting(42))
TempLateStr=Replace(TempLateStr,"{$grouploopinfo}",grouploopinfo)
TempLateStr=Replace(TempLateStr,"{$user_blood}",chk_select("","A,B,AB,O"))
TempLateStr=Replace(TempLateStr,"{$user_shengxiao}",Selectinfo(0))
TempLateStr=Replace(TempLateStr,"{$user_occupation}",Selectinfo(1))
TempLateStr=Replace(TempLateStr,"{$user_marital}",Selectinfo(2))
TempLateStr=Replace(TempLateStr,"{$user_education}",Selectinfo(3))
TempLateStr=Replace(TempLateStr,"{$user_character}",Selectinfo(4))
TempLateStr=Replace(TempLateStr,"{$user_belief}",Selectinfo(5))
Response.Write TempLateStr
End Sub
'下拉菜单转换输出
Function Chk_select(str1,str2)
Dim k
str2=Split(str2,",")
If IsEmpty(str1) Or str1="" Then chk_select="<option value='' selected>...</option>"
For k=0 to ubound(str2)
chk_select=chk_select+"<option value="+str2(k)
If str2(k)=str1 Then chk_select=chk_select+" selected "
chk_select=chk_select+" >"+str2(k)+"</option>"
Next
End Function
'多项选取转换输出
Function Chk_KidneyType(str0,str1,str2)
Dim k
str2=split(str2,",")
For k = 0 to ubound(str2)
chk_KidneyType=chk_KidneyType+"<input type=""checkbox"" name="""&str0&""" value="""&trim(str2(k))&""" "
If instr(str1,trim(str2(k)))>0 Then '如果有此项性格
chk_KidneyType=chk_KidneyType + "checked"
End If
chk_KidneyType=chk_KidneyType + ">"&trim(str2(k))&" "
If ((k+1) mod 5)=0 Then chk_KidneyType=chk_KidneyType + "<br>" '每行显示六个性格进行换行
Next
End Function
Sub reg_3()
Dim username,sex,pass1,pass2,password
Dim useremail,face,width,height
Dim sign,showRe,birthday,UserIM
Dim mailbody,sendmsg,rndnum,num1
Dim quesion,answer,topic
Dim userinfo,usersetting
Dim userclass
Dim rs,sql,i,TempLateStr
If not isnull(session("regtime")) or cint(Dvbbs.Forum_Setting(22))>0 Then
If DateDiff("s",session("regtime"),Now())<cint(Dvbbs.Forum_Setting(22)) Then
ErrCodes=ErrCodes+"<li>"+Replace(template.Strings(27),"{$RegTime}",Dvbbs.Forum_Setting(22))
Exit Sub
End If
End If
If Dvbbs.chkpost=false Then
Dvbbs.AddErrCode(16)
Exit sub
End If
If Request.form("name")="" or strLength(Request.form("name"))>Cint(Dvbbs.Forum_Setting(41)) or strLength(Request.form("name"))<Cint(Dvbbs.Forum_Setting(40)) Then
TempLateStr=template.Strings(28)
TempLateStr=Replace(TempLateStr,"{$RegMaxLength}",Dvbbs.Forum_Setting(41))
TempLateStr=Replace(TempLateStr,"{$RegLimLength}",Dvbbs.Forum_Setting(40))
ErrCodes=ErrCodes+"<li>"+TempLateStr
TempLateStr=""
Exit Sub
Else
username=Dvbbs.CheckStr(Trim(Request.form("name")))
End If
If Instr(username,"=")>0 or Instr(username,"%")>0 or Instr(username,chr(32))>0 or Instr(username,"?")>0 or Instr(username,"&")>0 or Instr(username,";")>0 or Instr(username,",")>0 or Instr(username,"'")>0 or Instr(username,",")>0 or Instr(username,chr(34))>0 or Instr(username,chr(9))>0 or Instr(username,"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -