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

📄 listip.asp

📁 电影ASP文件
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="session.asp"-->
<!--#include file=config.asp -->
<html><head>
<meta http-equiv=Content-Language content=zh-cn>
<meta http-equiv=Content-Type content=text/html; charset=gb2312>
<meta http-equiv=Pragma content=no-cache>
<link href=style.css rel=STYLESHEET type=text/css>
<title>广告发布管理系统 V1.0</title>
</script>
<base target=_top>
</head><body marginwidth=0 marginheight=0>
<div align=center><center>
<table border=0 width=100% cellspacing=0 cellpadding=0>
<tr>
<td bgcolor=#000000>
<table border=0 width=100% cellspacing=0 cellpadding=3>
<tr><td align=center bgcolor=#ffffff>
<%
if request.querystring("ip")="sip" then
%>
<font color=red>ID <%=request.querystring("id")%> 广告的显示记录:</font>
<%
elseif request.querystring("ip")="cip" then
%>
<font color=red>ID <%=request.querystring("id")%> 广告的点击记录:</font>
<%
end if
%>
</td></tr></table>


<table border=0 width=100% cellspacing="1" cellpadding=1>
<tr bgcolor=#ffffff><td>ID</td><td align=center>IP 地址</td><td align=center>时 间</td></tr>
<%

adsconn.Open adsdata
dim MaxPerPage,adssql,adsrs,totalPut,CurrentPage,TotalPages,i,advlistact
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set adsrs=server.createobject("adodb.recordset")

if request.querystring("ip")="sip" then
getadid=cint(request("id"))
adssql="select * from iplist where adid="&getadid&" and class=1 order by id desc"

elseif request.querystring("ip")="cip" then
getadid=cint(request("id"))
adssql="select * from iplist where adid="&getadid&" and class=2 order by id desc"
end if

adsrs.open adssql,adsconn,1,1
if adsrs.eof and adsrs.bof then
response.write "<tr><td bgcolor=#ffffff colspan=3>没有记录</td></tr></table>"
else
adsrs.pagesize=32 '每页显示的记录数
totalPut=adsrs.recordcount '记录总数
totalPage=adsrs.pagecount
MaxPerPage=adsrs.pagesize
if currentpage<1 then
currentpage=1
end if
if currentpage>totalPage then
currentpage=totalPage
end if
if currentPage=1 then
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
adsrs.move  (currentPage-1)*MaxPerPage
dim bookmark
bookmark=adsrs.bookmark '移动到开始显示的记录位置
showContent
showpages
end if
end if
adsrs.close
set adsrs=nothing
end if
adsconn.close
set adsconn=nothing

%>


</center></div>
<%
sub showContent
i=0
do while not (adsrs.eof or err)
%>
<tr bgcolor=#ffffff><td><%=adsrs("adid")%></td><td align=center><%=adsrs("ip")%></td><td align=center><%=adsrs("time")%></td></tr>
<%
i=i+1
if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出
adsrs.movenext
loop
end sub 

sub showpages()
dim n
n=totalPage
%>
</table>
<table border=0 width=100% cellpadding=1 cellspacing=1>
<form method=post action=listip.asp?id=<%=trim(request("id"))%>&ip=<%=trim(request("ip"))%>><tr bgcolor=#ffffff><td align=right colspan=4>
共<font color=red><%=totalput%></font>条,每页<font color=red><%=adsrs.pagesize%></font>条,第<font color=red><%=currentPage%></font>页,共<font color=red><%=totalPage%></font>页 
<%
response.write " 转到:<select name='page' size=1>"
for i=1 to n
response.write "<option value="& i
if currentpage=i then
response.write " selected"
end if
response.write ">"& i &"</option>"
next
response.write "</select>&nbsp;<input type='submit'  value=' goto '>"
%>
</td></tr></form>
</table>
<%
end sub
%>

</body>
</html>

⌨️ 快捷键说明

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