📄 year.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\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/menu/system.gif\" WIDTH=\"22\" HEIGHT=\"20\" align=\"absmiddle\">";
echo "<s";
echo "pan class=\"big3\"> 年度数据</span>\r\n </td>\r\n </tr>\r\n</table>\r\n<hr width=\"95%\" height=\"1\" align=\"left\" class=\"big1\">\r\n<br>\r\n";
$connection = openconnection( );
$TOTAL_COUNT = 1;
$I = 1;
for ( ; $I <= 12; ++$I )
{
if ( $I < 10 )
{
$query = "SELECT count(*) from SYS_LOG where TIME>='".date( "Y", time( ) )."-0".$I."-01 00:00:00' and TIME<='".date( "Y", time( ) )."-0".$I."-".date( "t", time( ) )." 23:59:59'";
}
else
{
$query = "SELECT count(*) from SYS_LOG where TIME>='".date( "Y", time( ) )."-".$I."-01 00:00:00' and TIME<='".date( "Y", time( ) )."-".$I."-".date( "t", time( ) )." 23:59:59'";
}
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$MONTH_COUNT[$I] = $ROW[0];
}
$TOTAL_COUNT += $MONTH_COUNT[$I];
}
echo "<table border=\"0\" width=\"70%\" cellpadding=\"0\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\" class=\"small\">\r\n <tr>\r\n <td class=\"TableHeader\">\r\n <img src=\"/images/green_arrow.gif\" WIDTH=\"20\" HEIGHT=\"18\"> 本年度按月访问统计\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\" class=\"small\">\r\n <tr>\r\n <td width=\"";
echo "42\" valign=\"top\">\r\n <table border=\"0\" width=\"100%\" height=\"100%\" align=\"right\" cellspacing=\"0\" cellpadding=\"0\" class=\"small\">\r\n <tr>\r\n <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\"> </span>";
echo max( $MONTH_COUNT );
echo "</td>\r\n </tr>\r\n <tr>\r\n <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\"> </span>";
echo ceil( max( $MONTH_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: 宋体\"> </span>";
echo ceil( max( $MONTH_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: 宋体\"> </span>";
echo ceil( max( $MONTH_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: 宋体\"> </span>";
echo ceil( max( $MONTH_COUNT ) * 0.2 );
echo "</td>\r\n </tr>\r\n </table>\r\n </td>\r\n";
$I = 1;
for ( ; $I <= 12; ++$I )
{
echo " <td width=\"42\" height=\"100\" align=\"center\" 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\" align=\"center\"><img border=\"0\" src=\"/images/column.gif\" width=\"15\"></td>\r\n </tr>\r\n <tr>\r\n <td width=\"100%\" height=\"";
echo floor( $MONTH_COUNT[$I] * 100 / max( $MONTH_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 align=\"center\">1月</td>\r\n <td height=30 align=\"center\">2月</td>\r\n <td height=30 align=\"center\">3月</td>\r\n <td height=30 align=\"center\">4月</td>\r\n <td height=30 align=\"center\">5月</td>\r\n <td height=30 align=\"center\">6月</td>\r\n <td height=30 align=\"center\">7月</td>\r\n ";
echo "<td height=30 align=\"center\">8月</td>\r\n <td height=30 align=\"center\">9月</td>\r\n <td height=30 align=\"center\">10月</td>\r\n <td height=30 align=\"center\">11月</td>\r\n <td height=30 align=\"center\">12月</td>\r\n </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=\"70%\" align=\"center\" class=\"small\" bgcolor=\"#000000\" cellpadding=\"3\"";
echo ">\r\n <tr>\r\n <td nowrap class=\"TableHeader\" colspan=\"3\">\r\n <img src=\"/images/green_arrow.gif\" WIDTH=\"20\" HEIGHT=\"18\"> 本年度按月访问数据\r\n </td>\r\n </tr>\r\n";
$I = 1;
for ( ; $I <= 12; ++$I )
{
echo " <tr class=\"TableData\">\r\n <td>\r\n <table border=\"0\" width=\"100%\" align=\"right\" cellspacing=\"0\" cellpadding=\"0\" class=\"small\">\r\n <tr>\r\n <td nowrap align=\"center\" width=\"80\">";
echo $I;
echo "月</td>\r\n <td nowrap align=\"center\">";
echo round( $MONTH_COUNT[$I] * 100 / $TOTAL_COUNT );
echo "%</td>\r\n <td nowrap align=\"center\" width=\"100\">";
echo $MONTH_COUNT[$I];
echo "</td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n";
}
echo "</table>\r\n<br>\r\n\r\n";
$TOTAL_COUNT = 1;
$I = 1;
for ( ; $I <= date( "t", time( ) ); ++$I )
{
if ( $I < 10 )
{
$query = "SELECT count(*) from SYS_LOG where TIME>='".date( "Y-m", time( ) )."-0".$I." 00:00:00' and TIME<='".date( "Y-m", time( ) )."-0".$I." 23:59:59'";
}
else
{
$query = "SELECT count(*) from SYS_LOG where TIME>='".date( "Y-m", time( ) )."-".$I." 00:00:00' and TIME<='".date( "Y-m", time( ) )."-".$I." 23:59:59'";
}
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$DAY_COUNT[$I] = $ROW[0];
}
$TOTAL_COUNT += $DAY_COUNT[$I];
}
echo "<table border=\"0\" width=\"70%\" cellpadding=\"0\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\" class=\"small\">\r\n <tr>\r\n <td class=\"TableHeader\">\r\n <img src=\"/images/green_arrow.gif\" WIDTH=\"20\" HEIGHT=\"18\"> 本月份按日访问统计\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\" class=\"small\">\r\n <tr>\r\n <td width=\"";
echo "42\" valign=\"top\">\r\n <table border=\"0\" width=\"100%\" height=\"100%\" align=\"right\" cellspacing=\"0\" cellpadding=\"0\" class=\"small\">\r\n <tr>\r\n <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\"> </span>";
echo max( $DAY_COUNT );
echo "</td>\r\n </tr>\r\n <tr>\r\n <td width=\"100%\" align=\"right\">";
echo "<s";
echo "pan style=\"font-family: 宋体\"> </span>";
echo ceil( max( $DAY_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: 宋体\"> </span>";
echo ceil( max( $DAY_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: 宋体\"> </span>";
echo ceil( max( $DAY_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: 宋体\"> </span>";
echo ceil( max( $DAY_COUNT ) * 0.2 );
echo "</td>\r\n </tr>\r\n </table>\r\n </td>\r\n";
$I = 1;
for ( ; $I <= date( "t", time( ) ); ++$I )
{
echo " <td width=\"16\" height=\"100\" align=\"center\" valign=\"bottom\">\r\n <table border=\"0\" width=\"10\" cellspacing=\"0\" cellpadding=\"0\" class=\"graph\" id=\"table3\">\r\n <tr>\r\n <td width=\"100%\" valign=\"bottom\" align=\"center\"><img border=\"0\" src=\"/images/column_month.gif\" width=\"10\"></td>\r\n </tr>\r\n <tr>\r\n <td width=\"100%\" height=\"";
echo floor( $DAY_COUNT[$I] * 100 / max( $DAY_COUNT ) );
echo "\" background=\"/images/column_month.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 align=\"center\">1</td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">4</td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">7</td>\r\n <td height=30 align";
echo "=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">10</td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">13</td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">16</td>\r\n <td height=30 ali";
echo "gn=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">19</td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">22</td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">25</td>\r\n <td height=30 a";
echo "lign=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">28</td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\"></td>\r\n <td height=30 align=\"center\">31</td>\r\n </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=\"70%\" align=\"center\" class=\"small\" bgcolor=\"#000000\"";
echo " cellpadding=\"3\">\r\n <tr>\r\n <td nowrap class=\"TableHeader\" colspan=\"3\">\r\n <img src=\"/images/green_arrow.gif\" WIDTH=\"20\" HEIGHT=\"18\"> 本月份按日访问数据\r\n </td>\r\n </tr>\r\n";
$I = 1;
for ( ; $I <= date( "t", time( ) ); ++$I )
{
echo " <tr class=\"TableData\">\r\n <td>\r\n <table border=\"0\" width=\"100%\" align=\"right\" cellspacing=\"0\" cellpadding=\"0\" class=\"small\">\r\n <tr>\r\n <td nowrap align=\"center\" width=\"80\">";
echo $I;
echo "</td>\r\n <td nowrap align=\"center\">";
echo round( $DAY_COUNT[$I] * 100 / $TOTAL_COUNT );
echo "%</td>\r\n <td nowrap align=\"center\" width=\"100\">";
echo $DAY_COUNT[$I];
echo "</td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n";
}
echo "</table>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -