mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 08:42:15 +09:00
기본 카운터 모듈의 관리자 통계 볼때 느린속도로 인하여 기본을 일별로 하고 일별/월별/년도별은 counter_status에서 추출하도록 코드 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3089 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cd36ff5718
commit
02ab3dca48
3 changed files with 33 additions and 15 deletions
|
|
@ -75,8 +75,9 @@
|
|||
if(!$start_year) $start_year = date("Y");
|
||||
for($i=$start_year;$i<=date("Y");$i++) {
|
||||
unset($args);
|
||||
$args->regdate = sprintf('%04d', $i);
|
||||
$output = executeQuery('counter.getCounterLog', $args);
|
||||
$args->start_date = sprintf('%04d0000', $i);
|
||||
$args->end_date = sprintf('%04d1231', $i);
|
||||
$output = executeQuery('counter.getCounterLogStatus', $args);
|
||||
$count = (int)$output->data->count;
|
||||
$status->list[$i] = $count;
|
||||
if($count>$max) $max = $count;
|
||||
|
|
@ -88,21 +89,19 @@
|
|||
$year = substr($selected_date, 0, 4);
|
||||
for($i=1;$i<=12;$i++) {
|
||||
unset($args);
|
||||
$args->regdate = sprintf('%04d%02d', $year, $i);
|
||||
$output = executeQuery('counter.getCounterLog', $args);
|
||||
$args->start_date = sprintf('%04d%02d00', $year, $i);
|
||||
$args->end_date = sprintf('%04d%02d31', $year, $i);
|
||||
$output = executeQuery('counter.getCounterLogStatus', $args);
|
||||
$count = (int)$output->data->count;
|
||||
$status->list[$i] = $count;
|
||||
$status->list[$i] = (int)$count;
|
||||
if($count>$max) $max = $count;
|
||||
$sum += $count;
|
||||
}
|
||||
break;
|
||||
case 'day' :
|
||||
$year = substr($selected_date, 0, 4);
|
||||
$month = substr($selected_date, 4, 2);
|
||||
$end_day = date('t', mktime(0,0,0,$month,1,$year));
|
||||
for($i=1;$i<=$end_day;$i++) {
|
||||
case 'hour' :
|
||||
for($i=0;$i<24;$i++) {
|
||||
unset($args);
|
||||
$args->regdate = sprintf('%04d%02d%02d', $year, $month, $i);
|
||||
$args->regdate = sprintf('%08d%02d', $selected_date, $i);
|
||||
$output = executeQuery('counter.getCounterLog', $args);
|
||||
$count = (int)$output->data->count;
|
||||
$status->list[$i] = $count;
|
||||
|
|
@ -111,10 +110,14 @@
|
|||
}
|
||||
break;
|
||||
default :
|
||||
for($i=0;$i<24;$i++) {
|
||||
$year = substr($selected_date, 0, 4);
|
||||
$month = substr($selected_date, 4, 2);
|
||||
$end_day = date('t', mktime(0,0,0,$month,1,$year));
|
||||
for($i=1;$i<=$end_day;$i++) {
|
||||
unset($args);
|
||||
$args->regdate = sprintf('%08d%02d', $selected_date, $i);
|
||||
$output = executeQuery('counter.getCounterLog', $args);
|
||||
$args->start_date = sprintf('%04d%02d%02d', $year, $month, $i);
|
||||
$args->end_date = sprintf('%04d%02d%02d', $year, $month, $i);
|
||||
$output = executeQuery('counter.getCounterLogStatus', $args);
|
||||
$count = (int)$output->data->count;
|
||||
$status->list[$i] = $count;
|
||||
if($count>$max) $max = $count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue