📄 stat_date.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\" > ";
echo $strStatDay;
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 );
$today = date( "j", $nowtime );
$datas = getyear( $year, $month );
$day == "" || !isset( $day ) ? ( $day = $today ) : ( $day = $day );
$now = date( "Y-n-j H:i:s", $nowtime );
$month_end = date( "Y-n-j H:i:s", mktime( 23, 59, 59, $month, $datas, $year ) );
$month_beging = date( "Y-n-j H:i:s", mktime( 0, 0, 0, $month, 1, $year ) );
$sum = "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 {$sum} as sum from {$tbl_stat_date} where id = '{$month}'" );
if ( $msql->next_record( ) )
{
$countid_month = $msql->f( "sum" );
}
if ( $countid_month == 0 )
{
$countid_month = 1;
}
echo " \r\n <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\"><br>\r\n ";
echo $month;
echo $strStatDaYPic;
echo " (";
echo $strStatTotalMon;
echo ":";
echo $countid_month;
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> ";
$msql->query( "select * from {$tbl_stat_date} where id = '{$month}'" );
if ( $msql->next_record( ) )
{
$d = 1;
for ( ; $d <= $datas; $d++ )
{
$date[$d] = $d."th_day";
$count[$d] = $msql->f( $date[$d] );
$sum != 0 ? ( $persent = $count[$d] / $countid_month ) : ( $persent = 1 );
$height[$d] = $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 $count[$d];
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[$d];
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> ";
$d = 1;
for ( ; $d <= $datas; $d++ )
{
echo " \r\n <td>\r\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr> \r\n <td align=\"center\" width=\"15\">";
echo $d;
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 \r\n</div>\r\n</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -