mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +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
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="0.2">
|
||||
<title xml:lang="ko">기본 카운터</title>
|
||||
<title xml:lang="ko">접속통계</title>
|
||||
<title xml:lang="zh-CN">访问统计</title>
|
||||
<title xml:lang="en">Basic Counter</title>
|
||||
<title xml:lang="es">Contador Básico</title>
|
||||
<title xml:lang="en">Counter</title>
|
||||
<title xml:lang="es">Contador</title>
|
||||
<title xml:lang="jp">デフォルトアクセスカウンター</title>
|
||||
<title xml:lang="ru">Базовый счетчик</title>
|
||||
<title xml:lang="zh-TW">基本統計</title>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<description xml:lang="zh-TW">預設的統計程式。</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
<category>accessory</category>
|
||||
<category>statistics</category>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<grants />
|
||||
<permissions />
|
||||
<actions>
|
||||
<action name="dispCounterAdminIndex" type="view" standalone="true" admin_index="true" />
|
||||
<action name="procCounterExecute" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@
|
|||
$oCounterModel = &getModel('counter');
|
||||
|
||||
// 전체 카운터 및 지정된 일자의 현황 가져오기
|
||||
$status = $oCounterModel->getStatus(array(0,$selected_date));
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$status = $oCounterModel->getStatus(array(0,$selected_date),$site_module_info->site_srl);
|
||||
Context::set('total_counter', $status[0]);
|
||||
Context::set('selected_day_counter', $status[$selected_date]);
|
||||
|
||||
|
|
@ -38,7 +39,7 @@
|
|||
$type = 'day';
|
||||
Context::set('type',$type);
|
||||
}
|
||||
$detail_status = $oCounterModel->getHourlyStatus($type, $selected_date);
|
||||
$detail_status = $oCounterModel->getHourlyStatus($type, $selected_date, $site_module_info->site_srl);
|
||||
Context::set('detail_status', $detail_status);
|
||||
|
||||
// 표시
|
||||
|
|
|
|||
|
|
@ -11,17 +11,13 @@
|
|||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('counter', 'view', 'dispCounterAdminIndex');
|
||||
|
||||
$oCounterController = &getController('counter');
|
||||
|
||||
// 0 일자로 기록될 전체 방문 기록 row 추가
|
||||
$oCounterController->insertTotalStatus();
|
||||
//$oCounterController->insertTotalStatus();
|
||||
|
||||
// 오늘자 row입력
|
||||
$oCounterController->insertTodayStatus();
|
||||
//$oCounterController->insertTodayStatus();
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
|
@ -30,6 +26,10 @@
|
|||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
// 카운터에 site_srl추가
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists('counter_log', 'site_srl')) return true;
|
||||
if(!$oDB->isIndexExists('counter_log','idx_site_counter_log')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,14 @@
|
|||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object();
|
||||
// 카운터에 site_srl추가
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists('counter_log', 'site_srl'))
|
||||
$oDB->addColumn('counter_log','site_srl','number',11,0,true);
|
||||
if(!$oDB->isIndexExists('counter_log','idx_site_counter_log'))
|
||||
$oDB->addIndex('counter_log','idx_site_counter_log',array('site_srl','ipaddress'),false);
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
$lang->unique_visitor = 'Visitors';
|
||||
$lang->pageview = 'Pageview';
|
||||
|
||||
$lang->today = 'today';
|
||||
$lang->yesterday = 'yesterday';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
$lang->unique_visitor = 'visitante';
|
||||
$lang->pageview = 'Ver página';
|
||||
|
||||
$lang->today = 'today';
|
||||
$lang->yesterday = 'yesterday';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
$lang->unique_visitor = 'Visiteurs';
|
||||
$lang->pageview = 'Vues';
|
||||
|
||||
$lang->today = 'today';
|
||||
$lang->yesterday = 'yesterday';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
$lang->unique_visitor = '訪問者';
|
||||
$lang->pageview = 'ページビュー';
|
||||
|
||||
$lang->today = 'today';
|
||||
$lang->yesterday = 'yesterday';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
|
||||
$lang->counter = "카운터";
|
||||
$lang->counter = '접속 통계';
|
||||
$lang->cmd_select_date = '날짜 선택';
|
||||
$lang->cmd_select_counter_type = array(
|
||||
'hour' => '시간대별',
|
||||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
$lang->unique_visitor = '방문자';
|
||||
$lang->pageview = '페이지뷰';
|
||||
|
||||
$lang->today = '오늘';
|
||||
$lang->yesterday = '어제';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
$lang->unique_visitor = 'Посетителей';
|
||||
$lang->pageview = 'Просмотров страниц';
|
||||
|
||||
$lang->today = 'today';
|
||||
$lang->yesterday = 'yesterday';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
$lang->unique_visitor = '访问者';
|
||||
$lang->pageview = '页面浏览';
|
||||
|
||||
$lang->today = '今日';
|
||||
$lang->yesterday = '昨日';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
$lang->unique_visitor = '訪問者';
|
||||
$lang->pageview = '頁面瀏覽';
|
||||
|
||||
$lang->today = '今天';
|
||||
$lang->yesterday = '昨天';
|
||||
?>
|
||||
|
|
|
|||
8
modules/counter/queries/deleteSiteCounter.xml
Normal file
8
modules/counter/queries/deleteSiteCounter.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteSiteCounter" action="delete">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
8
modules/counter/queries/deleteSiteCounterLog.xml
Normal file
8
modules/counter/queries/deleteSiteCounterLog.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteSiteCounterLog" action="delete">
|
||||
<tables>
|
||||
<table name="counter_log" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -6,7 +6,8 @@
|
|||
<column name="count(*)" alias="count"/>
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="ipaddress" var="ipaddress" />
|
||||
<condition operation="equal" column="site_srl" var="site_srl" default="0" pipe="and" />
|
||||
<condition operation="equal" column="ipaddress" var="ipaddress" pipe="and" />
|
||||
<condition operation="like_prefix" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
<query id="getCounterLogStatus" action="select">
|
||||
<tables>
|
||||
<table name="counter_status" />
|
||||
<table name="counter_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="sum(unique_visitor)" alias="count"/>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="more" column="regdate" var="start_date" notnull="notnull" pipe="and" />
|
||||
<condition operation="less" column="regdate" var="end_date" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
<table name="counter_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
<column name="sum(unique_visitor)" alias="unique_visitor" />
|
||||
<column name="sum(pageview)" alias="pageview" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="regdate" var="regdate" notnull="notnull" />
|
||||
<condition operation="more" column="regdate" var="start_date" notnull="notnull" pipe="and" />
|
||||
<condition operation="less" column="regdate" var="end_date" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
11
modules/counter/queries/getCounterStatusDays.xml
Normal file
11
modules/counter/queries/getCounterStatusDays.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getSiteCounterStatus" action="select">
|
||||
<tables>
|
||||
<table name="counter_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
13
modules/counter/queries/getSiteCounterLogStatus.xml
Normal file
13
modules/counter/queries/getSiteCounterLogStatus.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<query id="getSiteCounterLogStatus" action="select">
|
||||
<tables>
|
||||
<table name="counter_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" pipe="and" />
|
||||
<condition operation="more" column="regdate" var="start_date" notnull="notnull" pipe="and" />
|
||||
<condition operation="less" column="regdate" var="end_date" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
14
modules/counter/queries/getSiteCounterStatus.xml
Normal file
14
modules/counter/queries/getSiteCounterStatus.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<query id="getSiteCounterStatus" action="select">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="sum(unique_visitor)" alias="unique_visitor" />
|
||||
<column name="sum(pageview)" alias="pageview" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" default="0" />
|
||||
<condition operation="more" column="regdate" var="start_date" notnull="notnull" pipe="and" />
|
||||
<condition operation="less" column="regdate" var="end_date" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/counter/queries/getSiteCounterStatusDays.xml
Normal file
12
modules/counter/queries/getSiteCounterStatusDays.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getSiteCounterStatus" action="select">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" default="0" />
|
||||
<condition operation="in" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/counter/queries/getSiteLogDate.xml
Normal file
12
modules/counter/queries/getSiteLogDate.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getSiteStartLogDate" action="select">
|
||||
<tables>
|
||||
<table name="counter_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="min(regdate)" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" default="0" pipe="and" />
|
||||
<condition operation="excess" column="regdate" default="1" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/counter/queries/getSiteStartLogDate.xml
Normal file
12
modules/counter/queries/getSiteStartLogDate.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getSiteStartLogDate" action="select">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="min(regdate)" alias="regdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" />
|
||||
<condition operation="excess" column="regdate" default="1" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
12
modules/counter/queries/getSiteTodayStatus.xml
Normal file
12
modules/counter/queries/getSiteTodayStatus.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="getSiteTodayStatus" action="select">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count"/>
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" default="0" />
|
||||
<condition operation="equal" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
<table name="counter_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="site_srl" var="site_srl" notnull="notnull" default="0" />
|
||||
<column name="regdate" var="regdate" default="curdate()" notnull="notnull"/>
|
||||
<column name="ipaddress" var="ipaddress" notnull="notnull" default="ipaddress()" />
|
||||
<column name="user_agent" var="user_agent" />
|
||||
|
|
|
|||
11
modules/counter/queries/insertSiteTodayStatus.xml
Normal file
11
modules/counter/queries/insertSiteTodayStatus.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="insertSiteTodayStatus" action="insert">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="site_srl" var="site_srl" notnull="notnull" default="0" />
|
||||
<column name="regdate" var="regdate" default="0" notnull="notnull" />
|
||||
<column name="unique_visitor" default="0" />
|
||||
<column name="pageview" default="0" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<table name="counter_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="regdate" var="regdate" notnull="notnull" />
|
||||
<column name="regdate" var="regdate" default="0" notnull="notnull" />
|
||||
<column name="unique_visitor" default="0" />
|
||||
<column name="pageview" default="0" />
|
||||
</columns>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@
|
|||
<column name="pageview" default="plus(1)" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="regdate" var="regdate" notnull="notnull" />
|
||||
<condition operation="in" column="regdate" var="regdate" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
12
modules/counter/queries/updateSiteCounterPageview.xml
Normal file
12
modules/counter/queries/updateSiteCounterPageview.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="updateSiteCounterPageview" action="update">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="pageview" default="plus(1)" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" default="0" pipe="and" />
|
||||
<condition operation="in" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
13
modules/counter/queries/updateSiteCounterUnique.xml
Normal file
13
modules/counter/queries/updateSiteCounterUnique.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<query id="updateSiteCounterUnique" action="update">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="unique_visitor" default="plus(1)" />
|
||||
<column name="pageview" default="plus(1)" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" />
|
||||
<condition operation="in" column="regdate" var="regdate" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
13
modules/counter/queries/updateSiteTotalCounterUnique.xml
Normal file
13
modules/counter/queries/updateSiteTotalCounterUnique.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<query id="updateSiteTotalCounterUnique" action="update">
|
||||
<tables>
|
||||
<table name="counter_site_status" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="unique_visitor" default="plus(1)" />
|
||||
<column name="pageview" default="plus(1)" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" />
|
||||
<condition operation="equal" column="regdate" default="00000000" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -7,6 +7,6 @@
|
|||
<column name="pageview" default="plus(1)" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="regdate" default="00000000" notnull="notnull" />
|
||||
<condition operation="in" column="regdate" default="0" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<table name="counter_log">
|
||||
<column name="ipaddress" type="varchar" size="250" notnull="notnull" index="idx_counter_log" />
|
||||
<column name="site_srl" type="number" size="11" notnull="notnull" default="0" index="idx_site_counter_log" />
|
||||
<column name="ipaddress" type="varchar" size="250" notnull="notnull" index="idx_site_counter_log" />
|
||||
<column name="regdate" type="date" index="idx_counter_log" />
|
||||
<column name="user_agent" type="varchar" size="250" />
|
||||
</table>
|
||||
|
|
|
|||
6
modules/counter/schemas/counter_site_status.xml
Normal file
6
modules/counter/schemas/counter_site_status.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<table name="counter_site_status">
|
||||
<column name="site_srl" type="number" size="11" notnull="notnull" unique="site_status" />
|
||||
<column name="regdate" type="number" size="11" notnull="notnull" unique="site_status" />
|
||||
<column name="unique_visitor" type="number" size="11" default="0" />
|
||||
<column name="pageview" type="number" size="11" default="0" />
|
||||
</table>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.adminTable.counter th { font-size:.9em; text-align:center; padding:0;}
|
||||
.adminTable.counter th em { font:normal 1em Tahoma;}
|
||||
.adminTable td .graph { width:90%; position:relative;}
|
||||
.adminTable td .graph .bar { width:100%; position:absolute; margin-top:4px;}
|
||||
.adminTable td .graph .num { position:relative; background:#ffffff; color:#636363; font:.9em Tahoma; padding-left:10px; white-space:nowrap;}
|
||||
#str_selected_date { font-size:9pt; font-family:tahoma; }
|
||||
#trigger_calendar { vertical-align:middle; }
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 81 B After Width: | Height: | Size: 50 B |
|
|
@ -12,7 +12,7 @@
|
|||
</script>
|
||||
|
||||
|
||||
<h3>{$lang->counter} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
<h3 class="xeAdmin">{$lang->counter} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<div class="header4 gap1">
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="selected_date" id="selected_date" value="{zDate('Ymd',$selected_date)}" />
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<table cellspacing="0" class="colTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="row" class="half_wide"><div>{$lang->total_counter}</div></th>
|
||||
|
|
@ -82,11 +82,11 @@
|
|||
|
||||
|
||||
<!-- unique visitor 그래프 -->
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<!--@foreach($detail_status->list as $key => $val)-->
|
||||
<!--@if($detail_status->sum>0)-->
|
||||
{@$percent = sprintf("%0.2f", $val / $detail_status->sum * 100 )}
|
||||
{@$img_width = sprintf("%0.0f", $val / $detail_status->max * 100 )}
|
||||
{@$img_width = sprintf("%d", $val / $detail_status->max * 100 )}
|
||||
<!--@else-->
|
||||
{@$percent = 0}
|
||||
{@$img_width = 1}
|
||||
|
|
@ -123,13 +123,14 @@
|
|||
</div>
|
||||
</th>
|
||||
<!--@end-->
|
||||
<td>
|
||||
<div class="graph">
|
||||
<img src="./images/iconBar.gif" alt="" width="12" height="6" class="bar" />
|
||||
<div class="num" style="left:{$percent}%;width:{100-$percent}%;">
|
||||
<strong>{number_format($val)}</strong> ({$percent}%)
|
||||
</div>
|
||||
</div>
|
||||
<td class="wide">
|
||||
{@$img_percent = $img_width-30}
|
||||
<!--@if($img_percent<1)-->
|
||||
<img class="graphHr" style="width:3px;" alt="" src="./images/iconBar.gif" />
|
||||
<!--@else-->
|
||||
<img class="graphHr" style="width:{$img_percent}%;" alt="" src="./images/iconBar.gif" />
|
||||
<!--@end-->
|
||||
{number_format($val)}({$percent}%)
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
/**
|
||||
* @brief 카운터 정보 수집 javascript
|
||||
* window.onload 이벤트 후에 counter 모듈을 호출한다.
|
||||
**/
|
||||
|
||||
// 이벤트 등록
|
||||
jQuery(doCallCounter);
|
||||
|
||||
// counter 모듈을 호출하는 함수
|
||||
function doCallCounter() {
|
||||
show_waiting_message = false;
|
||||
exec_xml('counter','procCounterExecute');
|
||||
show_waiting_message = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue