connxyz.asp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <%Session.CodePage=65001%>
  2. <META http-equiv=Content-Type content="text/html; charset=utf-8">
  3. <!--#include file="MD5.asp"-->
  4. <%'在线判断
  5. sub log_chk()
  6. if session("adminxxx")="" then
  7. response.Redirect("../index.asp")
  8. end if
  9. end sub%>
  10. <%'返回上以页
  11. Sub BackUrl(text)
  12. response.Write"<script language='javascript'>alert('"&text&"');history.go(-1);</script>"
  13. response.End()
  14. end Sub%>
  15. <%'返回指定页
  16. Sub GoUrl(Url,Txt)
  17. response.write"<SCRIPT language=JavaScript>alert('"&Txt&"');"
  18. response.write"this.location.href='"&Url&"';</SCRIPT>"
  19. response.end
  20. end sub%>
  21. <%'特殊字符过滤
  22. sub passChk()
  23. dim sql_injdata
  24. SQL_injdata = "’|""|{|}|[|]|\|:|;|<|>|?|,|.|`|~|!|@|$|%|^|(|)|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|or"
  25. SQL_inj = split(SQL_Injdata,"|")
  26. '防止Get方法注入
  27. If Request.QueryString<>"" Then
  28. For Each SQL_Get In Request.QueryString
  29. For SQL_Data=0 To Ubound(SQL_inj)
  30. if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
  31. response.Redirect("../index.asp")
  32. end if
  33. next
  34. Next
  35. End If
  36. '防止Post方法注入
  37. If Request.Form<>"" Then
  38. For Each Sql_Post In Request.Form
  39. For SQL_Data=0 To Ubound(SQL_inj)
  40. if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
  41. response.Redirect("../index.asp")
  42. end if
  43. next
  44. next
  45. end if
  46. end sub%>
  47. <%'数据库路径
  48. set Conn=server.createobject("adodb.connection")
  49. Conn.open"provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("../../database/#database1#.mdb")%>
  50. <!--#include file="theFunc.asp"-->