mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
카운터 모듈에 주간 리포트 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6357 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7f6433dd1c
commit
3c9b6d7caf
1 changed files with 28 additions and 0 deletions
|
|
@ -105,6 +105,34 @@
|
||||||
$sum += $count;
|
$sum += $count;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'week' :
|
||||||
|
$time = strtotime($selected_date);
|
||||||
|
$w = date("D");
|
||||||
|
while(date("D",$time) != "Sun") {
|
||||||
|
$time += 60*60*24;
|
||||||
|
}
|
||||||
|
$time -= 60*60*24;
|
||||||
|
while(date("D",$time)!="Sun") {
|
||||||
|
$thisWeek[] = date("Ymd",$time);
|
||||||
|
$time -= 60*60*24;
|
||||||
|
}
|
||||||
|
$thisWeek[] = date("Ymd",$time);
|
||||||
|
asort($thisWeek);
|
||||||
|
foreach($thisWeek as $day) {
|
||||||
|
unset($args);
|
||||||
|
$args->start_date = $day;
|
||||||
|
$args->end_date = $day;
|
||||||
|
if($site_srl) {
|
||||||
|
$args->site_srl = $site_srl;
|
||||||
|
$output = executeQuery('counter.getSiteCounterStatus', $args);
|
||||||
|
} else {
|
||||||
|
$output = executeQuery('counter.getCounterStatus', $args);
|
||||||
|
}
|
||||||
|
$count = (int)$output->data->unique_visitor;
|
||||||
|
$status->list[$day] = (int)$count;
|
||||||
|
if($count>$max) $max = $count;
|
||||||
|
$sum += $count;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'month' :
|
case 'month' :
|
||||||
$year = substr($selected_date, 0, 4);
|
$year = substr($selected_date, 0, 4);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue