www.gusucode.com > ASP+ACCESS学生论坛设计与实现(源代码+论文+开题报告) > ASP+ACCESS学生论坛设计与实现(源代码+论文+开题报告)\13学生论坛ASPAC\BBS\ChkReg.asp
<!-- #include file="conn.asp" --> <!-- #include file="inc/const.asp" --> <!-- #include file="inc/chkinput.asp" --> <% Mybbs.LoadTemplates("login") Dim Stats,ErrCodes,TempLateStr Dim username,i,sql,Rs,useremail Stats=split(template.Strings(25),"||") Mybbs.Stats=Stats(0) Mybbs.head() ErrCodes="" If Request.form("username")="" Then ErrCodes=ErrCodes+"<li>"+template.Strings(6) If strLength(Request.form("username"))>Cint(Mybbs.Forum_Setting(41)) or strLength(Request.form("username"))<Cint(Mybbs.Forum_Setting(40)) Then TempLateStr=template.Strings(28) TempLateStr=Replace(TempLateStr,"{$RegMaxLength}",Mybbs.Forum_Setting(41)) TempLateStr=Replace(TempLateStr,"{$RegLimLength}",Mybbs.Forum_Setting(40)) ErrCodes=ErrCodes+"<li>"+TempLateStr TempLateStr="" Else username=Mybbs.CheckStr(Trim(Request.form("username"))) 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,"")>0 or Instr(username,"$")>0 Then ErrCodes=ErrCodes+"<li>"+template.Strings(46) End If Dim RegSplitWords RegSplitWords=split(Mybbs.forum_setting(4),",") for i = 0 to ubound(RegSplitWords) If instr(username,RegSplitWords(i))>0 Then ErrCodes=ErrCodes+"<li>"+template.Strings(46) End If next End If If Request("action")="" Then If IsValidEmail(trim(Request.form("email")))=false then ErrCodes=ErrCodes+"<li>"+template.Strings(30) Else useremail=Mybbs.checkStr(Request.form("email")) End If End If If ErrCodes<>"" Then Showerr() if ErrCodes="" then If cint(Mybbs.Forum_Setting(24))=1 Then If Request("action")="" Then sql="select username,useremail from [Dv_user] where username='"&username&"' or useremail='"&useremail&"'" Else sql="select username,useremail from [Dv_user] where username='"&username&"'" End If Else sql="select username,useremail from [Dv_user] where username='"&username&"'" End If Set Rs=Mybbs.execute(sql) If Not rs.eof and not rs.bof then If cint(Mybbs.Forum_Setting(24))=1 And Rs("useremail")=useremail Then If Request("action")="" Then ErrCodes=ErrCodes+"<li>"+template.Strings(44) Else ErrCodes=ErrCodes+"<li>"+template.Strings(43) End If Else ErrCodes=ErrCodes+"<li>"+template.Strings(44) End If End If Rs.close:Set Rs=Nothing If ErrCodes="" Then ErrCodes=template.Strings(45) End If Response.Write Replace(template.html(16),"{$Reportmsg}",ErrCodes) End If Call Mybbs.footer() '显示错误信息 Sub Showerr() Dim Show_Errmsg If ErrCodes<>"" Then Show_Errmsg=Mybbs.mainhtml(14) ErrCodes=Replace(ErrCodes,"{$color}",Mybbs.mainSetting(1)) Show_Errmsg=Replace(Show_Errmsg,"{$color}",Mybbs.mainSetting(1)) Show_Errmsg=Replace(Show_Errmsg,"{$errtitle}",Mybbs.Forum_Info(0)&"-"&Mybbs.Stats) Show_Errmsg=Replace(Show_Errmsg,"{$action}",Mybbs.Stats) Show_Errmsg=Replace(Show_Errmsg,"{$ErrString}",ErrCodes) End If Response.write Show_Errmsg End Sub %>