📄 clicklist.asp
字号:
<!--#include file="Const.Asp"-->
<%CheckAdmin1%>
<html>
<head>
<title>welcome</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Images/Admin_Style.Css">
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" class="tdbg">
<%
dim t,u,rs,sql,nn,yy,rr,zdj,url,addtype
set rs=server.createobject("adodb.recordset")
zdj=false
id=request.querystring("id")
addtype=request.querystring("addtype")
nn=request.form("year")
yy=request.form("month")
rr=request.form("day")
if len(nn)>0 and len(yy)>0 and len(rr)>0 then
zdj=true
end if
dim n,y,r,sj
if zdj=false then
n=Year(now())
y=Month(now())
r=Day(now())
else
n=nn
y=yy
r=rr
end if
'if len(y)=1 then y="0" & y
'if len(r)=1 then r="0" & r
sj=n & "-" & y & "-" & r
dim count_num
count_num=0
dim count_num1
count_num1=0
%>
<form name="form1" method="post" action="">
<select name="year">
<%
dim for_i
for for_i=2007 to 2008
%><option value=<%=for_i%> <%if for_i=cint(n) then response.write(" selected")%>><%=for_i%></option>
<%next%>
</select>
年
<select name="month">
<%
for for_i=1 to 12
%><option value=<%=for_i%> <%if for_i=cint(y) then response.write(" selected")%>><%=for_i%></option>
<%next%>
</select>
月
<select name="day">
<%
for for_i=1 to 31
%><option value=<%=for_i%> <%if for_i=cint(r) then response.write(" selected")%>><%=for_i%></option>
<%next%>
</select>
日
<input type="submit" name="Submit" value="查询">
(广告名称:<%=request("adname")%>)<br><br>
<%
sql="select * from [count_ad] where adid=" & id & " and date_time='"&sj&"'"
rs.Open sql,conn,1,1
if rs.eof then
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.write("暂时没有在 " & sj & " 的数据")
response.end
end if
%>
以下是 <font color="red"><%=request("adname")%></font>
<%=sj%> 在服务器 上的点击小时分布图 共<font color="red"><%=rs("click_num")%></font>次点击
<br>
<%
'mybh="sh" & "_b"
daynum=1
for k=23 to 0 step -1
dh="ch" & k
if rs(dh)>daynum then daynum=rs(dh)
next
response.write("<div align=center><table border=0 cellpadding=0 cellspacing=0 width=98% ><tr><td height=10 align=right><div align=center>" & _
"<table border=0 cellpadding=0 cellspacing=0 width=100% height=110><tr><td width=100% valign=bottom align=right>" & daynum & "</td></tr><tr><td width=100% valign=bottom align=right>" & int(daynum*0.8) & "</td></tr><tr><td width=100% valign=bottom align=right>" & int(daynum*0.6) & "</td></tr>" & _
"<tr><td width=100% valign=bottom align=right>" & int(daynum*0.4) & "</td></tr><tr><td width=100% valign=bottom align=right>" & int(daynum*0.2) & "</td></tr><tr><td width=100% valign=bottom align=right>0</td></tr></table></div></td><td height=10></td>")
for k=0 to 23 step 1
'l=hour(time)-k
'l=-1-k
'if l<0 then
'm=l+24
'else
'm=l
'end if
dh="ch" & k
'if mybh=dh then
' response.write("<td align='center' valign='bottom'><img border='0' title=此小时点击" & rs.Fields(dh).value & "次 src='images/col_center.gif' width='12' height='" & (rs(dh)/daynum)*100 & "'></td>")
'else
response.write("<td align='center' valign='bottom'><img border='0' title=此小时点击" & rs.Fields(dh).value & "次 src='images/col_center.gif' width='12' height='" & (rs(dh)/daynum)*100 & "'></td>")
'end if
next
response.write("</tr><tr><td height=10 align=right></td><td width=2% height=10></td>")
for k=1 to 24 step 1
' m=k
response.write("<td align='center'>" & k & "</td>")
next
response.write("</tr></table></div>")
%>
鼠标停留在色块上查看发生的点数!
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" height="20" bgcolor="">
<p align="center">:::::<b> 本日24小时统计--时段
</b>
:::::</td>
</tr>
<tr>
<td width="100%" height="6"></td>
</tr>
<tr>
<td width="100%" height="6">
<%
response.write("<div align=center><table border=1 cellpadding=0 cellspacing=0 width=98% bordercolorlight=#CCCCCC bordercolordark=#FFFFFF >" & _
"<tr><td width=10% align=center>时 段</td><td width=10% align=center>点击量</td><td width=10% align=center>点击控制量</td><td width=10% align=center>广告展现量</td><td width=10% align=center>点击比</td>" & _
"<td width=10% align=center>时 段</td><td width=10% align=center>点击量</td><td width=10% align=center>点击控制量</td><td width=10% align=center>广告展现量</td><td width=10% align=center>点击比</td></tr><tr>")
dim a
a=1
for k=0 to 23 step 1
''l=hour(time)-k
'l=-1-k
'if l<0 then
'm=l+24
'else
'm=l
'end if
dh="ch" & k
dh1="sh" & k
dh2="h" & k
if rs(dh1)=0 then
djb=int(rs(dh)/(rs(dh1)+0.01)*10000)/100
else
djb=int(rs(dh)/rs(dh1)*10000)/100
end if
'if mybh=dh then
' response.write("<td width=10% align=center>" & m & " - " & m+1 & "</td><td width=10% align=center>" & rs(dh) & "</td><td width=10% align=center>" & rs(dh & "_b") & "</td><td width=10% align=center>" & rs(dh & "_c") & "</td><td width=10% align=center>" & djb & " %</td>")
'else
response.write("<td width=10% align=center>" & k & " - " & k+1 & "</td><td width=10% align=center>" & rs(dh) & "</td><td width=10% align=center>" & rs(dh2) & "</td><td width=10% align=center>" & rs(dh1) & "</td><td width=10% align=center>" & djb & " %</td>")
'end if
if a mod 2 =0 then
response.write("</tr><tr>")
end if
a=a+1
next
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write("</table></div>")
%> </td>
</tr>
<tr>
<td width="100%" height="6"></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</font>
</form>
</body>
</html>
<%
if err.number<>0 then
response.write "出错了,错误描述:"&err.description & "<br>错误来源"& err.source
response.End()
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -