⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipblock.asp

📁 电子商务网络购物系统
💻 ASP
字号:
<% Option Explicit %>
<!--#include file="conn.asp" -->
<%
Dim rsSelectForum
Dim strBlockIP
Dim strBlockedIPList
Dim lngBlockedIpid
Dim laryCheckedIPAddrID

For each laryCheckedIPAddrID in Request.Form("chkDelete")
strSQL = "SELECT * FROM timesfilter WHERE timesfilter.filterid="  & laryCheckedIPAddrID & ";"
	With rsConn		
		.CursorType = 2
		.LockType = 3
		.Open strSQL, adoCon
		If NOT .EOF Then .Delete
		.Requery
		.Close
	End With
Next

strSQL = "SELECT timesfilter.filterid, timesfilter.IP FROM timesfilter WHERE timesfilter.IP Is Not Null;"
rsConn.CursorType = 2
rsConn.LockType = 3
rsConn.Open strSQL, adoCon
If Request.Form("IP") <> "" Then
	strBlockIP = Trim(Mid(Request.Form("IP"), 1, 30))
	With rsConn
		.AddNew
		.Fields("IP") = strBlockIP
		.Update
		.ReQuery
	End With
End If
%>

<html>
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<title>屏蔽IP地址(段)</title>

<script language="JavaScript">
function CheckForm () {
	if (document.frmIPadd.IP.value==""){
		alert("请输入一个IP地址(段)");
		document.frmIPadd.IP.focus();
		return false;
	}
	return true;
}
</script>

<link href="includes/style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div align="center"><font size="5"><strong>屏蔽IP地址(段)</strong></font><br>
  <br />
  <a href="menu.asp" target="_self">返回到管理主菜单</a><br />
</div>
<form name="frmIPList" method="post" action="ipblock.asp">
 <table width="350" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" align="center">
 <tr>
  <td>
  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
    <tr>
     <td bgcolor="#000000">
   <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000">
    <tr>
   <td>
    <table border="0" align="center" cellpadding="4" cellspacing="1" width="100%">
     <tr align="left" bgcolor="#FFFFFF">
      <td colspan="2" bgcolor="#CCCCCC" class="tHeading">被屏蔽的IP地址列表</td>
     </tr><%
If rsConn.EOF Then 
	Response.Write("<td colspan=""2"" align=""center"" bgcolor=""#FFFFFF"" class=""bold"">没有被屏蔽的IP地址</td>")
Else
	Do While NOT rsConn.EOF
     		lngBlockedIpid = CLng(rsConn("filterid"))
		strBlockedIPList = rsConn("IP")
     
     %>
     <tr bgcolor="#FFFFFF">
      <td width="3%" bgcolor="#FFFFFF"><input type="checkbox" name="chkDelete" value="<% = lngBlockedIpid %>"></td>
      <td bgcolor="#FFFFFF" class="text"><% = strBlockedIPList %></td>
     </tr><%
		rsConn.MoveNext
	Loop
End If
rsConn.Close
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
%>
          </select></td>
     </tr>
     <tr bgcolor="#FFFFFF"  align="center">
      <td valign="top" colspan="2">
        <input type="submit" name="Submit" value="解除锁定">
      </td>
     </tr>
    </table>
   </td>
  </tr>
 </table>
 </td>
  </tr>
 </table>
 </td>
  </tr>
 </table>
</form>
<form name="frmIPadd" method="post" action="ipblock.asp" onSubmit="return CheckForm();">
 <table width="350" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" align="center">
  <tr>
  <td>
  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor=""#FFFFFF">
    <tr>
     <td bgcolor=""#FFFFFF">
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
   <td>
    <table border="0" align="center" cellpadding="4" cellspacing="1" width="350">
           <tr align="left" bgcolor="#CCCCCC"> 
                        <td colspan="2" class="tHeading"> 屏蔽IP地址(段)</td>
     </tr>
           <tr bgcolor="#FFFFFF"> 
                        <td colspan="2" align="center" class="smText"> 通配符 
                          * 可以用来批量屏蔽IP地质段<br>
                          例如. 要屏蔽IP地质段 '200.200.200.0 - 255' 只需输入'200.200.200.*' 
                        </td>
     </tr>
           <tr bgcolor="#FFFFFF"> 
                        <td align="right" class="text"> IP地址(段):</td>
            <td> 
             <input type="text" name="IP" size="20" maxlength="30"/></td>
     </tr>
           <tr bgcolor="#FFFFFF" align="center"> 
            <td colspan="2" valign="top">
        <input type="submit" name="Submit" value="确定">
      </td>
     </tr>
    </table>
   </td>
  </tr>
 </table>
 </td>
  </tr>
 </table>
 </td>
  </tr>
 </table>
   </form>
<br />
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -