www.gusucode.com > 超文本多用户论坛程序 1.1 > bbs/hs_.asp
<% sub bq '版权 %> <p align="center"><span style="FONT-SIZE: 12px">© <b><font color=green>text</font>bbs</b>.com all rights resevered.</span> <%end sub%> <!--webbot bot="PurpleText" PREVIEW="关闭数据库" --> <% sub dbclose conn.close set conn=nothing end sub %> <!--webbot bot="PurpleText" PREVIEW="防止sql" --> <% function Fsql(countsql) errorchar=array("'","!","@","$","%","^","&","*","<",">","or","/","\") for i=0 to ubound(errorchar) if instr(countsql,errorchar(i))>0 then Fsql=true end if next end function %> <!--webbot bot="PurpleText" PREVIEW="通用表单判断函数" --> <% '判断邮件 Function isemail(strng) isemail = false Dim regEx, Match Set regEx = New RegExp regEx.Pattern = "^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$" regEx.IgnoreCase = True Set Match = regEx.Execute(strng) if match.count then isemail= true End Function '判断数字 Function NOS(strng) NOS = false Dim regEx, Match Set regEx = New RegExp regEx.Pattern = "^[0-9]*[1-9][0-9]*$" regEx.IgnoreCase = True Set Match = regEx.Execute(strng) if match.count then NOS= true End Function %> <!--webbot bot="PurpleText" PREVIEW="外部数据提交防止" --> <% sub wbfz server_v1=Cstr(Request.ServerVariables("HTTP_REFERER")) server_v2=Cstr(Request.ServerVariables("SERVER_NAME")) if mid(server_v1,8,len(server_v2))<>server_v2 then %> <script language=vbscript> <!-- window.alert"禁止从外部提交数据!请登陆" window.location="http://www.textbbs.com" --> </script> <% end if end sub %> <!--webbot bot="PurpleText" PREVIEW="特殊符号替换" --> <% function ZHTSF(counts) ZHTSF=replace(counts,"'","'") end function %>