sub chkip(boardid)
dim rsip
dim iparr
dim ignored
dim i
dim ip
dim sql
ip=request.servervariables("remote_addr")
ignored=false
if not isempty(boardid) then
sql="select ignoreip from board where boardid="&cstr(boardid)
set rsip=conn.execute(sql)
if not (rsip.eof and rsip.bof) then
if instr(cstr(rsip("ignoreip")&""),chr(13)&chr(10)) then
iparr=split(rsip("ignoreip"),chr(13)&chr(10))
for i=0 to ubound(iparr)
if trim(iparr(i))<>"" and left(ip,len(trim(iparr(i))))=trim(iparr(i)) then
ignored=true
exit for
end if
next
else
iparr=rsip("ignoreip")
if ip=trim(iparr) then
ignored=true
end if
end if
end if
rsip.close
end if
if ignored then
response.write "<script language=javascript>window.location.href='ignoreip.htm'</script>"
end if
end sub
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!
网友评论