
<%'用户IP限制
function LockIP(sip)
	dim str1,str2,str3,str4
	dim num
	LockIP=false
	if isnumeric(left(sip,2)) then
		str1=left(sip,instr(sip,".")-1)
		sip=mid(sip,instr(sip,".")+1)
		str2=left(sip,instr(sip,".")-1)
		sip=mid(sip,instr(sip,".")+1)
		str3=left(sip,instr(sip,".")-1)
		str4=mid(sip,instr(sip,".")+1)
		if isNumeric(str1)=0 or isNumeric(str2)=0 or isNumeric(str3)=0 or isNumeric(str4)=0 then
	
		else
			num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
			sql="select count(*) from noip where ip1 <="&num&" and ip2 >="&num&""
			set rs_ip=conn.execute(sql)
			if rs_ip(0)>0 then 
				lockip=true
			end if
			set rs_ip=nothing
		end if
	end if
end function%>
<%if LockIP(Request.ServerVariables("REMOTE_ADDR")) then
	response.write "<script>alert('您的IP:"&request.servervariables("remote_addr")&"已经被限制不能访问,请和管理员联系! QQ:223041353');location.href='about:blank'</script><script>window.close();</script>"

	response.end
	end if
%>
