📄 test.asp
字号:
<tr>
<td colspan="4" bgcolor="D6DFF5">
<%
Sql="Select Top 1 IpCounter,AddDate From WWW_QQCF_COM_CfCount_Day_Count Where User_Name='"&User_Name&"' Order By IpCounter Desc"
Set Rs1=Conn.ExeCute(Sql)
BestHightIp=Rs1("IpCounter")
BestHightIpDate=Rs1("AddDate")
Sql="Select Top 1 IpCounter,AddDate From WWW_QQCF_COM_CfCount_Day_Count Where User_Name='"&User_Name&"' Order By IpCounter"
Set Rs1=Conn.ExeCute(Sql)
BestLowIp=Rs1("IpCounter")
BestLowIpDate=Rs1("AddDate")
Sql="Select Top 1 Counter,AddDate From WWW_QQCF_COM_CfCount_Day_Count Where User_Name='"&User_Name&"' And DateDiff('d',AddDate,Date())>0 Order By Counter Desc"
Set Rs1=Conn.ExeCute(Sql)
BestHightVisit=Rs1("Counter")
BestHightVisitDate=Rs1("AddDate")
Sql="Select Top 1 Counter,AddDate From WWW_QQCF_COM_CfCount_Day_Count Where User_Name='"&User_Name&"' And DateDiff('d',AddDate,Date())>0 Order By Counter"
Set Rs1=Conn.ExeCute(Sql)
BestLowVisit=Rs1("Counter")
BestLowVisitDate=Rs1("AddDate")
%></td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td valign="top"><div align="right"><a href="?Action=<%=Action%>&Px=<%=Px%>&Page=1">第一页</a>
<%
if page>1 then%>
<a href='?Action=<%=Action%>&Px=<%=Px%>&Page=<%=Page-1%>'>上一页</a>
<%
end if
%>
<%
if page<rs.pagecount then%>
<a href='?Action=<%=Action%>&Px=<%=Px%>&Page=<%=Page+1%>'>下一页</a>
<%
end if
%>
<a href="?Action=<%=Action%>&Px=<%=Px%>&Page=<%=TotalPage%>">最后一页</a>
页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页</div></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form name="form1" method="post" action="jczx.asp">
<div align="left">
<Select name="page" size="1" class=smallselsect id="select3" style='BACKGROUND-COLOR:#ffffff;font-family: 宋体; font-size: 9pt;' onChange="window.location=form.page.options[form.page.selectedIndex].value">
<%for i=1 to totalpage
response.write "<option value="&filename&"?action="&action&"&px="&px&"&page="&i
if page=i then
response.write " selected"
end if
response.write ">转到第"& i &"页</option>"
next
%>
</select>
</div>
</form></td>
</tr>
</table></td>
</tr>
</table>
<%End If%>
<%If Request("Action")="monthtj" Then%>
<table width="730" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
<tr>
<td colspan="4"><div align="center"><strong>最近12个月访问统计</strong> <br>
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center"><strong>月份</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>显示数量</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>IP数量</strong></div></td>
<td bgcolor="#FFFFFF"><strong>在12个月内的比率及数量</strong></td>
</tr>
<%
ShowTotal=0
IpTotal=0
Sql="Select Sum(Counter),Sum(IpCounter) From WWW_QQCF_COM_CfCount_Day_Count Where User_Name='"&User_Name&"' And DateDiff('m',AddDate,Date())<12"
Set Rs=Conn.Execute(Sql)
ShowTotal=Rs(0)
IpTotal=Rs(1)
If ShowTotal=0 Then ShowTotal=1
If IpTotal=0 Then IpTotal=1
For I=0 To 11
CurrMonth=Dateadd("m",-I,Date())
Sql="Select Sum(Counter),Sum(IpCounter) From WWW_QQCF_COM_CfCount_Day_Count Where User_Name='"&User_Name&"' And DateDiff('m',AddDate,'"&CurrMonth&"')=0"
Set Rs=Conn.ExeCute(Sql)
%>
<tr>
<td bgcolor="#FFFFFF"><div align="center"><%=year(CurrMonth)&"-"&month(CurrMonth)%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%=Rs(0)%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%=Rs(1)%></div></td>
<td bgcolor="#FFFFFF"><img src=qqcf_pic/QQCf_BlueBar.gif width=<%=Rs(0)/ShowTotal*300%> height=10><%=MyRate(Rs(0),ShowTotal)%>%<br><img src=qqcf_pic/QQCf_GreenBar.gif width=<%=Rs(1)/IpTotal*300%> height=10><%=MyRate(Rs(1),IpTotal)%>%</td>
</tr>
<%Next%>
<tr bgcolor="#FFFFFF">
<td colspan="6"><div align="center">图例: <img src=qqcf_pic/QQCf_BlueBar.gif width=30 height=10>显示数,<img src=qqcf_pic/QQCf_GreenBar.gif width=30 height=10>IP数</div></td>
</tr>
<tr bgcolor="D6DFF5">
<td colspan="4"><div align="center"> 共<%=ShowTotal%>次浏览,<%=IpTotal%>个IP,平均每月<%=Int(ShowTotal/12)%>次访问,平均每月IP<%=Int(IpTotal/12)%>个</div></td>
</tr>
</table>
<%end if%>
<%if request("action")="hourtj" then%>
<table width="730" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<form name="form1" method="post" action="jczx.asp">
<td>选择查询日期
<Select name="adddate" size="1" onChange="window.location=form.adddate.options[form.adddate.selectedIndex].value">
<%Sql="Select AddDate From WWW_QQCF_COM_CfCount_Hour_Count Where User_Name='"&user_name&"' Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
Response.Write "<option value='"&filename&"?Action="&Request("Action")&"&AddDate="&Rs("AddDate")&"'"
If Request("AddDate")=Cstr(Rs("AddDate")) Then Response.Write " selected"
Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
</select> </td>
</form>
</tr>
</table>
<%
Action=Request("Action")
AddDate=Request("AddDate")
If AddDate="" Then AddDate=Date()
Sql="Select Sum(Counter),Sum(IpCounter) From WWW_QQCF_COM_CfCount_Hour_Count where User_Name='"&user_name&"' And AddDate=#"&AddDate&"#"
Set Rs=Conn.Execute(Sql)
ShowTotal=Rs(0)
IpTotal=Rs(1)
If ShowTotal=0 Then ShowTotal=1
If IpTotal=0 Then IpTotal=1
Sql="Select AddHour,AddDate From WWW_QQCF_COM_CfCount_Hour_Count Where User_Name='"&user_name&"' And AddDate=#"&AddDate&"# Group By AddHour,AddDate Order By AddHour Desc"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1
%>
<table width="730" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
<tr bgcolor="D6DFF5">
<td colspan="4"><div align="center"><strong><%=AddDate%> 每小时报表</strong></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="60"><div align="center"><strong>小时</strong></div></td>
<td width="134"><div align="center"><strong>显示数量</strong></div></td>
<td width="135"><div align="center"><strong>IP数量</strong></div></td>
<td width="269"><div align="center"><strong>比率</strong></div></td>
</tr>
<%
do while not rs.eof
I=I+1
Sql="Select Counter,IpCounter From WWW_QQCF_COM_CfCount_Hour_Count where User_Name='"&user_name&"' And AddDate=#"&AddDate&"# And AddHour="&Rs("AddHour")
Set Rs1=Conn.Execute(Sql)
%>
<tr
<%if I mod 2=0 then
response.write " bgcolor='#ffffff'"
else
response.write " bgcolor='#e8e8e8'"
end if
%>>
<td><div align="center"><%=Rs("AddHour")%>-<%=Rs("AddHour")+1%></div></td>
<td><div align="center"><%=Rs1(0)%><br>
</div></td>
<td><div align="center"><%=Rs1(1)%></div></td>
<td><img src=qqcf_pic/QQCf_BlueBar.gif width=<%=Rs1(0)/ShowTotal*300%> height=10><%=MyRate(Rs1(0),ShowTotal)%>%<br><img src=qqcf_pic/QQCf_GreenBar.gif width=<%=Rs1(1)/IpTotal*300%> height=10><%=MyRate(Rs1(1),IpTotal)%>%</td>
</tr>
<%
rs.movenext
loop%>
<tr bgcolor="#FFFFFF">
<td colspan="6"><div align="center">图例: <img src=qqcf_pic/QQCf_BlueBar.gif width=30 height=10>显示数,<img src=qqcf_pic/QQCf_GreenBar.gif width=30 height=10>IP数</div></td>
</tr>
<tr bgcolor="D6DFF5">
<td colspan="4"><div align="center"><strong><%=AddDate%>此日期</strong>:总计<%=TotalCount%>次</div></td>
</tr>
</table>
<%end if%>
<%if request("action")="backtj" then%>
<table width="730" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
<tr bgcolor="D6DFF5">
<td colspan="4"><div align="center"><strong>回头率报表</strong></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="100"><div align="center"><strong>次数</strong></div></td>
<td width="134"><div align="center"><strong>人数</strong></div></td>
<td><div align="center"><strong>比率</strong></div></td>
</tr>
<%
Sql="Select * From WWW_QQCF_COM_CfCount_Back where User_Name='"&user_name&"'"
Set Rs=Conn.Execute(Sql)
TotalNum=Rs("BackNum_1")+Rs("BackNum_2")+Rs("BackNum_3")+Rs("BackNum_4")+Rs("BackNum_5")+Rs("BackNum_6")+Rs("BackNum_7")+Rs("BackNum_8")+Rs("BackNum_9")+Rs("BackNum_10")+Rs("BackNum_Higher")
For I= 1 To 10
%>
<tr
<%if I mod 2=0 then
response.write " bgcolor='#ffffff'"
else
response.write " bgcolor='#e8e8e8'"
end if
%>>
<td><div align="center">第 <font color="#FF0000"><%=I%></font> 次访问</div></td>
<td><div align="center"><%=Rs("BackNum_"&I)%></div></td>
<td><img src=qqcf_pic/qqcf_redbar.gif width=<%=Rs("BackNum_"&I)/TotalNum*300%> height=10><%=MyRate(Rs("BackNum_"&I),TotalNum)%>% </td>
</tr>
<%
Next%>
<tr bgcolor='#e8e8e8'>
<td><div align="center">10次以上访问</div></td>
<td><div align="center"><%=Rs("BackNum_Higher")%></div></td>
<td><img src=qqcf_pic/qqcf_redbar.gif width=<%=Rs("BackNum_Higher")/TotalNum*300%> height=10><%=MyRate(Rs("BackNum_Higher"),TotalNum)%>% </td>
</tr>
</table>
<%end if%>
<%If Request("Action")="searchtj" Then%>
<table width="730" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="D6DFF5" bgcolor="D6DFF5">
<tr>
<td colspan="5" bgcolor="#FFFFFF"> <%
Action=Request("Action")
Sql="Select * From WWW_QQCF_COM_Cfcount_Search Order By ID Desc"
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Conn,1,1
Sql="Select Sum(Counter) From WWW_QQCF_COM_CfCount_Search_Count Where User_Name='"&User_Name&"'"
Set Rs1=Conn.ExeCute(Sql)
AllTotal=Rs1(0)
If AllTotal=0 Then AllTotal=1
Response.Write "共有<font color=ff0000>"&Rs1(0)&"</font>次从搜索引擎过来访问"
%>
</td>
</tr>
<tr>
<td colspan="5"><div align="center"><strong>搜索引擎统计</strong> <br>
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center"><strong>搜索引擎中文名称</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>搜索引擎英文标识</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>数量</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>来源总量及所占比例</strong></div></td>
<td bgcolor="#FFFFFF"><div align="center"><strong>每日详细统计</strong></div></td>
</tr>
<%While Not Rs.Eof%>
<%
Sql="Select Sum(Counter) From WWW_QQCF_COM_CfCount_Search_Count Where User_Name='"&User_Name&"' And SiteFlag='"&Rs("SiteFlag")&"'"
Set Rs2=Conn.ExeCute(Sql)
ThisTotal=Rs2(0)
%>
<tr>
<td bgcolor="#FFFFFF"><div align="center"><%=Rs("SiteDesc")%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%=Rs("SiteFlag")%></div></td>
<td bgcolor="#FFFFFF"><div align="center"><%=ThisTotal%></div></td>
<td bgcolor="#FFFFFF"><img src=qqcf_pic/qqcf_redbar.gif width=<%=ThisTotal/AllTotal*200%> height=10><%=MyRate(ThisTotal,AllTotal)%>%</td>
<td bgcolor="#FFFFFF"><div align="center"> <a href="?Action=searchtjview&SiteFlag=<%=Rs("SiteFlag")%>">查看</a></div></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -