XpressEngine Core
1.11.2
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
modules
counter
counter.admin.view.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
3
9
class
counterAdminView
extends
counter
10
{
11
17
function
init
()
18
{
19
// set the template path
20
$this->
setTemplatePath
($this->module_path .
'tpl'
);
21
}
22
28
function
dispCounterAdminIndex
()
29
{
30
// set today's if no date is given
31
$selected_date = (int)
Context::get
(
'selected_date'
);
32
33
if
(!$selected_date)
34
{
35
$selected_date = date(
"Ymd"
);
36
}
37
38
Context::set
(
'selected_date'
, $selected_date);
39
40
// create the counter model object
41
$oCounterModel =
getModel
(
'counter'
);
42
43
// get a total count and daily count
44
$site_module_info =
Context::get
(
'site_module_info'
);
45
$status = $oCounterModel->getStatus(array(0, $selected_date), $site_module_info->site_srl);
46
47
Context::set
(
'total_counter'
, $status[0]);
48
Context::set
(
'selected_day_counter'
, $status[$selected_date]);
49
50
// get data by time, day, month, and year
51
$type =
Context::get
(
'type'
);
52
53
if
(!$type)
54
{
55
$type =
'day'
;
56
Context::set
(
'type'
, $type);
57
}
58
59
$detail_status = $oCounterModel->getHourlyStatus($type, $selected_date, $site_module_info->site_srl);
60
Context::set
(
'detail_status'
, $detail_status);
61
62
// display
63
$this->
setTemplateFile
(
'index'
);
64
}
65
66
}
67
/* End of file counter.admin.view.php */
68
/* Location: ./modules/counter/counter.admin.view.php */
ModuleObject\setTemplateFile
setTemplateFile($filename)
Definition:
ModuleObject.class.php:252
counterAdminView
Definition:
counter.admin.view.php:9
Context\set
set($key, $val, $set_to_get_vars=0)
Definition:
Context.class.php:1948
counterAdminView\dispCounterAdminIndex
dispCounterAdminIndex()
Definition:
counter.admin.view.php:28
counterAdminView\init
init()
Definition:
counter.admin.view.php:17
getModel
getModel($module_name)
Definition:
func.inc.php:145
counter
Definition:
counter.class.php:9
Context\get
get($key)
Definition:
Context.class.php:1973
ModuleObject\setTemplatePath
setTemplatePath($path)
Definition:
ModuleObject.class.php:275
Generated on Tue Dec 18 2018 17:04:28 for XpressEngine Core by
1.8.5