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

📄 admin_iplock.asp

📁 浪人文章系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		GuSystemURL="<a href=""Admin_IPLock.asp""><img src=""Images/Admin_Button_OK.gif"" border=""0""></a>"
	end if
	rsIP3.close
	set rsIP3=Nothing

	call GuMessage()

end sub 


Sub IPLockDelete()

	if Trim(Request.Form("GuResourceID"))="" then
		GuSystemCode=3
		GuSystemMessage="没有选择要删除的IP地址"
	else
		GuConn.execute("delete from "&GuTablePrefix&"_IPLock where IP_ID in ("&Trim(Request.Form("GuResourceID"))&")")
		GuSystemCode=00
		GuSystemMessage="IP地址已删除完成"
		GuSystemURL="<a href=""Admin_IPLock.asp""><img src=""Images/Admin_Button_OK.gif"" border=""0""></a>"
	end if

	call GuMessage()

end sub


Sub Admin_IPLock(isIPLockModify)

	if isIPLockModify then
		dim rsIP7
		set rsIP7=Server.CreateObject("Adodb.RecordSet")
		rsIP7.open "select * from "&GuTablePrefix&"_IPLock where IP_ID="&Request.QueryString("IP_ID"),GuConn,1,1
	end if
%>
<table border="0" cellpadding="0" cellspacing="1" width="600" height="10" bgcolor="#CEEFE7">
<form name="Admin_IPLock" method="post" action="Admin_IPLock.asp">
 <tr>
  <td width="600" height="30" background="Images/Admin_T_Bg1.gif" align="center" colspan="3"><font class="BlackS12"><b>网 站 访 问 限 制 管 理</b></font></td>
 </tr>
 <tr>
  <td width="600" height="10" bgcolor="#FFFFFF" colspan="3"></td>
 </tr>
 <tr>
  <td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">IP地址</font></td>
  <td width="276" height="28" bgcolor="#FFFFFF">&nbsp;<font class="BlackS14"><input type="text" name="IP_A" maxlength="3" value="<%if isIPLockModify then Response.write rsIP7("IP_A") end if%>" class="Admin_InputText" style="width:38;background-color:#EAFBF5;text-align:center;" onKeypress="if(event.keyCode<48||event.keyCode>57)event.returnValue=false;">.<input type="text" name="IP_B" maxlength="3" value="<%if isIPLockModify then Response.write rsIP7("IP_B") end if%>" class="Admin_InputText" style="width:38;background-color:#EAFBF5;text-align:center;" onKeypress="if(event.keyCode<48||event.keyCode>57)event.returnValue=false;">.<input type="text" name="IP_C" maxlength="3" value="<%if isIPLockModify then Response.write rsIP7("IP_C") end if%>" class="Admin_InputText" style="width:38;background-color:#EAFBF5;text-align:center;" onKeypress="if(event.keyCode<48||event.keyCode>57)event.returnValue=false;">.<input type="text" name="IP_D" maxlength="3" value="<%if isIPLockModify then Response.write rsIP7("IP_D") end if%>" class="Admin_InputText" style="width:38;background-color:#EAFBF5;text-align:center;" onKeypress="if(event.keyCode<48||event.keyCode>57)event.returnValue=false;"></font></td>
  <td width="240" height="28" bgcolor="#FFFFFF">&nbsp;<span class="BlackS12">填写IP地址,若留空则自动以“0”填充</span></td>
 </tr>
 <tr>
  <td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">设置段数</font></td>
  <td width="276" height="28" bgcolor="#FFFFFF">&nbsp;<select name="IP_Same" size="1" class="Admin_Select" style="background-color:#EAFBF5;">
