<% dim admin_flag admin_flag="53" if not master or instr(session("flag"),admin_flag)=0 then Errmsg=Errmsg+"
"+"
  • 本页面为管理员专用,请登陆后进入。
  • 您没有管理本页面的权限。" call dvbbs_error() else call main() end if sub main() 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 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.update rs.close set rs=nothing conn.close set conn=nothing %> <% else %> <% end if elseif request("action")="delip" then conn.execute("delete from lockip where id in ("&request.form("delid")&")") response.write "删除成功!" else %>
    IP限制管理--添加
    添加成功!
    起始I P  如202.152.12.1
    结尾I P  如202.152.12.255
    <% dim currentpage,page_count,Pcount dim totalrec,endpage currentPage=request("page") if currentpage="" or not isInteger(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 %> <% else rs.PageSize = Cint(Forum_Setting(11)) rs.AbsolutePage=currentpage page_count=0 totalrec=rs.recordcount while (not rs.eof) and (not page_count = Cint(Forum_Setting(11))) %> <% page_count = page_count + 1 rs.movenext wend %> <% end if rs.close set rs=nothing conn.close set conn=nothing %>
    IP限制管理--管理
    ID号 起始IP 结尾IP 操作
    还没有任何IP限制数据。
    <%=rs("id")%> <%=rs("sip1")%> <%=rs("sip2")%> ">
    分页: <%Pcount=rs.PageCount if currentpage > 4 then response.write "[1] ..." end if if Pcount>currentpage+3 then endpage=currentpage+3 else endpage=Pcount end if for i=currentpage-3 to endpage if not i<1 then if i = clng(currentpage) then response.write " ["&i&"]" else response.write " ["&i&"]" end if end if next if currentpage+3 < Pcount then response.write "... ["&Pcount&"]" end if %>
    <% end if end sub %>