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

📄 hour.asp

📁 淘特网独自开发的一套访问统计系统
💻 ASP
字号:
<!-- #INCLUDE FILE = "conn.asp" -->
<!-- #INCLUDE FILE = "date.asp" -->
<!-- #INCLUDE FILE = "session.asp" -->
<%
dim Rs,sql,totalNum,imgWidth
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<link href="style/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.style2 {
	color: #cc3300;
	font-weight: bold;
}
.style3 {
	color: #006699;
	font-weight: bold;
}
.style4 {
	color: #000000;
	font-weight: bold;
}
-->
</style>
</head>
<body>
<p><br />
  &nbsp;&nbsp;<span class="style3">24小时统计:</span></p>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  <tr>
    <td height="20" bgcolor="#006699"><div align="center" class="style1">24小时访问统计</div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
      <tr>
        <td width="35%" height="20" valign="bottom" bgcolor="#F5F5F5">      <div align="center">时间</div>
        <td width="65%" valign="bottom" bgcolor="#F5F5F5"><div align="center">点击</div></td>
      </tr>
      
	  <%
	  	dim hourPercent
		totalNum=conn.execute("select sum(hits) from t_hour")(0)
		if(totalNum=0) then 
			totalNum=1
		end if
		Set Rs=Server.CreateObject("ADODB.Recordset")
		sql="select id,hits from t_hour"		
		Rs.open sql,conn,3,1
		while not rs.eof
			imgWidth=formatnumber(rs(1)/totalNum,2)*500
			hourPercent=formatnumber(rs(1)/totalNum,4)*100
	  %>
	  <tr>
        <td height="20" valign="bottom" bgcolor="#FFFFFF"><div align="center"><%=rs(0)%></div>
        <td valign="bottom" bgcolor="#FFFFFF">
		<div align="left"><img src="images/green.gif" width="<%=imgWidth%>" height="10" /> <%=rs(1)%> :<%=hourPercent%>%</div></td>
	   </tr>
	   <%
	 	 Rs.movenext
	  wend
	  Rs.close
	  set Rs=nothing
	  %>
     
    </table></td>
  </tr>
</table>
</body>
</html>
<%
call connclose()
%>

⌨️ 快捷键说明

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