css 및 js 호출순서 조정기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2009-03-06 05:33:56 +00:00
parent 4f380d9c48
commit 61851f1dfe
2149 changed files with 109090 additions and 18689 deletions

View file

@ -16,9 +16,10 @@
/**
* @brief 로그 검사
**/
function isLogged() {
function isLogged($site_srl=0) {
$args->regdate = date("Ymd");
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
$args->site_srl = $site_srl;
$output = executeQuery('counter.getCounterLog', $args);
return $output->data->count?true:false;
}
@ -26,16 +27,21 @@
/**
* @brief 오늘자 카운터 현황 row 있는지 체크
**/
function isInsertedTodayStatus() {
function isInsertedTodayStatus($site_srl=0) {
$args->regdate = date("Ymd");
$output = executeQuery('counter.getTodayStatus', $args);
if($site_srl) {
$args->site_srl = $site_srl;
$output = executeQuery('counter.getSiteTodayStatus', $args);
} else {
$output = executeQuery('counter.getTodayStatus', $args);
}
return $output->data->count?true:false;
}
/**
* @brief 특정 일의 접속 통계를 가져옴
**/
function getStatus($selected_date) {
function getStatus($selected_date, $site_srl=0) {
// 여러개의 날짜 로그를 가져올 경우
if(is_array($selected_date)) {
$date_count = count($selected_date);
@ -47,7 +53,12 @@
$args->regdate = $selected_date;
}
$output = executeQuery('counter.getCounterStatus', $args);
if($site_srl) {
$args->site_srl = $site_srl;
$output = executeQuery('counter.getSiteCounterStatusDays', $args);
} else {
$output = executeQuery('counter.getCounterStatusDays', $args);
}
$status = $output->data;
if(!is_array($selected_date)) return $status;
@ -64,21 +75,31 @@
/**
* @brief 지정된 일자의 시간대별 로그 가져오기
**/
function getHourlyStatus($type='hour', $selected_date) {
function getHourlyStatus($type='hour', $selected_date, $site_srl=0) {
$max = 0;
$sum = 0;
switch($type) {
case 'year' :
// 카운터 시작일 구함
$output = executeQuery('counter.getStartLogDate');
if($site_srl) {
$args->site_srl = $site_srl;
$output = executeQuery('counter.getSiteStartLogDate', $args);
} else {
$output = executeQuery('counter.getStartLogDate');
}
$start_year = substr($output->data->regdate,0,4);
if(!$start_year) $start_year = date("Y");
for($i=$start_year;$i<=date("Y");$i++) {
unset($args);
$args->start_date = sprintf('%04d0000', $i);
$args->end_date = sprintf('%04d1231', $i);
$output = executeQuery('counter.getCounterLogStatus', $args);
$count = (int)$output->data->count;
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[$i] = $count;
if($count>$max) $max = $count;
$sum += $count;
@ -91,8 +112,13 @@
unset($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;
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[$i] = (int)$count;
if($count>$max) $max = $count;
$sum += $count;
@ -101,8 +127,15 @@
case 'hour' :
for($i=0;$i<24;$i++) {
unset($args);
$args->regdate = sprintf('%08d%02d', $selected_date, $i);
$output = executeQuery('counter.getCounterLog', $args);
$args->start_date = sprintf('%08d%02d0000', $selected_date, $i);
$args->end_date = sprintf('%08d%02d5959', $selected_date, $i);
if($site_srl) {
$args->site_srl = $site_srl;
$output = executeQuery('counter.getSiteCounterLogStatus', $args);
} else {
$args->site_srl = 0;
$output = executeQuery('counter.getCounterLogStatus', $args);
}
$count = (int)$output->data->count;
$status->list[$i] = $count;
if($count>$max) $max = $count;
@ -117,8 +150,13 @@
unset($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;
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[$i] = $count;
if($count>$max) $max = $count;
$sum += $count;