total.asp
Upload User: maming258
Upload Date: 2022-01-28
Package Size: 283k
Code Size: 3k
Development Platform:

HTML/CSS

  1. <!--飘易网站统计程序 V1.5 Powered by flymorn,www.cn-pn.com-->
  2. <!--#include file="inc/conn.asp" -->
  3. <%
  4. sql="select * from cnt where id =1"                 
  5. set rs=server.createobject("adodb.recordset")                  
  6. rs.open sql,conn,1,1
  7. totalip=rs("totalip")
  8. totalpv=rs("totalpv")
  9. startday=rs("startday")
  10. yesdayip=rs("yesdayip")
  11. yesdaypv=rs("yesdaypv")
  12. day2ip=rs("day2ip")
  13. day2pv=rs("day2pv")
  14. dd=datediff("d",startday,date())
  15. if dd=0 then
  16. dd=1
  17. end if
  18. set rs=nothing
  19. '今日IP
  20. function todayip()
  21. sql="Select count(id) from ip"
  22. set ips=conn.execute(sql) 
  23. todayip=ips(0) 
  24. ips.close
  25. set ips=nothing 
  26. end function
  27.  
  28. '今日PV
  29. function todaypv()
  30. sql="Select sum(n) from ip"
  31. set rs=conn.execute(sql)
  32. If rs.eof and rs.bof Then 
  33. todaypv=0                    
  34. Else
  35. todaypv=rs(0)
  36. end if
  37. rs.close
  38. set rs=nothing 
  39. end function 
  40. '在线人数
  41. function online()
  42. sql="Select count(id) from ip WHERE DATEDIFF('s', lastime, now()) < "&kicktime&"*60"
  43. set ips=conn.execute(sql) 
  44. online=ips(0) 
  45. ips.close
  46. set ips=nothing 
  47. end function 
  48. %>
  49. <html>
  50. <head>
  51. <title>总体数据 - 飘易网站统计程序 V1.5</title>
  52. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  53. <LINK href="css.css" type=text/css rel=stylesheet>
  54. <style type="text/css">
  55. <!--
  56. .style1 {
  57. font-size: 14pt;
  58. font-weight: bold;
  59. }
  60. -->
  61. </style>
  62. </head>
  63. <body>
  64. <!--#include file="head.asp"--> 
  65. <!--飘易网站统计程序 V1.5 Powered by flymorn,www.cn-pn.com-->
  66. <div align="center"><br>
  67. </div>
  68. <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="biao_bdr1">
  69.   <tr>
  70.     <td><table width="756" border="0" align="left" cellpadding="0" cellspacing="0">
  71.       <tr>
  72.         <td><p align="center"><span class="style1"><br>
  73.           </span><span class="style1">总体数据 - 飘易网站统计程序 V1.5</span>          <br> 
  74.           </p></td>
  75.       </tr>
  76.     </table></td>
  77.   </tr>
  78. </table>
  79. <!--Powered by flymorn,www.cn-pn.com-->
  80. <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="biao_bdr2">
  81.   <tr>
  82.     <td><table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
  83.         <tr>
  84.           <td><hr noshade size="1">[ 当前在线:<font color=red><b><%=online()%></b></font>人 ] <br>
  85.             <br>
  86. [ 今日IP:<b><%=todayip()%></b> ] [ 今日PV:<b><%=todaypv()%></b> ]<br>
  87. <br>
  88. [ 昨日IP:<b><%=yesdayip%></b> ] [ 昨日PV:<b><%=yesdaypv%></b> ] <br>
  89. <br>
  90. [ 前日IP:<b><%=day2ip%></b> ] [ 前日PV:<b><%=day2pv%></b> ]<br>
  91. <br>
  92.             [ 开始统计:<b><%=startday%></b> ] [ 统计天数:<b><%=dd%></b> ] <br>
  93.             <br>
  94.             [ 总访问量:<b><%=totalpv%></b> ]  [ 总IP量:<b><%=totalip%></b> ] <br>
  95.             <br>
  96.             [ 平均访量:<b><%=int(totalpv/dd)%></b> ] [ 平均IP:<b><%=int(totalip/dd)%></b> ]
  97.             <br>
  98.             <br>
  99.             注意:<br>
  100.             1、当前在线人数,今日IP,今日PV为即时更新数据。<br>
  101.             2、其他所有数据,每天凌晨只更新一次;目的:节省系统资源,使程序更快执行。<br>
  102.             <br></td>
  103.         </tr>
  104.     </table></td>
  105.   </tr>
  106. </table>
  107. <br>
  108. <!--#include file="foot.asp"-->
  109. <!--飘易网站统计程序 V1.5 Powered by flymorn,www.cn-pn.com-->
  110. </body>
  111. </html>
  112. <%call closedb%>
  113.