mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 03:09:55 +09:00
merge from 1.7.3.5(r13153:r13167)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc47d2b247
commit
2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions
|
|
@ -1,51 +1,67 @@
|
|||
<?php
|
||||
/**
|
||||
* Admin view class of counter module
|
||||
|
||||
/**
|
||||
* Admin view class of counter module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class counterAdminView extends counter
|
||||
{
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
// set the template path
|
||||
$this->setTemplatePath($this->module_path . 'tpl');
|
||||
}
|
||||
|
||||
class counterAdminView extends counter {
|
||||
/**
|
||||
* Admin page
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function dispCounterAdminIndex()
|
||||
{
|
||||
// set today's if no date is given
|
||||
$selected_date = Context::get('selected_date');
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
// set the template path
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
if(!$selected_date)
|
||||
{
|
||||
$selected_date = date("Ymd");
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin page
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function dispCounterAdminIndex() {
|
||||
// set today's if no date is given
|
||||
$selected_date = Context::get('selected_date');
|
||||
if(!$selected_date) $selected_date = date("Ymd");
|
||||
Context::set('selected_date', $selected_date);
|
||||
// create the counter model object
|
||||
$oCounterModel = &getModel('counter');
|
||||
// get a total count and daily count
|
||||
$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]);
|
||||
// get data by time, day, month, and year
|
||||
$type = Context::get('type');
|
||||
if(!$type) {
|
||||
$type = 'day';
|
||||
Context::set('type',$type);
|
||||
}
|
||||
$detail_status = $oCounterModel->getHourlyStatus($type, $selected_date, $site_module_info->site_srl);
|
||||
Context::set('detail_status', $detail_status);
|
||||
|
||||
// display
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
Context::set('selected_date', $selected_date);
|
||||
|
||||
}
|
||||
?>
|
||||
// create the counter model object
|
||||
$oCounterModel = getModel('counter');
|
||||
|
||||
// get a total count and daily count
|
||||
$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]);
|
||||
|
||||
// get data by time, day, month, and year
|
||||
$type = Context::get('type');
|
||||
|
||||
if(!$type)
|
||||
{
|
||||
$type = 'day';
|
||||
Context::set('type', $type);
|
||||
}
|
||||
|
||||
$detail_status = $oCounterModel->getHourlyStatus($type, $selected_date, $site_module_info->site_srl);
|
||||
Context::set('detail_status', $detail_status);
|
||||
|
||||
// display
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file counter.admin.view.php */
|
||||
/* Location: ./modules/counter/counter.admin.view.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue