📄 list.asp
字号:
<!--#include file="menu.asp"-->
<table border=0 align="center" width=98% cellspacing=1 cellpadding=2 class="tableBorder">
<tr><th align=center height="25">
<%
if request.querystring("type")="openp" then
%>
黄金广告位置正常播放的广告条列表
<%
elseif request.querystring("type")="opens" then
%>
一般广告位置正常播放的广告条列表
<%
elseif request.querystring("type")="close" then
%>
被管理员暂停而未失效的广告条列表
<%
elseif request.querystring("type")="lose" then
%>
已经失效的的广告条列表
<%
elseif request.querystring("type")="top" then
%>
TOP 20 条广告点击龙虎榜(不含失效广告)
<%
elseif request.querystring("type")="end" then
%>
点击率最低的 20 条广告(不含失效广告)
<%
else
%>
所有正常播放的广告条列表
<%
adssql="select * from JOB_ads where JOB_act=1 order by JOB_id desc"
end if
%>
</th></tr></table>
<%
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("type")="close" then
adssql="select * from JOB_ads where JOB_act=0 order by JOB_regtime"
elseif request.querystring("type")="lose" then
adssql="select * from JOB_ads where JOB_act=2 order by JOB_regtime"
elseif request.querystring("type")="top" then
adssql="select top 20 * from JOB_ads where JOB_act<>2 order by JOB_click desc"
elseif request.querystring("type")="end" then
adssql="select top 20 * from JOB_ads where JOB_act<>2 order by JOB_click"
else
adssql="select * from JOB_ads where JOB_act=1 order by JOB_regtime desc"
end if
adsrs.open adssql,conn,1,1
if adsrs.eof and adsrs.bof then
response.write "<br><table border=0 align=center width=98% cellspacing=1 cellpadding=2 class=tableBorder><tr><td bgcolor=#ffffff>没有记录</td></tr></table>"
else
adsrs.pagesize=advertlistnumber'每页显示的记录数
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
response.Write "<table border=0 align=center width=98% cellspacing=1 cellpadding=2 class=tableBorder><tr><td>"
showpages
response.Write "</td></tr></table>"
else
if (currentPage-1)*MaxPerPage<totalPut then
adsrs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=adsrs.bookmark '移动到开始显示的记录位置
response.Write "<table border=0 align=center width=98% cellspacing=1 cellpadding=2 class=tableBorder><tr><td>"
showContent
response.Write "</td></tr><tr><td>"
showpages
response.Write "</td></tr></table>"
end if
end if
adsrs.close
set adsrs=nothing
end if
conn.close
set conn=nothing
%>
<%
sub showpages()
dim n
n=totalPage
%>
<br>
<table border=0 width="98%" cellpadding=0 cellspacing=1>
<form method=post action=list.asp?type=<%=request.querystring("type")%>><tr><td align=right colspan=4>
共<font color=red><%=totalput%></font>条,每页<font color=red><%=advertlistnumber%></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> <input type='submit' value=' goto '>"
end sub%>
</td></tr></form>
</table>
<%
sub showContent
i=0
do while not (adsrs.eof or err)
dim getdiftime
getdiftime=datediff("d",date,adsrs("JOB_lasttime"))
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td height="17"><strong>广告ID:</strong></td>
<td><%=adsrs("JOB_id")%></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="15%" height="17"><font color="#FF0000">广告(站点)名称:</font></td>
<td width="35%"><a href=<%=adsrs("JOB_url")%> target="_blank"><%=adsrs("JOB_sitename")%></a></td>
<td width="15%"><font color="#FF0000">站点URL:</font></td>
<td width="35%"><%=adsrs("JOB_url")%></td>
</tr>
<tr>
<td><font color="#FF0000">广告位种类:</font></td>
<td><b><%=adsrs("JOB_price")%></b></td>
<td><font color="#FF0000">广告位:</font></td>
<td><b><%set adsrs6=server.createobject("adodb.recordset")
adssql6="select * from JOB_place where JOB_place="&adsrs("JOB_place")&" and JOB_price='"&adsrs("JOB_price")&"' order by JOB_placeid"
adsrs6.open adssql6,conn,1,1
if not(adsrs6.eof) then
%>
<%=adsrs6("JOB_placename")%> (<%=adsrs6("JOB_jg")%>/<%=adsrs6("JOB_jgg")%>)
<%
end if
adsrs6.close%></b></td>
</tr>
<tr>
<td><font color="#FF0000">加入时间:</font></td>
<td><%=adsrs("JOB_regtime")%></td>
<td><font color="#FF0000">最近显示时间:</font></td>
<td><%=adsrs("JOB_time")%></td>
</tr>
<tr>
<td><font color=red>广告图片URL:</font></td>
<td><a href="<%=SiteUrl&InstallDir&adsrs("JOB_gif_url")%>" target=_blank><%=adsrs("JOB_gif_url")%> </a></td>
<td><font color="#FF0000">失效条件:</font></td>
<td>
<%
if adsrs("JOB_class")=1 then
%>
点击<font color=red><%=adsrs("JOB_clicks")%></font>次
<%
elseif adsrs("JOB_class")=2 then
%>
显示<font color=red><%=adsrs("JOB_shows")%></font>次
<%
elseif adsrs("JOB_class")=3 then
%>
截止期:<font color=red><%=adsrs("JOB_lasttime")%></font>
<%if getdiftime<7 and getdiftime>0 then%>
<br>
<div style="width: 200; font-size:15pt; font-family: Arial ; color: red; position: relative; filter: glow(color=ffff00, strength=5)">还有
<%=getdiftime%> 天到期!</div>
<%end if%>
<%
elseif adsrs("JOB_class")=4 then
%>
点击<font color=red><%=adsrs("JOB_clicks")%></font>次,显示<font color=red><%=adsrs("JOB_shows")%></font>次
<%
elseif adsrs("JOB_class")=5 then
%>
点击<font color=red><%=adsrs("JOB_clicks")%></font>次,截止期:<font color=red><%=adsrs("JOB_lasttime")%></font>
<%if getdiftime<7 and getdiftime>0 then%>
<br>
<div style="width: 200; font-size:15pt; font-family: Arial ; color: red; position: relative; filter: glow(color=ffff00, strength=5)">还有
<%=getdiftime%> 天到期!</div>
<%end if%>
<%
elseif adsrs("JOB_class")=6 then
%>
显示<font color=red><%=adsrs("JOB_shows")%></font>次,截止期:<font color=red><%=adsrs("JOB_lasttime")%></font>
<%if getdiftime<7 and getdiftime>0 then%>
<br>
<div style="width: 200; font-size:15pt; font-family: Arial ; color: red; position: relative; filter: glow(color=ffff00, strength=5)">还有
<%=getdiftime%> 天到期!</div>
<%end if%>
<%
elseif adsrs("JOB_class")=7 then
%>
点击<font color=red><%=adsrs("JOB_clicks")%></font>次,显示<font color=red><%=adsrs("JOB_shows")%></font>次,截止期:<font color=red><%=adsrs("JOB_lasttime")%></font>
<%if getdiftime<7 and getdiftime>0 then%>
<br>
<div style="width: 200; font-size:15pt; font-family: Arial ; color: red; position: relative; filter: glow(color=ffff00, strength=5)">还有
<%=getdiftime%> 天到期!</div>
<%end if%>
<%
else
%>
无限制条件
<%
end if%> </td>
</tr>
<tr>
<td colspan="4" align="right"><a href=javascript:opw('option.asp?id=<%=adsrs("JOB_id")%>&job=banner','banner<%=adsrs("JOB_id")%>',500,90)>查看banner</a>
<%
if adsrs("JOB_act")=1 then
%>
<a href=javascript:opw('option.asp?id=<%=adsrs("JOB_id")%>&job=close','close<%=adsrs("JOB_id")%>',300,140)>暂停</a>
<%
else
%>
<a href=javascript:opw('option.asp?id=<%=adsrs("JOB_id")%>&job=open','open<%=adsrs("JOB_id")%>',300,140)>激活</a>
<%end if%>
<a href=javascript:opw('option.asp?id=<%=adsrs("JOB_id")%>&job=delit','del<%=adsrs("JOB_id")%>',300,140)>删除</a> <a href=javascript:opw('modifyads_place.asp?id=<%=adsrs("JOB_id")%>','<%=adsrs("JOB_id")%>',500,420)>修改详细设置</a>
<a href=view.asp?id=<%=adsrs("JOB_id")%>><strong>查看详细 </strong></a></td>
</tr>
</table>
<%
i=i+1
if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出
adsrs.movenext
loop
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -