mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 08:12:17 +09:00
css 및 js 호출순서 조정기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f380d9c48
commit
61851f1dfe
2149 changed files with 109090 additions and 18689 deletions
|
|
@ -20,26 +20,29 @@
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
// 로그를 검사
|
||||
$oCounterModel = &getModel('counter');
|
||||
|
||||
// 오늘자 row가 있는지 체크하여 없으면 등록
|
||||
if(!$oCounterModel->isInsertedTodayStatus()) {
|
||||
$this->insertTodayStatus();
|
||||
if(!$oCounterModel->isInsertedTodayStatus($site_srl)) {
|
||||
$this->insertTodayStatus(0,$site_srl);
|
||||
|
||||
// 기존 row가 있으면 사용자 체크
|
||||
} else {
|
||||
|
||||
// 등록되어 있지 않은 아이피일 경우
|
||||
if(!$oCounterModel->isLogged()) {
|
||||
if(!$oCounterModel->isLogged($site_srl)) {
|
||||
// 로그 등록
|
||||
$this->insertLog();
|
||||
$this->insertLog($site_srl);
|
||||
|
||||
// unique 및 pageview 등록
|
||||
$this->insertUniqueVisitor();
|
||||
$this->insertUniqueVisitor($site_srl);
|
||||
} else {
|
||||
// pageview 등록
|
||||
$this->insertPageView();
|
||||
$this->insertPageView($site_srl);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -49,50 +52,84 @@
|
|||
/**
|
||||
* @brief 로그 등록
|
||||
**/
|
||||
function insertLog() {
|
||||
function insertLog($site_srl=0) {
|
||||
$args->regdate = date("YmdHis");
|
||||
$args->user_agent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$args->site_srl = $site_srl;
|
||||
return executeQuery('counter.insertCounterLog', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief unique visitor 등록
|
||||
**/
|
||||
function insertUniqueVisitor() {
|
||||
$args->regdate = date("Ymd");
|
||||
executeQuery('counter.updateCounterUnique', $args);
|
||||
executeQuery('counter.updateTotalCounterUnique');
|
||||
function insertUniqueVisitor($site_srl=0) {
|
||||
$args->regdate = '0,'.date("Ymd");
|
||||
if($site_srl) {
|
||||
$args->site_srl = $site_srl;
|
||||
$output = executeQuery('counter.updateSiteCounterUnique', $args);
|
||||
} else {
|
||||
$output = executeQuery('counter.updateCounterUnique', $args);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief pageview 등록
|
||||
**/
|
||||
function insertPageView() {
|
||||
function insertPageView($site_srl=0) {
|
||||
$args->regdate = '0, '.date('Ymd');
|
||||
executeQuery('counter.updateCounterPageview', $args);
|
||||
if($site_srl) {
|
||||
$args->site_srl = $site_srl;
|
||||
executeQuery('counter.updateSiteCounterPageview', $args);
|
||||
} else {
|
||||
executeQuery('counter.updateCounterPageview', $args);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 전체 카운터 status 추가
|
||||
**/
|
||||
function insertTotalStatus() {
|
||||
function insertTotalStatus($site_srl=0) {
|
||||
$args->regdate = 0;
|
||||
executeQuery('counter.insertTodayStatus', $args);
|
||||
if($site_srl) {
|
||||
$args->site_srl = $site_srl;
|
||||
executeQuery('counter.insertSiteTodayStatus', $args);
|
||||
} else {
|
||||
executeQuery('counter.insertTodayStatus', $args);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 오늘자 카운터 status 추가
|
||||
**/
|
||||
function insertTodayStatus($regdate = 0) {
|
||||
function insertTodayStatus($regdate = 0, $site_srl=0) {
|
||||
if($regdate) $args->regdate = $regdate;
|
||||
else $args->regdate = date("Ymd");
|
||||
executeQuery('counter.insertTodayStatus', $args);
|
||||
if($site_srl) {
|
||||
$args->site_srl = $site_srl;
|
||||
$query_id = 'counter.insertSiteTodayStatus';
|
||||
|
||||
$u_args->site_srl = $site_srl; ///< 일별 row입력시 전체 row (regdate=0)도 같이 입력 시도
|
||||
executeQuery($query_id, $u_args);
|
||||
} else {
|
||||
$query_id = 'counter.insertTodayStatus';
|
||||
executeQuery($query_id); ///< 일별 row입력시 전체 row (regdate=0)도 같이 입력 시도
|
||||
}
|
||||
$output = executeQuery($query_id, $args);
|
||||
|
||||
// 로그 등록
|
||||
$this->insertLog();
|
||||
$this->insertLog($site_srl);
|
||||
|
||||
// unique 및 pageview 등록
|
||||
$this->insertUniqueVisitor();
|
||||
$this->insertUniqueVisitor($site_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 가상 사이트의 카운터 로그 삭제
|
||||
**/
|
||||
function deleteSiteCounterLogs($site_srl) {
|
||||
$args->site_srl = $site_srl;
|
||||
executeQuery('counter.deleteSiteCounter',$args);
|
||||
executeQuery('counter.deleteSiteCounterLog',$args);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue