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

HTML/CSS

  1. <!--飘易网站统计程序 V1.5 Powered by flymorn,www.cn-pn.com-->
  2. <!--#include file="inc/conn.asp" -->
  3. <!--#include file="inc/function.asp" -->
  4. <!--#include file="inc/sqlfilter.asp"-->
  5. <%
  6. listnum=30 '每页显示数
  7. '今日IP
  8. function todayip()
  9. sql="Select count(id) from ip"
  10. set ips=conn.execute(sql) 
  11. todayip=ips(0)
  12. ips.close 
  13. set ips=nothing 
  14. end function
  15.  
  16. '今日PV
  17. function todaypv()
  18. sql="Select sum(n) from ip"
  19. set rs=conn.execute(sql)
  20. If rs.eof and rs.bof Then 
  21. todaypv=0                    
  22. Else
  23. todaypv=rs(0)
  24. end if
  25. rs.close
  26. set rs=nothing 
  27. end function 
  28. '在线人数
  29. function online()
  30. sql="Select count(id) from ip WHERE DATEDIFF('s', lastime, now()) < "&kicktime&"*60"
  31. set ips=conn.execute(sql) 
  32. online=ips(0)
  33. ips.close 
  34. set ips=nothing 
  35. end function 
  36. %>
  37. <html>
  38. <head>
  39. <title>飘易网站统计程序 V1.5</title>
  40. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  41. <LINK href="css.css" type=text/css rel=stylesheet>
  42. <style type="text/css">
  43. <!--
  44. .style1 {
  45. font-size: 14pt;
  46. font-weight: bold;
  47. }
  48. -->
  49. </style>
  50. </head>
  51. <body>
  52. <!--#include file="head.asp"--> 
  53. <!--飘易网站统计程序 V1.5 Powered by flymorn,www.cn-pn.com-->
  54. <div align="center"><br>
  55.   <span class="style1">飘易网站统计程序 V1.5</span><br>
  56.   <br>
  57. </div>
  58. <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  59.   <tr>
  60.     <td><table width="756" border="0" align="left" cellpadding="0" cellspacing="0">
  61.       <tr>
  62.         <td><hr noshade size="1">[ 当前在线:<font color=red><b><%=online()%></b></font>人 ] [ 今日IP:<b><%=todayip()%></b> ] [ 今日PV:<b><%=todaypv()%></b> ]<br>          
  63.         <b>当前IP列表:</b> [ <a href="http://www.ip138.com/ips.asp" target="_blank">IP地址查询</a> ] [ <%=now()%> ]</td>
  64.       </tr>
  65.     </table></td>
  66.   </tr>
  67. </table>
  68. <!--Powered by flymorn,www.cn-pn.com-->
  69. <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="biao_bdr3">
  70.   <tr>
  71.     <td><table width="758" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#DADCE4" class="xi">
  72.       <tr>
  73.         <td width="40"><div align="center"><strong>用户</strong></div></td>
  74.         <td width="100"><div align="center"><strong>IP</strong></div></td>
  75.         <td width="150"><div align="center"><strong>活跃时间</strong></div></td>
  76.         <td width="80"><div align="center"><strong>操作系统</strong></div></td>
  77.         <td width="150"><div align="center"><strong>浏览器</strong></div></td>
  78.         <td width="206"><div align="center"><strong>当前位置</strong></div></td>
  79.         <td width="30"><div align="center"><strong>PV</strong></div></td>
  80.       </tr>
  81.     </table></td>
  82.   </tr>
  83.   <tr>
  84.     <td><table width="758" border="1" align="left" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#DADCE4" class="xi">
  85.       <%
  86. sql="select top 50 * from ip order by lastime desc"  
  87. set rs=server.createobject("adodb.recordset")
  88. rs.open sql,conn,1,1
  89. If rs.eof and rs.bof Then 
  90. response.Write("当前列表为空。")                      
  91. Else
  92. recordcountnum=Rs.recordcount
  93. Rs.pagesize = listnum
  94. page = SafeRequest("page",1)
  95. If  page = "" Then
  96. page=1
  97. End If
  98. If (page-Rs.pagecount) > 0 Then
  99. page=Rs.pagecount
  100. End If
  101. if page < 1 Then
  102. page = 1
  103. End If
  104. Rs.absolutepage=page
  105. j=rs.recordcount
  106. j=j-(page-1)*listnum
  107. i=0
  108. x=1+listnum*(page-1)
  109. do while not rs.eof and i<listnum
  110. ip=rs("ip")
  111. if rs("dlip")<>"" then
  112. ip=rs("dlip")
  113. end if
  114. startime=rs("startime")
  115. lastime=rs("lastime")
  116. ie=browser(rs("browser"))
  117. sys=system(rs("browser"))
  118. url=rs("url")
  119. if url="" then
  120. url="直接输入访问"
  121. end if
  122. url1=url
  123. if len(url)>30 then
  124. url=left(url,30)&"…"
  125. end if
  126. n=rs("n")
  127. %>
  128.   <tr class="table001" onmouseover="this.className='table002'" onmouseout="this.className='table001'">
  129.         <td width="40"><div align="center"><%=x%></div></td>
  130.         <td width="100"><div align="center"><%=ip%></div></td>
  131.         <td width="150"><div align="center"><%=lastime%></div></td>
  132.         <td width="80"><div align="center"><%=sys%></div></td>
  133.         <td width="150"><div align="center"><%=ie%></div></td>
  134.         <td width="206"><a href=<%=url1%> target=_blank title=<%=url1%>><%=url%></a></td>
  135.         <td width="30"><div align="center"><%=n%></div></td>
  136.   </tr>
  137.   <%
  138. i=i+1
  139. x=x+1
  140. rs.movenext
  141. loop
  142. end if
  143. %>
  144. <tr>
  145. <td colspan="7">
  146. <%
  147. Dim filename
  148. filename="index.asp?a=1&"
  149. %>
  150. <table width="680" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#DADCE4">
  151.   <tr>
  152.     <td><form method="post" action="<%=filename%>">
  153.       <div align="center">总共<strong><%=Rs.recordcount%></strong>人 <%=page%>/<%=Rs.pagecount%>页&nbsp;每页<%= listnum %>人&nbsp;
  154.           <a href="<%=filename%>page=1">首页</a>&nbsp;
  155.           <% if page<>1 then %>
  156.           <a href="<%=filename%>page=<%=page-1%>">上一页</a>&nbsp;
  157.           <%end if%>
  158.           <% if Rs.pagecount-page <> 0 then %>
  159.           <a href="<%=filename%>page=<%=page+1%>">下一页</a>&nbsp;
  160.           <%End If%>
  161.   <a href="<%=filename%>page=<%=Rs.pagecount%>">尾页</a>&nbsp;
  162.           <input type="text" name="page" size="3" maxlength="5" value="<%=page+1%>" />
  163.           <input type="submit" value="Go" name="cndok" />
  164.       </div>
  165.     </form></td>
  166.   </tr>
  167. </table>
  168. </td></tr>
  169.     </table>
  170. </td>
  171.   </tr>
  172. </table><!--Powered by flymorn,www.cn-pn.com-->
  173. <br>
  174. <!--#include file="foot.asp"-->
  175. <!--飘易网站统计程序 V1.5 Powered by flymorn,www.cn-pn.com-->
  176. </body>
  177. </html>
  178. <%
  179. rs.close
  180. set rs=nothing
  181. call closedb
  182. %>
  183. <!--飘易网站统计程序 V1.5 Powered by flymorn,www.cn-pn.com-->
  184.