<!--#include file="conncounter.asp" --><%
sql="select * from cnt where id =1"                 
set rs=server.createobject("adodb.recordset")                  
rs.open sql,conn,1,1
totalip=rs("totalip")
totalpv=rs("totalpv")
startday=rs("startday")
yesdayip=rs("yesdayip")
yesdaypv=rs("yesdaypv")
day2ip=rs("day2ip")
day2pv=rs("day2pv")
dd=datediff("d",startday,date())
if dd=0 then
dd=1
end if
set rs=nothing
function todayip()
sql="Select count(id) from ip"
set ips=conn.execute(sql) 
todayip=ips(0) 
ips.close
set ips=nothing 
end function
function todaypv()
sql="Select sum(n) from ip"
set rs=conn.execute(sql)
If rs.eof and rs.bof Then 
todaypv=0                    
Else
todaypv=rs(0)
end if
rs.close
set rs=nothing 
end function
function online()
sql="Select count(id) from ip WHERE DATEDIFF('s', lastime, now()) < "&kicktime&"*60"
set ips=conn.execute(sql) 
online=ips(0) 
ips.close
set ips=nothing 
end function 
%><html><head><title></title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="css.css" type="text/css" rel="stylesheet"><style type="text/css">TD{FONT-SIZE:9pt}BODY{FONT-SIZE:9pt}A:link{COLOR: #000000; TEXT-DECORATION: none}A:visited{COLOR: #000000; TEXT-DECORATION: none}A:active{COLOR: green; TEXT-DECORATION: none}A:hover{COLOR: red; TEXT-DECORATION: underline}BODY{
	MARGIN-TOP: 0px;
	background-color: #DFE8F0;
	margin-bottom: 0px;
}body,td,th {
	font-size: 12pt;
}
</style></head><body><div align="center"><br><br><table width="80%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#E3EBF2" style="font-size:12px; letter-spacing:1px;">
  <tr>
  <td colspan="2" bgcolor="#DFE8F0"><div align="center">[ 当前在线：<font color="red"><b><%=online()%></b></font>人 ] </div></td>
  </tr>
  <tr>
    <td width="50%" bgcolor="#DFE8F0"><div align="right">[ 今日IP：<b><%=todayip()%></b> ]</div></td>
    <td width="50%" bgcolor="#DFE8F0">[ 今日PV：<b><%=todaypv()%></b> ]</td>
  </tr>
  <tr>
    <td bgcolor="#DFE8F0"><div align="right">[ 昨日IP：<b><%=yesdayip%></b> ]</div></td>
    <td bgcolor="#DFE8F0">[ 昨日PV：<b><%=yesdaypv%></b> ] </td>
  </tr>
  <tr>
    <td bgcolor="#DFE8F0"><div align="right">[ 前日IP：<b><%=day2ip%></b> ]</div></td>
    <td bgcolor="#DFE8F0"> [前日PV：<b><%=day2pv%></b> ]</td>
  </tr>
  <tr>
    <td bgcolor="#DFE8F0"><div align="right">[ 开始统计：<b><%=startday%></b> ]</div></td>
    <td bgcolor="#DFE8F0">[ 统计天数：<b><%=dd%></b> ] </td>
  </tr>
  <tr>
    <td bgcolor="#DFE8F0"><div align="right">[ 总访问量：<b><%=totalpv%></b> ]</div></td>
    <td bgcolor="#DFE8F0">[ 总IP量：<b><%=totalip%></b> ] </td>
  </tr>
  <tr>
    <td bgcolor="#DFE8F0"><div align="right">[ 平均访量：<b><%=int(totalpv/dd)%></b> ]</div></td>
    <td bgcolor="#DFE8F0">[ 平均IP：<b><%=int(totalip/dd)%></b> ] </td>
  </tr>
</table>
  <p>&nbsp;</p>
</div></body></html><%call closedb%>