📄 ads_listip.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New Ads_Url
KSCls.Execute()
Set KSCls = Nothing
Class Ads_Url
Private KSCMS
Private MaxPerPage,adssql,adsrs,totalPut,CurrentPage,TotalPage,i,advlistact
Private Sub Class_Initialize()
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Call KSCMS.CloseConn()
Set KSCMS=Nothing
End Sub
Sub Execute()
Dim getadid
%>
<html>
<link href="Style.CSS" rel="stylesheet" type="text/css">
<table border=0 width=100% cellspacing=0 cellpadding=0>
<tr>
<td >
<table border="0" align=center cellpadding="5" cellspacing="1" class=tableBorder width="100%">
<tr><td align=center class="forumRowHighlight">
<%
if KSCMS.G("ip")="sip" then
%>
ID为 <%=KSCMS.G("id")%> 的广告条显示记录
<%
elseif KSCMS.G("ip")="cip" then
%>
ID为 <%=KSCMS.G("id")%> 的广告条点击记录
<%
end if
%>
</td>
</tr></table>
<table border="0" align=center cellpadding="5" cellspacing="1" class=tableBorder width="100%">
<tr bgcolor=#ffffff><td align="center" class="forumRowHighlight" height="20">
记录ID
</td><td align=center class="forumRowHighlight" height="20">IP 地址</td>
<td align=center class="forumRowHighlight" height="20">时 间</td></tr>
<%
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set adsrs=server.createobject("adodb.recordset")
if KSCMS.G("ip")="sip" then
getadid=cint(request("id"))
adssql="select * From KS_Adiplist where adid="&getadid&" and class=1 order by id desc"
elseif KSCMS.G("ip")="cip" then
getadid=cint(request("id"))
adssql="select * From KS_Adiplist where adid="&getadid&" and class=2 order by id desc"
end if
adsrs.open adssql,Conn,1,1
if adsrs.eof and adsrs.bof then
Response.Write "<tr align=center><td bgcolor=#ffffff colspan=3>没有记录</td></tr></table>"
else
adsrs.pagesize=25 '每页显示的记录数
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
Conn.close
set Conn=nothing
End Sub
sub showContent
i=0
do while not (adsrs.eof or err)
%>
<tr align=center><td class="forumRowHighlight"><font color=red><%=adsrs("id")%></font> </td><td align=center class="forumRowHighlight"><%=adsrs("ip")%> </td><td align=center class="forumRowHighlight"><%=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" align=center cellpadding="5" cellspacing="1" class=tableBorder width="100%">
<tr><td align=right colspan=4 class="forumRowHighlight">
<%
Call KSCMS.ShowPageParamter(totalPut, MaxPerPage, "Ads_Listip.asp", True, "条", CurrentPage, "id=" & KSCMS.G("ID") & "&ip=" & KSCMS.G("ip"))
%>
</td></tr>
</table>
<%
end sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -