<?php
define('ALLOWGUEST',true);
require './source/core/run.php';
$b_date = Core_Fun::rec_post("b_date",2);
$c...
<?php
define('ALLOWGUEST',true);
require './source/core/run.php';
$b_date = Core_Fun::rec_post("b_date",2);
$custom = Core_Fun::rec_post("custom",2);
$time_start = strtotime($_GET['time_start']);
$time_end = strtotime($_GET['time_end']);
$now = time(); // 时间戳
//今天
$today_audit_num = 0;
$today_use_num = 0;
$beginTime = date('Y-m-d 00:00:00', $now);
$endTime = date('Y-m-d 23:59:59', $now);
//本周
$week_audit_num = 0;
$week_use_num = 0;
$time = '1' == date('w') ? strtotime('Monday', $now) : strtotime('last Monday', $now);
$beginTime = date('Y-m-d 00:00:00', $time);
$oneweek = strtotime($beginTime);
$endTime_oneweek = date('Y-m-d 23:59:59', strtotime('Sunday', $now));
echo('<br>');
echo($oneweek); echo ' // 本周';
//过去两周
$week_audit_num = 0;
$week_use_num = 0;
$beginTime = date("Y-m-d H:i:s",mktime(0, 0 , 0,date("m"),date("d")-date("w")+1-7,date("Y")));
$twoweek = strtotime($beginTime);
$endTime_twoweek = date("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("d")-date("w")+7-7,date("Y")));
echo('<br>');
echo($twoweek); echo ' // 过去两周';
//过去一个月
$month_audit_num = 0;
$month_use_num = 0;
$beginTime = date('Y-m-d 00:00:00', mktime(0, 0, 0, date('m', $now), '1', date('Y', $now)));
$onemonth = strtotime($beginTime);
$endTime_onemonth = date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now)));
echo('<br>');
echo($onemonth); echo ' // 过去一个月';
//过去三个月内
$three_month_audit_num = 0;
$three_month_use_num = 0;
$time = strtotime('-2 month', $now);
$beginTime = date('Y-m-d 00:00:00', mktime(0, 0,0, date('m', $time), 1, date('Y', $time)));
$threemonth = strtotime($beginTime);
$endTime_threemonth = date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now)));
echo('<br>');
echo($threemonth); echo ' // 过去三个月内';
//过去一年
$year_audit_num = 0;
$year_use_num = 0;
$time = strtotime('-1 year', $now);
$beginTime = date('Y-m-d 00:00:00', mktime(0, 0,0, date('m', $time), 1, date('Y', $time)));
$year = strtotime($beginTime);
$endTime_year = date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now)));
echo('<br>');
echo($year); echo ' // 过去一年';
//
$now = time();
//今天
$today_audit_num = 0;
$today_use_num = 0;
$beginTime = date('Y-m-d 00:00:00', $now);
$endTime = date('Y-m-d 23:59:59', $now);
echo($beginTime); echo ' // 今天';
//本周
$week_audit_num = 0;
$week_use_num = 0;
$time = '1' == date('w') ? strtotime('Monday', $now) : strtotime('last Monday', $now);
$beginTime = date('Y-m-d 00:00:00', $time);
$endTime = date('Y-m-d 23:59:59', strtotime('Sunday', $now));
echo('<br>');
echo($beginTime); echo ' // 本周';
//两周
$week_audit_num = 0;
$week_use_num = 0;
$beginTime = date("Y-m-d H:i:s",mktime(0, 0 , 0,date("m"),date("d")-date("w")+1-7,date("Y")));
$endTime = date("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("d")-date("w")+7-7,date("Y")));
echo('<br>');
echo($beginTime); echo ' // 两周';
//本月
$month_audit_num = 0;
$month_use_num = 0;
$beginTime = date('Y-m-d 00:00:00', mktime(0, 0, 0, date('m', $now), '1', date('Y', $now)));
$endTime = date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now)));
echo('<br>');
echo($beginTime); echo ' // 本月';
//两个月内
$three_month_audit_num = 0;
$three_month_use_num = 0;
$time = strtotime('-1 month', $now);
$beginTime = date('Y-m-d 00:00:00', mktime(0, 0,0, date('m', $time), 1, date('Y', $time)));
$endTime = date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now))); ;
echo('<br>');
echo($beginTime); echo ' // 两个月内';
//三个月内
$three_month_audit_num = 0;
$three_month_use_num = 0;
$time = strtotime('-2 month', $now);
$beginTime = date('Y-m-d 00:00:00', mktime(0, 0,0, date('m', $time), 1, date('Y', $time)));
$endTime = date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now))); ;
echo('<br>');
echo($beginTime); echo ' // 三个月内';
//半年内
$half_year_audit_num = 0;
$half_year_use_num = 0;
$time = strtotime('-5 month', $now);
$beginTime = date('Y-m-d 00:00:00', mktime(0, 0,0, date('m', $time), 1, date('Y', $time)));
$endTime = date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now)));
echo('<br>');
echo($beginTime); echo ' // 半年内';
//过去一年
$year_audit_num = 0;
$year_use_num = 0;
$time = strtotime('-1 year', $now);
$beginTime = date('Y-m-d 00:00:00', mktime(0, 0,0, date('m', $time), 1, date('Y', $time)));
$endTime = date('Y-m-d 23:39:59', mktime(0, 0, 0, date('m', $now), date('t', $now), date('Y', $now)));
echo('<br>');
echo($beginTime); echo ' // 过去一年';