% Dim Action,Page_Url If Session(CacheName&"RegTime")+BBS.Info(9)/1440>now() then BBS.GotoErr(24) If BBS.Info(40)="0" then BBS.GoToErr(23) Action=request.querystring("action") If Action <> "" Then Page_Url = "?action="&Action Else Page_Url = "" End If BBS.Head"Register.asp"&Page_Url,"","注册新用户" If Len(Action)>10 Then BBS.GoToErr(1) Select Case Action Case"agree" Register() Case"check" RegSaveData() Case Else RegMain() End Select BBS.Footer() Set BBS =Nothing Sub RegMain() Dim Caption,Content Caption="注册协议" Content="
"&_ "" BBS.ShowTable Caption,Content End Sub Sub RegSaveData() With BBS .CheckMake'禁止外部提交 Dim S,Caption,Content,Rs,Name,password,RePassword,Clue,Answer,Mail,PicUrl,headpicoption,PicW,PicH,Home,Sign,QQ,IsQQpic,Sex,Birthday,iCode,UserID,IsDel Name=.Fun.GetStr("name") password=.Fun.GetStr("password") RePassword=.Fun.GetStr("repassword") Clue=.Fun.GetStr("clue") Answer=.Fun.GetStr("answer") Mail=.Fun.GetStr("mail") iCode=.Fun.GetStr("iCode") If name="" or Password="" or RePassword="" or Mail="" or Clue="" or Answer="" Then .GoToErr(36) If .Fun.StrLength(name)>14 or .Fun.StrLength(name)<2 or .Fun.strLength(password)>14 Then .GoToErr(38) If Not .Fun.CheckName(name) OR Not .Fun.CheckPassword(Password) Then .GoToErr(37) If instr(lcase(.Info(52)),lcase(Name))>0 Then .GoToErr(37) If Not .Execute("SELECT name FROM [user] where Name='"&Name&"'").Eof Then .GoToErr(39) IF instr("123456|1234567|12345678|123456789|1111111|222222|333333|888888|aaaaaaa","|"& Password &"|")>0 or len(Password)<6 Then .GoToErr(40) If Repassword<>Password Then .GoToErr(41) If .Info(13)="1" Then If iCode<>Session("iCode") or Session("iCode")="" Then .GotoErr(8) End If Mail=server.HTMLEnCode(Mail) If Not .Fun.IsValidEmail(Mail) Then .GoToErr(42) '只允一个邮箱 If .Info(42)="1" Then If Not .Execute("SELECT ID FROM [user] where Mail='"&Mail&"'").Eof Then .GoToErr(49) End If If .Fun.GetStr("rnd")<>"bd04c9fea4c8" Then .GoToErr(2) If Len(Clue)<3 or Len(Answer)<3 Then .GoToErr(43) If not .Fun.CheckIn(Clue) or not .Fun.CheckIn(Answer) Then .GoToErr(44) PicUrl=lcase(.Fun.HtmlCode(.Fun.GetStr("PicUrl"))) headpicoption=.Fun.HtmlCode(.Fun.GetStr("headpicoption")) If Not .Fun.isInteger(headpicoption) Or Not .Fun.IsUrl(PicUrl) Then .GoToErr(81) Home=.Fun.HtmlCode(.Fun.GetStr("Home")) Sex=.Fun.GetStr("Sex") Birthday=.Fun.GetStr("Birthday") QQ=.Fun.GetStr("QQ") IsQQpic=.Fun.GetStr("IsQQpic") If Instr(Home,"://")=0 Then Home=.Info(1) If IsQQpic<>"1" Then IsQQpic="0" Sign=Replace(Left(.Fun.Replacehtml(.Fun.GetStr("Sign")),255),"{帖子内容}","") PicH=.Fun.GetStr("PicH") PicW=.Fun.Getstr("PicW") If .Info(57)="1" And (Instr(PicUrl,"://")>0 Or Instr(Lcase(Picurl),"www")>0 Or Instr(Lcase(PicUrl),"..")>0) Then .GotoErr(45)'禁止外部图片 If PicUrl="" then PicUrl="Pic/headpic/"& headpicoption &".gif" PicW= .Info(54) PicH= .Info(55) End If If (QQ<>"" And not isnumeric(QQ)) Or (IsQQpic="1" and QQ="") then .GoToErr(46) If Len(Clue)>70 Or Len(Answer)>70 or Len(Mail)>50 or Len(PicUrl)>220 or Len(QQ)>20 or Len(Home)>250 Then .GoToErr(47) If Not isnumeric(PicW) or Not isnumeric(PicH) Then .GoToErr(48) If Int(PicW)>int(.Info(56)) or Int(PicH)>int(.Info(56)) then PicW=.Info(54) PicH=.Info(55) End If If Not isdate(Birthday) then Birthday="Null" Else .Cache.clean("Birthday") Birthday="'"&Birthday&"'" End If If .Info(41)="1" then IsDel=2'注册核审 S="