mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 12:19:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1279 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3fb2e6fba2
commit
ad2754314c
8 changed files with 101 additions and 46 deletions
|
|
@ -19,6 +19,25 @@
|
|||
* @brief 관리자 페이지 초기화면
|
||||
**/
|
||||
function dispCounterAdminIndex() {
|
||||
// 정해진 일자가 없으면 오늘자로 설정
|
||||
$selected_date = Context::get('selected_date');
|
||||
if(!$selected_date) $selected_date = date("Ymd");
|
||||
Context::set('selected_date', $selected_date);
|
||||
|
||||
// counter model 객체 생성
|
||||
$oCounterModel = &getModel('counter');
|
||||
|
||||
// 전체 카운터 현황 가져오기
|
||||
$status = $oCounterModel->getStatus(array(0,$selected_date));
|
||||
Context::set('total_counter', $status[0]);
|
||||
Context::set('selected_day_counter', $status[$selected_date]);
|
||||
|
||||
|
||||
// 정해진 일자 현황 가져오기
|
||||
|
||||
// 시간, 일, 월, 년도별로 데이터 가져오기
|
||||
|
||||
// 표시
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,16 @@
|
|||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
|
||||
$lang->cmd_select_date = '날자 선택';
|
||||
|
||||
$lang->total_counter = '전체현황';
|
||||
$lang->selected_day_counter = '선택일 현황';
|
||||
|
||||
$lang->unique_visitor = '방문자';
|
||||
$lang->pageview = '페이지뷰';
|
||||
|
||||
$lang->unit_time = '시간별';
|
||||
$lang->unit_day = '시간별';
|
||||
$lang->unit_month = '시간별';
|
||||
$lang->unit_year = '시간별';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,31 +1,28 @@
|
|||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->interval}</th>
|
||||
<td><input type="text" name="interval" value="{$config->interval?$config->interval:60}" /> {$lang->unit_sec}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_interval}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->limit_count}</th>
|
||||
<td><input type="text" name="limit_count" value="{$config->limit_count?$config->limit_count:5}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_limit_count}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->check_trackback}</th>
|
||||
<td><input type="checkbox" name="check_trackback" value="Y" <!--@if($config->check_trackback=='Y')-->checked="true"<!--@end--> /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_check_trackback}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" value="{$lang->cmd_cancel}" onclick="location.href='{getUrl('act','')}'" />
|
||||
<input type="submit" value="{$lang->cmd_registration}" accesskey="s" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--%import("js/counter_admin.js")-->
|
||||
|
||||
<!-- 일자를 옮기는 form -->
|
||||
<form action="./" method="get" id="fo_counter">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="selected_date" value="{$selected_date}" />
|
||||
</form>
|
||||
|
||||
<!-- 전체현황 -->
|
||||
<div>
|
||||
<h3>{$lang->total_counter}</h3>
|
||||
|
||||
<ul>
|
||||
<li>{$lang->unique_visitor} : {number_format($total_counter->unique_visitor)}</li>
|
||||
<li>{$lang->pageview} : {number_format($total_counter->pageview)}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 선택된 일자 현황 -->
|
||||
<div>
|
||||
<h3><span id='str_selected_date'>{zdate($selected_date, "Y-m-d")}</span> <a href="#" onclick="open_calendar(null, '{$selected_date}', 'changeSelectedDate');return false;">{$lang->cmd_select_date}</a></h3>
|
||||
|
||||
<ul>
|
||||
<li>{$lang->unique_visitor} : {number_format($selected_day_counter->unique_visitor)}</li>
|
||||
<li>{$lang->pageview} : {number_format($selected_day_counter->pageview)}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
14
modules/counter/tpl/js/counter.js
Normal file
14
modules/counter/tpl/js/counter.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* @brief 카운터 정보 수집 javascript
|
||||
* window.onload 이벤트 후에 counter 모듈을 호출한다.
|
||||
**/
|
||||
|
||||
// 이벤트 등록
|
||||
xAddEventListener(window,'load',doCallCounter);
|
||||
|
||||
// counter 모듈을 호출하는 함수
|
||||
function doCallCounter() {
|
||||
show_waiting_message = false;
|
||||
exec_xml('counter','procCounterExecute');
|
||||
show_waiting_message = true;
|
||||
}
|
||||
6
modules/counter/tpl/js/counter_admin.js
Normal file
6
modules/counter/tpl/js/counter_admin.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// 관리자 페이지에서 날자 이동
|
||||
function changeSelectedDate(selected_date) {
|
||||
var fo_obj = xGetElementById('fo_counter');
|
||||
fo_obj.selected_date.value = selected_date;
|
||||
fo_obj.submit();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue