请高手帮我解决一个问题!!!!!
下面这段代码是把加到数据库的IP禁止访问网页
没加近去的是允许访问网页,
谁能帮我把他改成加到数据库的IP访问
没加近去的ip禁止
<%
Dim User_Ip
User_Ip=Request.servervariables("REMOTE_ADDR")
call IpLock(User_Ip)
Sub IpLock(User_Ip)
Dim IpArray,WhyIpLock
IpArray=split(User_Ip,".")
Dim IpSQL,IpRS
IpSQL="SELECT iplock From IpLock Where "& _
" (ipsame=4 and ip1="&Cint(IpArray(0))&" and ip2="&Cint(IpArray(1))&" and ip3="&Cint(IpArray(2))&" and ip4="&Cint(IpArray(3))&" ) "& _
" Or (ipsame=3 and ip1="&Cint(IpArray(0))&" and ip2="&Cint(IpArray(1))&" and ip3="&Cint(IpArray(2))&" ) "& _
" Or (ipsame=2 and ip1="&Cint(IpArray(0))&" and ip2="&Cint(IpArray(1))&" ) "& _
" Or (ipsame=1 and ip1="&Cint(IpArray(0))&" ) Order By ipid "
Set IpRS=Conn.execute(IpSQL)
If Not (IpRS.bof or IpRS.eof) Then
WhyIpLock=split(IpRS("iplock"),"|")
Response.Write("<script language=javascript>alert('对不起你没有权限访问此页面');history.back(1);</script>")
Response.End
End If
Set IpRS=Nothing
End Sub
%>