<%
   '以下是MSSQL版的配置
 '  dim conn   
  ' dim connstr   

'Set conn = Server.CreateObject("ADODB.Connection")
'connStr="Provider=SQLOLEDB.1; Persist Security Info=True; Data Source=IP地址; Initial Catalog=数据库名; User ID=用户名; Password=密码"
'conn.Open connstr


'以下是ACCESS版的配置

   connstr="DBQ="+server.mappath("Data/#888llee666777e8data#&%$#.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
  set conn=server.createobject("ADODB.CONNECTION")

  conn.open connstr 
%>
<%
On Error Resume Next
Dim strTemp,hk
If Trim(Request.QueryString) <> "" Then strTemp =Trim(Request.QueryString)
If Trim(Request) <> "" Then strTemp =Trim(Request)
If Request <> "" Then strTemp =Request
strTemp = LCase(strTemp)
hk=0
If Instr(strTemp,"%")<>0 then hk=1
If Instr(strTemp,"count(")<>0 then hk=1
If Instr(strTemp,"asc(")<>0 then hk=1
If Instr(strTemp,"mid(")<>0 then hk=1
If Instr(strTemp,"char(")<>0 then hk=1
If Instr(strTemp,"xp_cmdshell")<>0 then hk=1
If Instr(strTemp,"'")<>0 then hk=1
If Instr(strTemp,"select")<>0 then hk=1
If Instr(strTemp,"insert")<>0 then hk=1
If Instr(strTemp,"delete")<>0 then hk=1
If Instr(strTemp,"update")<>0 then hk=1
If Instr(strTemp,"and")<>0 then hk=1
If Instr(strTemp,"or")<>0 then hk=1
If Instr(strTemp,";")<>0 then hk=1
if hk=1 then
Response.Write "<script language='javascript'>"
Response.Write "alert('提交字符中包含非法字符,您的上网资料已被我们记录！');"
Response.Write "location.href='javascript:history.back()';"
Response.Write "</script>"
response.end
hk=0
End If
%></body></html>