mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 03:09:55 +09:00
planet Package Module 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4874 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
83ab586a60
commit
b3179d58d0
217 changed files with 12581 additions and 0 deletions
111
modules/planet/planet.admin.view.php
Normal file
111
modules/planet/planet.admin.view.php
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
/**
|
||||
* @class planetAdminView
|
||||
* @author sol (sol@ngleader.com)
|
||||
* @brief planet 모듈의 admin view class
|
||||
**/
|
||||
|
||||
class planetAdminView extends planet {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$this->config = $oPlanetModel->getPlanetConfig();
|
||||
Context::set('config',$this->config);
|
||||
$oPlanetModel->isAccessGranted();
|
||||
|
||||
$this->setTemplatePath($this->module_path."/tpl/");
|
||||
$template_path = sprintf("%stpl/",$this->module_path);
|
||||
$this->setTemplatePath($template_path);
|
||||
}
|
||||
|
||||
function dispPlanetAdminSetup() {
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins($this->module_path);
|
||||
Context::set('skin_list',$skin_list);
|
||||
|
||||
$grant_list = $this->xml_info->grant;
|
||||
Context::set('grant_list', $grant_list);
|
||||
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_list = $oMemberModel->getGroups();
|
||||
Context::set('group_list', $group_list);
|
||||
if(is_array($this->config->tagtab)) Context::set('tagtab', join(',',$this->config->tagtab));
|
||||
if(is_array($this->config->smstag)) Context::set('smstag', join(',',$this->config->smstag));
|
||||
|
||||
|
||||
$this->setTemplateFile('setup');
|
||||
}
|
||||
|
||||
function dispPlanetAdminList() {
|
||||
|
||||
$page = Context::get('page');
|
||||
if(!$page) $page = 1;
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$output = $oPlanetModel->getPlanetList(20, $page, 'regdate');
|
||||
|
||||
Context::set('planet_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$this->setTemplateFile('list');
|
||||
}
|
||||
|
||||
function dispPlanetAdminInsert() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
if($module_srl) {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
Context::set('planet', $oPlanetModel->getPlanet($module_srl));
|
||||
}
|
||||
|
||||
$this->setTemplateFile('insert');
|
||||
}
|
||||
|
||||
function dispPlanetAdminDelete() {
|
||||
if(!Context::get('module_srl')) return $this->dispPlanetAdminList();
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$oPlanet = $oPlanetModel->getPlanet($module_srl);
|
||||
$planet_info = $oPlanet->getObjectVars();
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_count = $oDocumentModel->getDocumentCount($planet_info->module_srl);
|
||||
$planet_info->document_count = $document_count;
|
||||
|
||||
Context::set('planet_info',$planet_info);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('planet_delete');
|
||||
}
|
||||
|
||||
function dispPlanetAdminSkinInfo() {
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$config = $oPlanetModel->getPlanetConfig();
|
||||
$skin = $config->planet_default_skin;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin);
|
||||
|
||||
// skin_info에 extra_vars 값을 지정
|
||||
if(count($skin_info->extra_vars)) {
|
||||
foreach($skin_info->extra_vars as $key => $val) {
|
||||
$group = $val->group;
|
||||
$name = $val->name;
|
||||
$type = $val->type;
|
||||
$value = $config->{$name};
|
||||
if($type=="checkbox"&&!$value) $value = array();
|
||||
$skin_info->extra_vars[$key]->value= $value;
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('skin_info', $skin_info);
|
||||
$this->setTemplateFile('skin_info');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue