XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
trash.admin.view.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
11 class trashAdminView extends trash
12 {
17  function init()
18  {
19  // 템플릿 경로 지정 (board의 경우 tpl에 관리자용 템플릿 모아놓음)
20  $template_path = sprintf("%stpl/",$this->module_path);
22  }
23 
28  function dispTrashAdminList()
29  {
30  $args = new stdClass();
31  $args->page = Context::get('page'); // /< Page
32  $args->list_count = 30; // /< the number of posts to display on a single page
33  $args->page_count = 5; // /< the number of pages that appear in the page navigation
34 
35  $args->search_target = Context::get('search_target'); // /< search (title, contents ...)
36  $args->search_keyword = Context::get('search_keyword'); // /< keyword to search
37 
38  $oTrashModel = getModel('trash');
39  $output = $oTrashModel->getTrashList($args);
40 
41  // for no text comment language and for document manange language
42  $oCommentModel = getModel('comment');
43  $oDocumentModel = getModel('document');
44 
45  Context::set('trash_list', $output->data);
46  Context::set('total_count', $output->total_count);
47  Context::set('total_page', $output->total_page);
48  Context::set('page', $output->page);
49  Context::set('page_navigation', $output->page_navigation);
50 
51  $oModuleModel = getModel('module');
52  $module_list = array();
53  $mod_srls = array();
54  foreach($output->data as $oTrashVO)
55  {
56  $mod_srls[] = $oTrashVO->unserializedObject['module_srl'];
57  }
58  $mod_srls = array_unique($mod_srls);
59  // Module List
60  $mod_srls_count = count($mod_srls);
61  if($mod_srls_count)
62  {
63  $columnList = array('module_srl', 'mid', 'browser_title');
64  $module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
65  if($module_output && is_array($module_output))
66  {
67  foreach($module_output as $module)
68  {
69  $module_list[$module->module_srl] = $module;
70  }
71  }
72  }
73 
74  Context::set('module_list', $module_list);
75 
76  // 템플릿 파일 지정
77  $this->setTemplateFile('trash_list');
78  }
79 
80 
81 
82  // Trash View - sejin7940
83  function dispTrashAdminView()
84  {
85  $trash_srl = Context::get('trash_srl');
86 
87  $oTrashModel = getModel('trash');
88  $output = $oTrashModel->getTrash($trash_srl);
89  if(!$output->data->getTrashSrl()) return new BaseObject(-1, 'msg_invalid_request');
90 
91  $originObject = unserialize($output->data->getSerializedObject());
92  if(is_array($originObject)) $originObject = (object)$originObject;
93 
94  Context::set('oTrashVO',$output->data);
95  Context::set('oOrigin',$originObject);
96 
97  $oMemberModel = &getModel('member');
98  $remover_info = $oMemberModel->getMemberInfoByMemberSrl($output->data->getRemoverSrl());
99  Context::set('remover_info', $remover_info);
100 
101  $oModuleModel = &getModel('module');
102  $module_info = $oModuleModel->getModuleInfoByModuleSrl($originObject->module_srl);
103  Context::set('module_info', $module_info);
104 
105  if($originObject) {
106  $args_extra->module_srl = $originObject->module_srl;
107  $args_extra->document_srl = $originObject->document_srl;
108  $output_extra = executeQueryArray('trash.getDocumentExtraVars', $args_extra);
109  Context::set('oOriginExtraVars',$output_extra->data);
110  }
111  $this->setTemplateFile('trash_view');
112  }
113 
114 }
115 /* End of file trash.admin.view.php */
116 /* Location: ./modules/trash/trash.admin.view.php */
setTemplateFile($filename)
$oModuleModel
Definition: ko.install.php:236
$template_path
a path of directory where template files reside
$output
Definition: ko.install.php:193
set($key, $val, $set_to_get_vars=0)
$args
Definition: ko.install.php:185
$module_info
an object containing the module information
$oDocumentModel
Definition: ko.install.php:259
getModel($module_name)
Definition: func.inc.php:145
executeQueryArray($query_id, $args=NULL, $arg_columns=NULL)
Definition: func.inc.php:219
$module
Class name of Xe Module that is identified by mid.