📄 stat_month.php
字号:
<?php
include( "../config.inc.php" );
include( "../includes/SysGlobal.php" );
include( "language/".$aLan."_".$charset.".php" );
include( "../includes/version.php" );
include( "../includes/pro.php" );
include( "func/adm.inc.php" );
include( "func/common.inc.php" );
include( "func/stat.inc.php" );
include( "func/db.inc.php" );
include( "func/nocatch.php" );
needauth( 71 );
echo "<html>\r\n<head >\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo $charset;
echo "\">\r\n<link id=\"style_sheet\" href=\"css/commonstyle.css\" type=\"text/css\" rel=\"stylesheet\">\r\n<title>";
echo $strAdminTitle;
echo "</title>\r\n</head>\r\n\r\n<body class=\"NormalPage\">\r\n<div align=\"center\">\r\n <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" align=\"center\" background=\"images/mu8.gif\" height=\"30\" >\r\n <tr> \r\n <td width=\"250\" > <img src=\"images/bar.gif\" width=\"13\" height=\"12\"> ";
echo $strStatMon;
echo "</td>\r\n <td > </td>\r\n <td width=\"100\" > </td>\r\n </tr>\r\n \r\n </table>\r\n\r\n\r\n\r\n <br>\r\n";
$nowtime = time( );
$year = date( "Y", $nowtime );
$month = date( "n", $nowtime );
$thismonth == "" || !isset( $thismonth ) ? ( $getmonth = $month ) : ( $getmonth = $thismonth );
$datas = getyear( $year, $getmonth );
$sum_month = "1th_day + 2th_day + 3th_day + 4th_day + 5th_day + 6th_day + 7th_day + 8th_day + 9th_day + 10th_day + 11th_day + 12th_day + 13th_day + 14th_day + 15th_day + 16th_day + 17th_day + 18th_day + 19th_day + 20th_day + 21th_day + 22th_day + 23th_day + 24th_day + 25th_day + 26th_day + 27th_day + 28th_day + 29th_day + 30th_day + 31th_day";
$msql->query( "select * from {$tbl_stat_date} where id = '{$month}'" );
if ( $msql->next_record( ) )
{
$d = 1;
for ( ; $d < 31; $d++ )
{
$countid_month = $msql->f( $d."th_day" );
$month_sum += $countid_month;
}
}
$m = 1;
for ( ; $m <= 12; $m++ )
{
$msql->query( "select {$sum_month} as sum from {$tbl_stat_date} where id = '{$m}'" );
if ( $msql->next_record( ) )
{
$countid_month = $msql->f( "sum" );
}
$sum += $countid_month;
}
echo " <table width=\"625\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr> \r\n <td bgcolor=\"#FFFFFF\">\r\n <div align=\"center\"><font style=\"font-size:14px\">";
echo $year;
echo $strStatMonPic;
echo "(";
echo $strStatTotalYear;
echo ":";
echo $month_sum;
echo ")</font><br>\r\n </div>\r\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr> \r\n <td width=\"35\" height=\"150\" align=\"right\"><img src=\"images/count_left.gif\"></td>\r\n <td valign=\"bottom\">\r\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr> ";
$m = 1;
for ( ; $m <= 12; $m++ )
{
$msql->query( "select * from {$tbl_stat_date} where id = '{$m}'" );
if ( $msql->next_record( ) )
{
$monthsum = 0;
$dd = 1;
for ( ; $dd < 31; $dd++ )
{
$countmonth = $msql->f( $dd."th_day" );
$monthsum += $countmonth;
}
}
$sum != 0 ? ( $persent = $monthsum / $sum ) : ( $persent = 1 );
$height = $persent * 100;
echo " \r\n <td valign=\"bottom\">\r\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr> \r\n <td align=\"center\" width=\"15\">";
echo $monthsum;
echo "</td>\r\n </tr>\r\n <tr> \r\n <td align=\"center\" width=\"15\"><img src=\"images/count_top.gif\" width=\"8\" height=\"3\"></td>\r\n </tr>\r\n <tr> \r\n <td align=\"center\" width=\"15\" valign=\"bottom\"><img src=\"images/count_main.gif\" width=\"8\" height=\"";
echo $height;
echo "\"></td>\r\n </tr>\r\n </table>\r\n </td>\r\n ";
}
echo " </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n <tr> \r\n <td bgcolor=\"#000066\" height=\"1\"></td>\r\n </tr>\r\n </table>\r\n <table width=\"625\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr> \r\n <td>\r\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr> \r\n <td width=\"35\" align=\"center\">0</td>\r\n <t";
echo "d> \r\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr> ";
$m = 1;
for ( ; $m <= 12; $m++ )
{
echo " \r\n <td>\r\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr> \r\n <td align=\"center\" width=\"15\">";
echo $m;
echo "</td>\r\n </tr>\r\n </table>\r\n </td>\r\n ";
}
echo " </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -