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

📄 adminip.asp

📁 购物系统(本版为正式商业版
💻 ASP
字号:
<!--#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 qx20<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
%>
<html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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;
}
-->
</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" background="images/right_top2.gif">
  <tr>
    <td width="1%">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td width="30%" style="font-size:14px;color:#ffffff"><span class="style4">&nbsp;<b>登录信息</b></span></td>
          <td width="70%" align="right">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>
<br>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#9DB2D4">
  <tr bgcolor="#C7D3E6">
    <td colspan="3" align="center">
      <%
	if title<>"" then
	sql="select * from shop_ip where name like '%"&trim(title)&"%' or ip like '%"&trim(title)&"%'  order by id desc"
	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,"adminip.asp"
            		showContent
            		showpage totalput,MaxPerPage,"adminip.asp"
       		else
          		if (currentPage-1)*MaxPerPage<totalPut then
            			rs.move  (currentPage-1)*MaxPerPage
            			dim bookmark
            			bookmark=rs.bookmark
           			showpage totalput,MaxPerPage,"adminip.asp"
            			showContent
             			showpage totalput,MaxPerPage,"adminip.asp"
        		else
	        		currentPage=1
           			showpage totalput,MaxPerPage,"adminip.asp"
           			showContent
           			showpage totalput,MaxPerPage,"adminip.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="#F0F3F8">
    <td width="114" rowspan="2">
    <p align="center"><%=rs("id")%> [<a href="adminipdel.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="#F0F3F8" 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
%>    </td>
  </tr>
</table>
<form name="searchsoft" method="POST" action="adminip.asp">
  <div align="center">查找记录:
    <input class=wenbenkuang type="text" name="txtitle" size="20">
    <input class=go-wenbenkuang type="submit" value="查 询" name="title">
  </div>
</form>
</body>
</html>

⌨️ 快捷键说明

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