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

📄 select_ad.asp

📁 动力商业广告Sql版本全方位的WEB开发学习应用交流共享服务
💻 ASP
字号:
<%@ LANGUAGE = VBScript.Encode %><!--#include file="../../inc/verify_user.inc" -->
<!--#include file="../../inc/conn.inc" -->

<%
dim ad_id(50),title(50),today_show_stat(50),today_hit_stat(50),today_hit_rate(50),pic_url(50),link_url(50),interface_type(50)


Set rs = Server.CreateObject("ADODB.Recordset")


sql="select title,ad_id,pic_url,link_url,interface_type from ad_info where group_id=" + request("group_id") + " order by ad_id Desc"
rs.open sql,conn,0,1



Set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection=conn
cmd.CommandText="today_ad_stat"
cmd.CommandType=&H0004

cmd.Parameters.Append cmd.CreateParameter("@ad_id",3)
cmd.Parameters.Append cmd.CreateParameter("@stat_date",135)
cmd.Parameters.Append cmd.CreateParameter("@today_show_stat",3,2)
cmd.Parameters.Append cmd.CreateParameter("@today_hit_stat",3,2)



i=0
max_today_show_stat=1
max_today_hit_stat=1
max_today_hit_rate=0

do while not rs.eof
	i=i+1
	ad_id(i)=rs("ad_id")
	title(i)=rs("title")
	pic_url(i)=rs("pic_url")
	link_url(i)=rs("link_url")
	interface_type(i)=rs("interface_type")
	cmd("@ad_id")=rs("ad_id")
	cmd("@stat_date")=cdate(formatdatetime(now,2))
	cmd.execute
	if isnull(cmd("@today_show_stat")) then
		today_show_stat(i)=0
		today_hit_stat(i)=0
		today_hit_rate(i)=0
			else
				today_show_stat(i)=cmd("@today_show_stat")
				today_hit_stat(i)=cmd("@today_hit_stat")
				today_hit_rate(i)=cmd("@today_hit_stat")/cmd("@today_show_stat")
	end if
	if today_show_stat(i)>=max_today_show_stat then max_today_show_stat=today_show_stat(i)
	if today_hit_stat(i)>=max_today_hit_stat then max_today_hit_stat=today_hit_stat(i)
	if today_hit_rate(i)>=max_today_hit_rate then max_today_hit_rate=today_hit_rate(i)
	rs.movenext
loop
rs.close

if max_today_hit_rate=0 then max_today_hit_rate=1
ad_count=i


%>


<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../css/ads.css" type="text/css">
</head>




<body bgcolor="#FFFFFF" text="#000000">
<!--#include file="../../inc/top.inc" -->
<p>&nbsp;</p>
<p><b><img src="../../images/iico.gif" width="15" height="15" align="absmiddle"> 
<span class="px14">今日本广告组所有广告条基本统计,点击广告条名查看详细统计报告:</span></b></p>
<table width="623" border="0" cellspacing="1" cellpadding="3" class="px14" bgcolor="#000000">
<tr bgcolor="#000099"> 
<td width="115"> 
<div align="center"><font color="#FFFFFF">广告条</font></div>
</td>
<td width="112"> 
<div align="center"><font color="#FFFFFF">缩图</font></div>
</td>
<td width="127"> 
<div align="center"><font color="#FFFFFF">今日显示次数</font></div>
</td>
<td width="110"> 
<div align="center"><font color="#FFFFFF">今日点击次数</font></div>
</td>
<td width="123"> 
<div align="center"><font color="#FFFFFF">今日点击率</font></div>
</td>
</tr>
<% if group_count=0 then %>
<tr bgcolor="#eeeeee"> 
<td colspan="6"><b>本组别没有任何广告。</b></td>
</tr>
<% end if %>
<% for i=1 to ad_count %>
<tr bgcolor="#eeeeee"> 
<td width="115" class="pt9"><a href="ad_report_summary.asp?ad_id=<%=ad_id(i)%>"><%=title(i)%></a></td>
<td width="112" class="pt9"> 
<%
select case interface_type(i)
	case 1
		response.write "<a href=" & link_url(i) & " target=_blank><img src=" & pic_url(i) & " width=150 height=40 border=0></a>"
end select
%>
</td>
<td width="127" class="pt9"><img src="../../images/color_purple.gif" width="<%=int(today_show_stat(i)/max_today_show_stat*70)%>" height="10" border="1"> 
<%=today_show_stat(i)%></td>
<td width="110" class="pt9"><img src="../../images/color_purple.gif" width="<%=int(today_hit_stat(i)/max_today_hit_stat*70)%>" height="10" border="1"> 
<%=today_hit_stat(i)%></td>
<td width="123" class="pt9"><img src="../../images/color_purple.gif" width="<%=int(today_hit_rate(i)/max_today_hit_rate*70)%>" height="10" border="1"> 
<%=formatnumber(today_hit_rate(i)*100,2)%>%</td>
</tr>
<%
next
%>
</table>
<p><img src="../../images/exclaim.gif" width="16" height="15" align="absmiddle"> 
<span class="pt9">以上全部统计数据为实时数据</span> </p>
<p>&nbsp;</p>


<!--#include file="../../inc/bottom.inc" -->

</body>
</html>
<%
set cmd=nothing
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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