<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx14<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！请配备“系统管理”权限后来操作！</b></font></div>"
response.End
end if
if request("act")="delall" then
conn.execute"delete from shop_ip"
response.Redirect("web_login.asp")
end if
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>网软志成在线购物系统</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style4 {color: #000000}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style2 {color: #FF0000}
-->
</style>
</head>
<%
   	const MaxPerPage=8
   	dim totalPut   
   	dim CurrentPage
   	dim TotalPages
   	dim title

	title=request("txtitle")
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if
   	dim sql
   	dim rs
%>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1%" height="28">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="77%" height="27" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">网软志成购物后台管理系统 &gt;&gt; 系统管理 &gt;&gt; 登录信息 </font></strong></td>
        <td width="23%" style="font-size:14px;color:#ffffff"><span class="style2">* 为必添项目</span></td>
      </tr>
    </table></td>
  </tr>
</table>
<br>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#999999">
  <tr bgcolor="#cccccc">
    <td colspan="3" align="center">
      <%
	if request("act")="sqsq" then  
	if request("fenso")="" and request("so")="1" then
	sql="select * from shop_ip where name like '%"&trim(title)&"%'  order by id desc"
	elseif request("fenso")="" and request("so")="2" then
	sql="select * from shop_ip where ip like '%"&trim(title)&"%'  order by id desc"
	elseif  request("fenso")<>"" and request("so")="1" then
	sql="select * from shop_ip where name not like  '%"&trim(title)&"%'  order by id desc"
	elseif  request("fenso")<>"" and request("so")="2" then
	sql="select * from shop_ip where ip not like '%"&trim(title)&"%'  order by id desc"
	end if
	
	else
	sql="select * from shop_ip order by id desc"
	end if
	Set rs= Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,1

  	if rs.eof and rs.bof then
       		response.write "<p align='center'> 还没有记录 </p>"
   	else
      		totalPut=rs.recordcount
      		if currentpage<1 then
          		currentpage=1
      		end if
      		if (currentpage-1)*MaxPerPage>totalput then
	   		if (totalPut mod MaxPerPage)=0 then
	     			currentpage= totalPut \ MaxPerPage
	  		else
	      			currentpage= totalPut \ MaxPerPage + 1
	   		end if

      		end if
       		if currentPage=1 then
           		showpage totalput,MaxPerPage,"web_login.asp"
            		showContent
            		showpage totalput,MaxPerPage,"web_login.asp"
       		else
          		if (currentPage-1)*MaxPerPage<totalPut then
            			rs.move  (currentPage-1)*MaxPerPage
            			dim bookmark
            			bookmark=rs.bookmark
           			showpage totalput,MaxPerPage,"web_login.asp"
            			showContent
             			showpage totalput,MaxPerPage,"web_login.asp"
        		else
	        		currentPage=1
           			showpage totalput,MaxPerPage,"web_login.asp"
           			showContent
           			showpage totalput,MaxPerPage,"web_login.asp"
	      		end if
	   	end if
   	rs.close
   	end if
	        
   	set rs=nothing  
   	conn.close
   	set conn=nothing
  
   	sub showContent
       	dim i
	   i=0
%>    </td>
  </tr>
  <%do while not rs.eof%>
  <tr bgcolor="#F3F3F3">
    <td width="114" rowspan="2">
    <p align="center"><%=rs("id")%> [<a href="web_login_del.asp?id=<%=rs("id")%>">删除</a>] </td>
    <td width="188" align="center">
    <p><%=rs("name")%> </td>
    <td width="626"><%=rs("win")%></td>
  </tr>
  <tr bgcolor="#f1f1f1">
    <td width="188" align="center"><%=rs("ip")%></td>
    <td width="626"><%=rs("sj")%></td>
  </tr>
  <%
	i=i+1
	      if i>=MaxPerPage then exit do
	      rs.movenext
	loop
%>
  <tr bgcolor="#F3F3F3" align="center">
    <td colspan="3">
      <div align="center">
        <center>
        </center>
      </div>
    <%
   end sub 

function showpage(totalnumber,maxperpage,filename)
  dim n
  if totalnumber mod maxperpage=0 then
     n= totalnumber \ maxperpage
  else
     n= totalnumber \ maxperpage+1
  end if
  response.write "<p align='center'>&nbsp;"
  if CurrentPage<2 then
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href="&filename&"?page=1&txtitle="&title&">首页</a>&nbsp;"
    response.write "<a href="&filename&"?page="&CurrentPage-1&"&txtitle="&title&">上一页</a>&nbsp;"
  end if
  if n-currentpage<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&txtitle="&title&">"
    response.write "下一页</a> <a href="&filename&"?page="&n&"&txtitle="&title&">尾页</a>"
  end if
   response.write "&nbsp;页次："&CurrentPage&"/"&n&"页 "
    response.write "&nbsp;共"&totalnumber&"条记录 "&maxperpage&"条记录/页"
       
end function
%>    <input name="Submit" type="submit" class="go-wenbenkuang" value="清空所有记录" onClick="return del2()">
<script language="javascript">
function del2()
{
if(confirm('确定删除'))
{
this.location.href="web_login.asp?act=delall"
}
}
</script></td>
  </tr>
</table>
<form name="searchsoft" method="POST" action="web_login.asp?act=sqsq">
  <div align="center">查找记录:
    <input class=wenbenkuang type="text" name="txtitle" size="20">
    非
    <input name="fenso" type="checkbox" id="fenso" value="checkbox">
    <input class=go-wenbenkuang type="submit" value="查 询" name="title">
    <input name="so" type="radio" value="1" checked>
    登陆名
    <input type="radio" name="so" value="2">
IP</div>
</form>
<!--#include file="copyright.asp"-->

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>