<!-- #include file="common.asp"-->
<!-- #include file="isadm.asp" -->
<%
Dim zsb_auth, hasAuth
hasAuth = False
zsb_auth = Split( Trim( session("zsb_auth") ), ",", -1, 1 )

For Each auth In zsb_auth
	If ( auth = "denyip" ) Then
			hasAuth = True
		Exit For
	End If
Next

If hasAuth = false Then
	Response.Write("<script language=javascript>alert('对不起，你没有权限，请联系超级管理员！');history.back(-1);</script>")
End If
%>
<%
  Dim Sql, OpType, RetUrl
	OpType = Trim(Request.QueryString("op"))
  If  OpType = "SetDenyIp" Then
    Sql = "insert into DenyIP ( IPAddr ) values ( '" & Trim(Request("IPAddr")) & "' )"
		RetUrl = "manage.asp?pn="&Trim(Request("pn"))
  ElseIf OpType = "DelDenyIp" Then
    Sql = "delete from DenyIP where IPAddr='" & Trim(Request("IPAddr")) & "'"
		RetUrl = "DenyIPList.asp?pn="&Trim(Request("pn"))
  End If

  conn.Execute(Sql)
  conn.Close
  Set conn = Nothing

  Response.Write("<script Language=Javascript>alert('设置成功!');location.href='"&RetUrl&"';</script>")
%>