<!--#include file="../include/safe.asp"-->

<%
StrTemp=request.servervariables("server_name")&request.servervariables("url")&"?"&Request.QueryString
StrTemp = LCase(StrTemp) 
If Instr(StrTemp,"select%20") or Instr(StrTemp,"insert%20") or Instr(StrTemp,"delete%20from") or Instr(StrTemp,"count(") or Instr(StrTemp,"drop%20table") or Instr(StrTemp,"update%20") or Instr(StrTemp,"truncate%20") or Instr(StrTemp,"asc(") or Instr(StrTemp,"mid(") or Instr(StrTemp,"char(") or Instr(StrTemp,"xp_cmdshell") or Instr(StrTemp,"exec%20master") or Instr(StrTemp,"net%20localgroup%20administrators") or Instr(StrTemp,"net%20user") or Instr(StrTemp,"%20or%20") or Instr(StrTemp,"'") or Instr(StrTemp,"%20") or Instr(StrTemp,"""") or Instr(StrTemp,"“") or Instr(StrTemp,"”")  or Instr(StrTemp,":") or Instr(StrTemp,"：")  or Instr(StrTemp,";") or Instr(StrTemp,"；")  or Instr(StrTemp,",") or Instr(StrTemp,"，")  or Instr(StrTemp,"（")  or Instr(StrTemp,"）")  or Instr(StrTemp,"、")  or Instr(StrTemp,"\")  or Instr(StrTemp,"`")  or Instr(StrTemp,"^")  or Instr(StrTemp,"*")  or Instr(StrTemp,"~")  or Instr(StrTemp,"-") or Instr(StrTemp,"%27") then 
Response.Write "<script language='javascript'>alert('对不起，不可以包含非法字符！');history.back();</script>" 
Response.end
End If 

	dim conn
	dim connstr
	dim db
	db="../include/#adsf#@$.mdb"
	Set conn = Server.CreateObject("ADODB.Connection")
	connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
	conn.Open connstr
	
sub CloseConn()
	conn.close
	set conn=nothing
end sub

set book=conn.execute("select * from book_setup")
sitename=book("sitename")
admin=book("admin")
password=book("password")
maxlength=cint(book("maxlength"))
view=book("view")
pages=cint(book("pages"))
html=cint(book("html"))
mailyes=cint(book("mailyes"))
book_jianju=cint(book("book_jianju"))
huifutishi=cstr(book("huifutishi"))
huifucolor=cstr(book("huifucolor"))
bad=cstr(book("bad"))
set book=nothing


'检查用户输入的内容中是否含有非法字符
function checktxt(txt)
chrtxt="33|34|35|36|37|38|39|40|41|42|43|44|47|58|59|60|61|62|63|91|92|93|94|96|123|124|125|126|128"
chrtext=split(chrtxt,"|")
for c=0 to ubound(chrtext)
txt=replace(txt,chr(chrtext(c)),"")
next
checktxt=txt
end function
%>

