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

📄 adminip.asp

📁 网上流行的MOVE站点
💻 ASP
字号:
<!--#include file="articleconn.asp"-->
<!--#include file="security.asp"-->
<%if session("flag")>1 then
    response.write "<script>alert('您的操作权限不够!');history.back();</script>"
    response.end
end if
%>
<HTML><HEAD><TITLE>后台管理 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style type=text/css>
body  { background:#336699; margin:0px; font:9pt 宋体; }
table  { border:0px; }
td  { font:normal 12px 宋体; }
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover  { color:#000000;text-decoration:underline; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title  { }
.menu_title span  { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
</style>

</HEAD>
<BODY leftMargin=0 topMargin=0>
<div align=center>
<table width="500" border="0" cellspacing="2">
  <tr>
    <td width="2" align="center" valign="top" class="tdbgleft"></td> 
    <td  class="b1" valign="top" width="608"> 
      <%  const MaxPerPage=50
      if session("admin")="" then
      response.redirect"login.asp"
      response.end
      end if

dim userip,ips,GetIp1,GetIp2
if request("userip")<>"" then
userip=request("userip")
ips=Split(userIP,".")
GetIp1=ips(0)&"."&ips(1)&"."&ips(2)&".1"
GetIp2=ips(0)&"."&ips(1)&"."&ips(2)&".255"
else 
userip=""
GetIp1=""
GetIp2=""
end if
if request("action")="add" then
%>
        <%
dim sip,str1,str2,str3,str4,num_1,num_2
if request.querystring("reaction")="save" then
	sip=cstr(request.form("ip1"))
	'dot=instr(ip,".")-1
	'response.write dot
	str1=left(sip,cint(instr(sip,".")-1))
	sip=mid(sip,cint(instr(sip,"."))+1)
	str2=left(sip,cint(instr(sip,"."))-1)
	sip=mid(sip,cint(instr(sip,"."))+1)
	str3=left(sip,cint(instr(sip,"."))-1)
	str4=mid(sip,cint(instr(sip,"."))+1)
	num_1=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1

	sip=cstr(request.form("ip2"))
	str1=left(sip,instr(sip,".")-1)
	sip=mid(sip,instr(sip,".")+1)
	str2=left(sip,instr(sip,".")-1)
	sip=mid(sip,instr(sip,".")+1)
	str3=left(sip,instr(sip,".")-1)
	str4=mid(sip,instr(sip,".")+1)
	num_2=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
	'response.write num_1 &","& num_2
	'response.end

	conn.execute("insert into lockip (ip1,ip2,sip1,sip2) values ('"&num_1&"','"&num_2&"','"&request.form("ip1")&"','"&request.form("ip2")&"')")
	'set rs = server.CreateObject ("adodb.recordset")
	'sql="select * from LockIP"
	'rs.open sql,conn,1,3
	'rs.addnew
	'rs("ip1")=num_1
	'rs("ip2")=num_2
	'rs("sip1")=request.form("ip1")
	'rs("sip2")=request.form("ip2")
	'rs.updat	
	'rs.closee
         Response.Redirect "adminip.asp"
%>

        <%
end if
elseif request("action")="delip" then
	conn.execute("delete from LockIP where id in ("&request.form("delid")&")")
	response.write "删除成功!"
	response.redirect "adminip.asp"
	response.end
else
%>
      <table width="500" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
        <FORM name="myform" METHOD=POST ACTION="?action=delip">
          <tr class="tdbg2" bgcolor="#f3f3f3"> 
            <td width="10%" align="center" height="25"><B>ID号</B></td>
            <td width="30%" align="center"><B>起始IP</B></td>
            <td width="30%" align="center"><B>结尾IP</B></td>
            <td width="15%" align="center">全<input type=checkbox value="on" name="chkall" onclick="CheckAll(this.form)">选</td>
          </tr>
          <%
	dim currentpage,page_count,Pcount
	dim totalrec,endpage
	currentPage=request("page")
	if currentpage="" or not int(currentpage) then
		currentpage=1
	else
		currentpage=clng(currentpage)
		if err then
			currentpage=1
			err.clear
		end if
	end if
	sql="select id,sip1,sip2 from LockIP order by id desc"
	Set rs= Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
%>
          <tr class="tdbg2"> 
            <td width="100%" align="center" colspan=4><br><font color=ffffff><b>还没有任何允许访问IP数据。</td>
          </tr>
          <%
	else
		rs.PageSize = MaxPerPage
		rs.AbsolutePage=currentpage
		page_count=0
		totalrec=rs.recordcount
		while (not rs.eof) and (not page_count = MaxPerPage)
%>
          <tr class="tdbg2" bgcolor="#ffffff"> 
            <td width="10%" align="center" height="25"><%=rs("id")%></td>
            <td width="30%" align="center"><%=rs("sip1")%></td>
            <td width="30%" align="center"><%=rs("sip2")%></td>
            <td width="15%" align="center"> 
              <input type=checkbox name="delid" value="<%=cstr(rs("ID"))%>"></td>
          </tr>
          <%
		page_count = page_count + 1
		rs.movenext
		wend
%>
<table width="500" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">
          <tr> 
            <td align=center> 
              <input type=submit name=submit value=" 删 除 选 定 ">
              </td>
          </tr>
          <%
	end if
	rs.close
	set rs=nothing
%>
        </FORM>

      <%
end if
%>
</script>
<div align="center">
<form method="post" action="adminIP.asp?action=add&reaction=save" name="form1" onsubmit="javascript:return check();">
  <center>
  <table width="300" border="0" cellspacing="1" cellpadding="4">
    <tr bgcolor="#f3f3f3">
      <td align="center" height="25">
      起使 I P</td><td align="center"><input type="ip1" name="ip1" size="25"></td>
    </tr>
    <tr bgcolor="#f3f3f3">
      <td align="center" height="25">
      结束 I P</td><td align="center"><input type="ip2" name="ip2" size="25"></td>
    </tr>
  </table>
  <table width="300" align="center" border="0" cellspacing="1" cellpadding="4">
<tr bgcolor="#f3f3f3">
      <td align="center" height="25">
      <input type="submit" name="form1" value="开始添加">&nbsp;&nbsp;&nbsp;<input type="reset" name="Submit2" value="重新填写"></td>
    </tr>
</table>
  </center>
</form>
</div>
</BODY></HTML>
</body>
</html>

⌨️ 快捷键说明

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