<%
set rs=server.createobject("adodb.recordset")
sql="select * from Web_Setting"
rs.open(sql),conn,1,1
web_name=rs("web_name")
web_title=rs("web_title")
web_keywords=rs("web_keywords")
web_description=rs("web_description")
web_url=rs("web_url")
web_icp=rs("web_icp")
web_mail=rs("web_mail")
web_qq=rs("web_qq")
web_tel=rs("web_tel")
web_add=rs("web_add")
web_author=rs("web_author")
web_Edition=rs("web_Edition")
web_copyright=rs("web_copyright")
web_slogan=rs("web_slogan")
web_xiaoxi=rs("web_xiaoxi")
web_simg=rs("web_simg")
web_area=rs("web_area")
web_maillist=rs("web_maillist")
web_jztime=rs("web_jztime")
rs.close
set rs=nothing

if web_area<>"" then
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
If userip = "" Then 
userip = Request.ServerVariables("REMOTE_ADDR") 
end if
IPArray=Split(userip,".",-1,1)
For i=0 To 3
	tIp = tIp +IPArray(i)*256^(3-i)
Next
ip=tIp
set rs=server.createobject("adodb.recordset")
query="select country from user_ip where (ip1<=" &ip& " and ip2>=" &ip&")"
rs.open query,conn,1,1
ipdili=rs("country")
rs.close
set rs=nothing

str=web_area
strArr=split(str,"£¬")
for dq=0 to ubound(strArr)
if instr(ipdili,""&strArr(dq)&"")>0 then
response.write "<Script language=JavaScript>;location.href='../Erro/Shield'</Script>"
response.end 
end if
next

end if
%>
