<%@ LANGUAGE = VBScript.Encode %>
<%
'检测是否有效的数字-----------------
Function IsInteger(Para) 
	IsInteger=False
	If Not (IsNull(Para) Or Trim(Para)="" Or Not IsNumeric(Para)) Then
		IsInteger=True
	End If
End Function
'检查无效字符----------------------
Function CheckStr(byVal ChkStr) 
	Dim Str:Str=ChkStr
	Str=Trim(Str)
	If IsNull(Str) Then
		CheckStr = ""
		Exit Function 
	End If
	Dim re
	Set re=new RegExp
	re.IgnoreCase =True
	re.Global=True
	re.Pattern="(\r\n){3,}"
	Str=re.Replace(Str,"$1$1$1")
	Set re=Nothing
	Str = Replace(Str,"'","''")
	Str = Replace(Str, "!!!", "!")
	Str = Replace(Str, "★★★", "★")
	CheckStr=Str
End Function
'转换HTML代码-----------------------
Function HTMLDecode(reString)
	Dim Str:Str=reString
	If Not IsNull(Str) Then
		Str = Replace(Str, "&amp;", "&")
		Str = Replace(Str, "&gt;", ">")
		Str = Replace(Str, "&lt;", "<")
		Str = Replace(Str, "&nbsp;", CHR(32))
	    Str = Replace(Str, "&nbsp;", CHR(9))
		Str = Replace(Str, "&#160;&#160;&#160;&#160;", CHR(9))
		Str = Replace(Str, "&quot;", CHR(34))
		Str = Replace(Str, "&#39;", CHR(39))
		Str = Replace(Str, "", CHR(13))
		Str = Replace(Str, "<br>", CHR(10))
		HTMLDecode = Str
	End If
End Function


'--------SQL防注入定义部份------------------
Dim Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh
Fy_In = "or|三维画|钢|板|天津|管|枪|★|◣|◢|法轮功|法轮功|贷款|迷药|迷昏药|窃听器|六合彩|买卖枪支|三唑仑|麻醉药|麻醉乙醚|短信群发器|催情药|春药|窃听器|出售手枪|办理证件|办证|办理文凭|骗子|join|union|like|modify|cast|drop|exec|insert|select|delete|update|count|alter|rename|chr|mid|truncate|char|declare|'"
Fy_Inf = split(Fy_In,"|")
'--------POST部份------------------
If Request.Form<>"" Then
For Each Fy_Post In Request.Form
For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.Form(Fy_Post)),Fy_Inf(Fy_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>alert('长春人提示您↓\n\n您的本此操作失败了！');history.back();</Script>"
Response.End
End If
Next
Next
End If
'--------GET部份-------------------
If Request.QueryString<>"" Then
For Each Fy_Get In Request.QueryString
For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.QueryString(Fy_Get)),Fy_Inf(Fy_Xh))<>0 Then
Response.Write "<Script Language=JavaScript>alert('长春人提示您↓\n\n您的本此操作失败了！');history.back();</Script>"
Response.End
End If
Next
Next
End If
'----------------------------------
'数据库连接文件
dim conn,connstr,db,startime
startime=timer()
'db="1dataxa2s.com/%29%25cnmai468coms1.mdb"
db="alldata/#ak9826.mdb"

Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
'connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(db)
conn.Open connstr
sub closedb()
conn.close
set rs=nothing
set conn=nothing
end sub
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "<script Language=javascript>location.href = '我休息会,马上就好,请稍后访问！';</script>"
Response.End
End If
%>