?? adminip.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%"> </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"> <b>登錄信息</b></span></td>
<td width="70%" align="right"> </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'> "
if CurrentPage<2 then
response.write "首頁 上一頁 "
else
response.write "<a href="&filename&"?page=1&txtitle="&title&">首頁</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&txtitle="&title&">上一頁</a> "
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 " 頁次:"&CurrentPage&"/"&n&"頁 "
response.write " 共"&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 + -