XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
point.admin.view.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class pointAdminView extends point
9 {
13  function init()
14  {
15  // Get teh configuration information
16  $oModuleModel = getModel('module');
17  $config = $oModuleModel->getModuleConfig('point');
18  // Set the configuration variable
19  Context::set('config', $config);
20 
21  //Security
22  $security = new Security();
23  $security->encodeHTML('config.point_name','config.level_icon');
24  $security->encodeHTML('module_info..');
25 
26  // Set the template path
27  $this->setTemplatePath($this->module_path.'tpl');
28  }
29 
34  {
35  // Get the list of level icons
36  $level_icon_list = FileHandler::readDir("./modules/point/icons");
37  Context::set('level_icon_list', $level_icon_list);
38  // Get the list of groups
39  $oMemberModel = getModel('member');
40  $group_list = $oMemberModel->getGroups();
41  $selected_group_list = array();
42  if(count($group_list))
43  {
44  foreach($group_list as $key => $val)
45  {
46  $selected_group_list[$key] = $val;
47  }
48  }
49  Context::set('group_list', $selected_group_list);
50  //Security
51  $security = new Security();
52  $security->encodeHTML('group_list..title','group_list..description');
53 
54  // Set the template
55  $this->setTemplateFile('config');
56  }
57 
62  {
63  // Get a list of mid
64  $oModuleModel = getModel('module');
65  $columnList = array('module_srl', 'mid', 'browser_title', 'module');
66  $mid_list = $oModuleModel->getMidList(null, $columnList);
67 
68  foreach($mid_list as $mid => $item)
69  {
70  if($item->module === 'page')
71  {
72  unset($mid_list[$mid]);
73  }
74  }
75 
76  Context::set('mid_list', $mid_list);
77  Context::set('module_config', $oModuleModel->getModulePartConfigs('point'));
78 
79  //Security
80  $security = new Security();
81  $security->encodeHTML('mid_list..browser_title','mid_list..mid');
82 
83  // Set the template
84  $this->setTemplateFile('module_config');
85  }
86 
91  {
92  // Set the template
93  $this->setTemplateFile('action_config');
94  }
95 
100  {
101  $oPointModel = getModel('point');
102 
103  $args = new stdClass();
104  $args->list_count = 20;
105  $args->page = Context::get('page');
106 
107  $oMemberModel = getModel('member');
108  $memberConfig = $oMemberModel->getMemberConfig();
109 
110  Context::set('identifier', $memberConfig->identifier);
111 
112  $columnList = array('member.member_srl', 'member.user_id', 'member.email_address', 'member.nick_name', 'point.point');
113  $output = $oPointModel->getMemberList($args, $columnList);
114  // context::set for writing into a template
115  Context::set('total_count', $output->total_count);
116  Context::set('total_page', $output->total_page);
117  Context::set('page', $output->page);
118  Context::set('member_list', $output->data);
119  Context::set('page_navigation', $output->page_navigation);
120  // Create a member model object
121  $oMemberModel = getModel('member');
122  // Get a list of groups
123  $this->group_list = $oMemberModel->getGroups();
124  Context::set('group_list', $this->group_list);
125  //Security
126  $security = new Security();
127  $security->encodeHTML('group_list..title','group_list..description');
128  $security->encodeHTML('member_list..');
129  $security->encodeHTML('search_target', 'search_keyword');
130 
131  // Set the template
132  $this->setTemplateFile('member_list');
133  }
134 }
135 /* End of file point.admin.view.php */
136 /* Location: ./modules/point/point.admin.view.php */
setTemplateFile($filename)
$oModuleModel
Definition: ko.install.php:236
$output
Definition: ko.install.php:193
The admin view class of the point module.
dispPointAdminModuleConfig()
Set per-module scores.
set($key, $val, $set_to_get_vars=0)
The parent class of the point module.
Definition: point.class.php:8
init()
Initialization.
$args
Definition: ko.install.php:185
$mid
string to represent run-time instance of Module (XE Module)
getModel($module_name)
Definition: func.inc.php:145
dispPointAdminPointList()
Get a list of member points.
dispPointAdminActConfig()
Configure the functional act.
readDir($path, $filter= '', $to_lower=FALSE, $concat_prefix=FALSE)
dispPointAdminConfig()
Default configurations.