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

📄 stat.asp

📁 时代购物系统 4.0功能升级说明 <1>完善了3.0的VIP
💻 ASP
字号:
<!--#include file="config.asp"-->
<%
dim rs1
set rs = server.createobject("adodb.recordset")
set rs1 = server.createobject("adodb.recordset")
If Request.QueryString("CurPage") = "" or Request.QueryString("CurPage") = 0 then
CurPage = 1
Else
CurPage = CINT(Request.QueryString("CurPage"))
End If
%>

<html>
<head>
<title>[<%=pagename%>]--访问量日志</title>
<style>
body, td{ SCROLLBAR-FACE-COLOR: #163e56; SCROLLBAR-HIGHLIGHT-COLOR: #164c6e; SCROLLBAR-SHADOW-COLOR: #164c6e; SCROLLBAR-3DLIGHT-COLOR: #164c6e; SCROLLBAR-ARROW-COLOR: #164c6e; SCROLLBAR-TRACK-COLOR: #164c6e; SCROLLBAR-DARKSHADOW-COLOR: #164c6e; FONT-SIZE: 12px}
A {text-decoration:none; color=#000000;}
A:hover {text-decoration: overline;; color=#000000;}
A.blue {color:darkblue;}
.jjy {cursor='hand';font-size: 12px;height:1;filter:DropShadow(color=#000000,OffX=1,OffY=1,Positive=1);}
</STYLE>
</head>
<body text="#000000" topmargin="0" leftmargin="0" style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #000000 1px solid; MARGIN: 0pt" >
<p align=center><br> <font color="#CCCCCC" class=jjy>访问量统计记录</font></p><%
sql="select * from counter"
rs1.open sql,conn,1,2
today=rs1("today")
ttop=rs1("top")
%> <table align=center cellSpacing="0" cellPadding="3" width="531" border="1" bordercolor="#163E56" style="border-collapse: collapse" height="44"> 
<tr align="center"> <td width="140" height="1" bgcolor="#163E56"> <p align="center"><font color="#F0F0F0" class=jjy>站点</font></p></td><td width="65" height="1" bgcolor="#163E56"><font color="#F0F0F0" class=jjy>总访问量</font></td><td height="1" bgcolor="#163E56" width="65"><font color="#F0F0F0" class=jjy>统计天数</font></td><td height="1" bgcolor="#163E56" width="65"><font color="#F0F0F0" class=jjy>最高记录</font></td><td height="1" bgcolor="#163E56" width="65"><font color="#F0F0F0" class=jjy>今日</font></td><td height="1" bgcolor="#163E56" width="65"><font color="#F0F0F0" class=jjy>昨日</font></td><td height="1" bgcolor="#163E56" width="65"><font color="#F0F0F0" class=jjy>日均</font></td></tr> 
<tr> <td width="140" height="34" bgcolor="#28729D" align="center"> <p align="center"><font color="#F0F0F0"><%=pagename%></font></td><td width="65" height="34" bgcolor="#28729D" align="center"><font color="#F0F0F0"><%=rs1("counter")%> </font></td><td height="34" bgcolor="#28729D" width="65" align="center"><font color="#F0F0F0"><%=rs1("daynum")%> </font></td><td height="34" bgcolor="#28729D" width="65" align="center"><font color="#F0F0F0"><%=rs1("top")%> </font></td><td height="34" bgcolor="#28729D" width="65" align="center"><font color="#F0F0F0"><%=rs1("today")%> </font></td><td height="34" bgcolor="#28729D" width="65" align="center"><font color="#F0F0F0"><%=rs1("yesterday")%> </font></td><td height="34" bgcolor="#28729D" width="65" align="center"><font color="#F0F0F0"><%=int(rs1("counter")/rs1("daynum"))%> </font> </td></tr> 
</table><%
sql="select * from zzday order by ID desc"
rs.open sql,conn,1,2
if rs.eof and rs.bof then
response.write "<p align=center><font color=F0F0F0>暂时没有往日统计记录</font></p>"
else
RS.PageSize=pagen
Dim TotalPages 
TotalPages = RS.PageCount  
If CurPage>RS.Pagecount Then  
CurPage=RS.Pagecount 
end if  
RS.AbsolutePage=CurPage  
rs.CacheSize = RS.PageSize  
Dim Totalcount 
Totalcount =INT(RS.recordcount)  
StartPageNum=1 
do while StartPageNum+10<=CurPage 
StartPageNum=StartPageNum+pagen 
Loop      
EndPageNum=StartPageNum+pagen-1
If EndPageNum>RS.Pagecount then EndPageNum=RS.Pagecount  
%> <br> <table cellSpacing="0" align=center cellPadding="3" width="531" border="0" bordercolor="#163E56" style="border-collapse: collapse" height="10"> 
<tr align="center"> <td width="123" height="4" bgcolor="#163E56"> <p align="center"><font color="#F0F0F0" class=jjy>日期</font></p></td><td width="94" height="4" bgcolor="#163E56"><font color="#F0F0F0" class=jjy>访问量</font></td><td height="4" bgcolor="#163E56" width="265"><font color="#F0F0F0" class=jjy>图例</font></td></tr> </tr>
</table><div align="center"> <center> <table cellSpacing="0" bgcolor=#D1D1D1 cellPadding="4" width="531" border="0" bordercolor="#163E56" style="border-collapse: collapse" height="10"> 
<tr> <td width="121" height="12" align="center"><font color=000000><b><%=rs1("oto")%></b> </font> 
</td><td width="91" height="12"> <%=rs1("today")%>  </td><td height="12" width="264"><img src=images/co.gif height=10 width="<%=int(rs1("today")/ttop*100)%>%" alt=<%=rs1("today")%>> 
</td></tr> </tr> </table><%

rs1.close 
set rs1=nothing
%> <table cellSpacing="0" bgcolor=f0f0f0 cellPadding="4" width="531" border="0" bordercolor="#163E56" style="border-collapse: collapse" height="10"> 
<%
I=0 
p=RS.PageSize*(Curpage-1) 
do while (Not RS.Eof) and (I<RS.PageSize) 
p=p+1
%> <tr> <td width="120" height="12" align="center"><%=rs("zzday")%>   </td><td width="92" height="12"> 
<%=rs("stats")%>  </td><td height="12" width="264"><img src=images/co.gif height=10 width="<%=int(rs("stats")/ttop*100)%>%" alt=<%=rs("stats")%>> 
</td></tr> <%
I=I+1 
RS.MoveNext 
Loop
%> </tr> </table></center></div><div align="center"> <center> <table width="531" border="0" cellspacing="0" cellpadding="2" style="border-collapse: collapse" bgcolor="#163E56" height="16"> 
<tr> <td height="16"><font color="#CCCCCC" class=jjy>每页<%=RS.PageSize%>个记录,页次: 
<%=CurPage%>/<%=TotalPages%></font></td><td align="right" height="16"><font color="#CCCCCC" class=jjy>页数: 
</font> <a href="stat.asp?CurPage=<%=StartPageNum-1%>"> <font color="#CCCCCC" class=jjy>&lt;&lt;</font></a><font color="#cccccc"> 
<% For I=StartPageNum to EndPageNum   
      if I<>CurPage then %> </font> <a href="stat.asp?CurPage=<%=I%>"> <font color="#CCCCCC" class=jjy><%=I%></font></a><font color="#CCCCCC"> 
<% else %> <%=I%> <% end if %> <% Next %> <% if EndPageNum<RS.Pagecount then %> 
</font> <a href="stat.asp?CurPage=<%=EndPageNum+1%>"> <font color="#CCCCCC"  class=jjy>更多...</font></a><font color="#CCCCCC"> 
<%end if%></font></td></tr> </table></center></div><%
end if 
%> <p align=center> <font color="#CCCCCC"><a href="http://www.timesboard.com" target=_blank><img border="0" alt="统计器V1.0" src="images/fc.gif"></a></font></p><%
rs.close 
set rs=nothing
set rs=server.createobject("adodb.recordset")
sql="select * from [zzday]"
rs.open sql,conn,1,1
D_num=rs.recordcount
rs.close
set rs=nothing
conn.Execute"Update counter set daynum="&D_num&"+1,counter="&alldot()&"+"&today&""
function alldot()  
    dim tmprs  
    set tmprs=conn.execute("Select sum(stats) As dot from [zzday]")  
    alldot=tmprs("dot")
	set tmprs=nothing  
	if isnull(alldot) then alldot=0	
end function
%></tr></table>

⌨️ 快捷键说明

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