<%if isIPLockModify then%>
<option value="4"<%if rsIP7("IP_Same")="4" then Response.write " selected" end if%>>单个IP地址</option>
<option value="3"<%if rsIP7("IP_Same")="3" then Response.write " selected" end if%>>前 3 段相同</option>
<option value="2"<%if rsIP7("IP_Same")="2" then Response.write " selected" end if%>>前 2 段相同</option>
<option value="1"<%if rsIP7("IP_Same")="1" then Response.write " selected" end if%>>前 1 段相同</option>
<%else%>
<option value="4" selected>单个IP地址</option>
<option value="3">前 3 段相同</option>
<option value="2">前 2 段相同</option>
<option value="1">前 1 段相同</option>
<%end if%></select></font></td>
  <td width="240" height="28" bgcolor="#FFFFFF">&nbsp;<span class="BlackS12">选择IP段数</span></td>
 </tr>
 <tr>
  <td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">备注说明</font></td>
  <td width="276" height="28" bgcolor="#FFFFFF">&nbsp;<input type="text" name="IP_Note" value="<%if isIPLockModify then Response.write rsIP7("IP_Note") end if %>" style="width:260;background-color:#FFFFFF;" class="Admin_InputText"></td>                
  <td width="240" height="28" bgcolor="#FFFFFF">&nbsp;<font class="BlackS12">填写注释说明</font></td>        
 </tr>
 <tr>
  <td width="80" height="28" bgcolor="#FFFFFF" align="center"><font class="BlackS12">选择类型</font></td>
  <td width="276" height="28" bgcolor="#FFFFFF">&nbsp;<font class="BlackS12"><input type="radio" name="IP_Type" value="user" id="LabelIP_Typeuser"<%if isIPLockModify then%><%if rsIP7("IP_Type")="user" then Response.write " checked" end if%><%end if%>><label for="LabelIP_Typeuser">前台[限制]</label>&nbsp;&nbsp;<input type="radio" name="IP_Type" value="admin" id="LabelIP_Typeadmin"<%if isIPLockModify then%><%if rsIP7("IP_Type")="admin" then Response.write " checked" end if%><%end if%>><label for="LabelIP_Typeadmin">后台[允许]</label></font></td>
  <td width="240" height="28" bgcolor="#FFFFFF">&nbsp;<span class="BlackS12">选择是限制访问前台还是允许访问后台</span></td>
 </tr>
 <tr>
  <td width="80" height="38" bgcolor="#FFFFFF"><input type="hidden" name="GuComm" value="<%if isIPLockModify then Response.write "MoSa" else Response.write "AdSa" end if%>"><%if isIPLockModify then%><input type="hidden" name="IP_ID" value="<%=rsIP7("IP_ID")%>"><%end if%></td>
  <td width="518" height="38" bgcolor="#FFFFFF" colspan="2">&nbsp;<input type="submit" name="Submit2" value="" class="<%if isIPLockModify then Response.write "Admin_Button_Modify" else Response.write "Admin_Button_Add" end if%>">&nbsp;<input type="Reset" value="" name="Reset2" class="Admin_Button_Reset">&nbsp;<input type="button" value="" name="Help" class="Admin_Button_Help" onclick="JavaScript:GuDIVShowHidden(Admin_Help);"></td>
 </tr>
</form>
</table>
<%
if isIPLockModify then
	rsIP7.close
	set rsIP7=Nothing
end if
%>
<div id="Admin_Help" style="display:none">
<br>
<table border="0" cellpadding="0" cellspacing="1" width="600" height="1" bgcolor="#CEEFE7">
 <tr>
  <td width="600" height="100" bgcolor="#FFFFFF" align="center"><table border="0" width="580" height="10"><tr><td height="6" width="580"></td></tr>
  <tr>
	<td height="26" width="580"><font class="BlueS12">设置限制用户访问网站说明:</font><br><br><font class="BlueS12">前台[限制]:</font><font class="BlackS12">如果要限制某单个IP地址访问网站[前台],设置段数即选择“单个IP地址”,如果要设置限制某一段的IP地址访问网站[前台],输入IP地址再选择相应的段数。比如填写的IP地址是:218.66.78.38,选择的段数是“前1段相同”那么所有以218开头的IP地址都被限制访问网站[前台]。<br><br><font class="BlueS12">后台[允许]:</font>如果要设置允许访问后台页面的IP地址,首先要把你当前登录网站的IP地址添加进去,否则,当你添加完第一个后就会被限制了。如果你添加了允许登录后台的IP地址,那么只有已经添加并符合条件的IP地址才能访问后台页面文件,其它的IP地址将被全部限制,如果你不想限制IP地址访问后台页面,请在列表中删除全部后台[允许]的IP地址。<br><br>若有其它问题,请参阅使用说明文档</font></td>
  </tr>
  <tr><td height="6" width="580"></td></tr></table></td>
 </tr>
