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

📄 hour.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "ikernel/utility.php" );
echo "\r\n<html>\r\n<head>\r\n<title>时段统计</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n<br>\r\n";
$connection = openconnection( );
$TOTAL_COUNT = 1;
$I = 0;
for ( ;	$I <= 23;	++$I	)
{
	if ( $I < 10 )
	{
		$query = "SELECT count(*) from SYS_LOG where RIGHT(TIME,8)>='0".$I.":00:00' and RIGHT(TIME,8)<='0".$I.":59:59'";
	}
	else
	{
		$query = "SELECT count(*) from SYS_LOG where RIGHT(TIME,8)>='".$I.":00:00' and RIGHT(TIME,8)<='".$I.":59:59'";
	}
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$HOUR_COUNT[$I] = $ROW[0];
	}
	$TOTAL_COUNT += $HOUR_COUNT[$I];
}
echo "<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"5\"  >\r\n  <tr>\r\n    <td class=\"TableHeader\">\r\n       总访问量小时分布统计\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"TableData\">\r\n      <table border=\"0\" height=\"100%\" cellspacing=\"2\" cellpadding=\"0\" >\r\n        <tr>\r\n          <td width=\"42\" valign=\"top\">\r\n            <table border=\"0\" width=\"100%\" height=\"100%\" align=\"right\" cellspacing=\"0\" cellpad";
echo "ding=\"0\" class=\"small\">\r\n              <tr>\r\n                <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\">&nbsp;&nbsp;</span>";
echo max( $HOUR_COUNT );
echo "</td>\r\n              </tr>\r\n              <tr>\r\n                <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\">&nbsp;&nbsp;</span>";
echo ceil( max( $HOUR_COUNT ) * 0.8 );
echo "</td>\r\n              </tr>\r\n              <tr>\r\n                <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\">&nbsp;&nbsp;</span>";
echo ceil( max( $HOUR_COUNT ) * 0.6 );
echo "</td>\r\n              </tr>\r\n              <tr>\r\n                <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\">&nbsp;&nbsp;</span>";
echo ceil( max( $HOUR_COUNT ) * 0.4 );
echo "</td>\r\n              </tr>\r\n              <tr>\r\n                <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\">&nbsp;&nbsp;</span>";
echo ceil( max( $HOUR_COUNT ) * 0.2 );
echo "</td>\r\n              </tr>\r\n            </table>\r\n          </td>\r\n";
$I = 0;
for ( ;	$I <= 23;	++$I	)
{
	echo "          <td width=\"42\" height=\"100\"  valign=\"bottom\">\r\n            <table border=\"0\" width=\"15\" cellspacing=\"0\" cellpadding=\"0\" class=\"graph\" id=\"table3\">\r\n              <tr>\r\n                <td width=\"100%\" valign=\"bottom\" ><img border=\"0\" src=\"/images/column.gif\" width=\"15\"></td>\r\n              </tr>\r\n             <tr>\r\n                <td width=\"100%\" height=\"";
	echo floor( $HOUR_COUNT[$I] * 100 / max( $HOUR_COUNT ) );
	echo "\" background=\"/images/column.gif\" valign=\"bottom\"></td>\r\n             </tr>\r\n            </table>\r\n          </td>\r\n";
}
echo "        </tr>\r\n        <tr>\r\n          <td align=\"right\">0</td>\r\n          <td height=30 >0</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >2</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >4</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >6</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >8</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >10</td>\r\n  ";
echo "        <td height=30 ></td>\r\n          <td height=30 >12</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >14</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >16</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >18</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >20</td>\r\n          <td height=30 ></td>\r\n          <td height=30 >22</td>\r\n          <td height=30 ></td>\r\n";
echo "        </tr>\r\n      </table>\r\n\r\n    </td>\r\n  </tr>\r\n</table>\r\n<br>\r\n\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\"    cellpadding=\"5\">\r\n   <tr>\r\n      <td nowrap class=\"TableHeader\" colspan=\"3\">\r\n       总访问量小时分布数据\r\n      </td>\r\n  </tr>\r\n";
$I = 0;
for ( ;	$I <= 23;	++$I	)
{
	echo "    <tr class=\"TableData\">\r\n      <td>\r\n        <table border=\"0\" width=\"100%\" align=\"right\" cellspacing=\"0\" cellpadding=\"0\">\r\n          <tr>\r\n            <td nowrap  width=\"80\">";
	echo $I;
	echo "</td>\r\n            <td nowrap >";
	echo round( $HOUR_COUNT[$I] * 100 / $TOTAL_COUNT );
	echo "%</td>\r\n            <td nowrap  width=\"100\">";
	echo $HOUR_COUNT[$I];
	echo "</td>\r\n          </tr>\r\n        </table>\r\n      </td>\r\n    </tr>\r\n";
}
echo "</table>\r\n\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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