function getSETime($time_type = 0){
switch ($time_type) {
case 1:
$start_time = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$end_time = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1;
break;
case 2:
$start_time = mktime(0, 0, 0, date('m'), date('d') - 1, date('Y'));
$end_time = mktime(0, 0, 0, date('m'), date('d'), date('Y')) - 1;
break;
case 3:
$start_time = mktime(0, 0, 0, date('m'), date('d') - date('w') + 1, date('Y'));
$end_time = mktime(23, 59, 59, date('m'), date('d') - date('w') + 7, date('Y'));
break;
case 4:
$start_time = mktime(0, 0, 0, date('m'), date('d') - date('w') + 1 - 7, date('Y'));
$end_time = mktime(23, 59, 59, date('m'), date('d') - date('w') + 7 - 7, date('Y'));
break;
case 5:
$start_time = mktime(0, 0, 0, date('m'), date('d') - 7, date('Y'));
$end_time = TIMESTAMP;
break;
case 6:
$start_time = mktime(0, 0, 0, date('m'), 1, date('Y'));
$end_time = mktime(23, 59, 59, date('m'), date('t'), date('Y'));
break;
case 7:
$start_time = mktime(0, 0, 0, date('m')-1, 1, date('Y'));
$end_time = mktime(23, 59, 59, date('m'), 0, date('Y'));
break;
case 8:
$start_time = mktime(0, 0, 0, date('m')-1, date('d'), date('Y'));
$end_time = TIMESTAMP;
break;
case 9:
$start_time = mktime(0, 0, 0, date('m')-3, date('d'), date('Y'));
$end_time = TIMESTAMP;
break;
case 10:
$start_time = mktime(0, 0, 0, 1, 1, date('Y'));
$end_time = TIMESTAMP;
break;
case 11:
$start_time = mktime(0, 0, 0, date('m'), date('d'), date('Y')-1);
$end_time = TIMESTAMP;
break;
default:
$start_time = input('start_time', '');
$start_time = !empty($start_time) ? strtotime($start_time) : '';
$end_time = input('end_time', '');
$end_time = !empty($end_time) ? strtotime($end_time) : '';
}
return ['start_time' => $start_time, 'end_time' => $end_time];
}