</table>
</div>

<br>

<table border="0" cellpadding="0" cellspacing="1" width="600" height="10" bgcolor="#CEEFE7">
<form name="Admin_IPLock_List" method="post" action="Admin_IPLock.asp">
 <tr>
  <td width="41" height="26" bgcolor="#EAFBF5" align="center"><font class=BlackS12>编号</font></td>
  <td width="38" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">选择</font></td>
  <td width="108" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">IP地址</font></td>
  <td width="78" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">设置段数</font></td>
  <td width="135" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">备注说明</font></td>
  <td width="78" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">类型</font></td>
  <td width="76" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">整理日期</font></td>
  <td width="38" height="26" bgcolor="#EAFBF5" align="center"><font class="BlackS12">编辑</font></td>
 </tr>
<%
dim rsIP8
set rsIP8=Server.CreateObject("Adodb.RecordSet")
rsIP8.open "select top 100 * from "&GuTablePrefix&"_IPLock order by IP_Type desc,IP_ID asc",GuConn,1,1
if rsIP8.bof and rsIP8.eof then
	Response.write "<tr><td width=""600"" height=""40"" bgcolor=""#FFFFFF"" colspan=""8"">&nbsp;<font class=""SilverS12"">没有找到相关数据</font></td></tr>"
else
	do while not rsIP8.eof
%><tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#EAFBF5'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
  <td width="41" height="26" align="center"><font class="BlackS12"><%=rsIP8("IP_ID")%></font></td>
  <td width="38" height="26" align="center"><input name="GuResourceID" type="checkbox" ID="GuResourceID" value="<%=rsIP8("IP_ID")%>"></td>
  <td width="108" height="26">&nbsp;<a href="<%=GuestbookUserIP%><%=rsIP8("IP_A")%>.<%=rsIP8("IP_B")%>.<%=rsIP8("IP_C")%>.<%=rsIP8("IP_D")%>" target="_blank" class="BlackS12"><%=rsIP8("IP_A")%>.<%=rsIP8("IP_B")%>.<%=rsIP8("IP_C")%>.<%=rsIP8("IP_D")%></a></td>
  <td width="78" height="26" align="center"><font class="BlackV12"><%if rsIP8("IP_Same")="1" then%>前1段相同<%elseif rsIP8("IP_Same")="2" then%>前2段相同<%elseif rsIP8("IP_Same")="3" then%>前3段相同<%elseif rsIP8("IP_Same")="4" then %>单个IP地址<%else%><%end if%></font></td>
  <td width="135" height="26">&nbsp;<font class="BlackS12"><%=rsIP8("IP_Note")%></font></td>
  <td width="78" height="26" align="center"><font class="BlackS12"><%if rsIP8("IP_Type")="user" then%>前台[限制]<%elseif rsIP8("IP_Type")="admin" then%>后台[允许]<%else%><%end if%></font></td>
  <td width="76" height="26" align="center"><font class="BlackS12"><%=rsIP8("IP_DateTime")%></font></td>
  <td width="38" height="26" align="center"><a href="Admin_IPLock.asp?GuComm=Mo&IP_ID=<%=rsIP8("IP_ID")%>" class="BlackS12"><img src="Images/Admin_Modify.gif" border="0" width="16" height="16" title="编辑"></a></td>
 </tr>
<%
	rsIP8.movenext
	loop
%>
<tr>
  <td width="600" height="38" bgcolor="#FFFFFF" colspan="8" align="right"><input type="hidden" name="GuComm" value="De"><input type="submit" value="" name="Admin_IPLock_Delete" class="Admin_Button_Delete">&nbsp;</td>
 </tr>
<%
end if

	rsIP8.close
	set rsIP8=Nothing
%>
</form>
</table>
<br>

<%end sub%>

<!--#include file="Include/Message.asp"-->

</body>
</html>

<%CloseDatabase%>

⌨️ 快捷键说明

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