mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@155 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
856666328b
commit
ad1dc08f0b
5 changed files with 36 additions and 24 deletions
|
|
@ -77,7 +77,6 @@
|
|||
|
||||
// mid값이 있을 경우 mid값을 세팅
|
||||
if($this->mid) Context::set('mid', $this->mid, true);
|
||||
//if($this->module) Context::set('module', $this->module, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -97,57 +96,66 @@
|
|||
if(!$this->act || !$xml_info->action->{$this->act}) $this->act = $xml_info->default_action;
|
||||
|
||||
// 설정된 mid가 없을 경우 요청된 act의 standalone 여부 체크
|
||||
if(!$this->mid && !$xml_info->action->{$this->act}->standalone) return $this->error = 'msg_module_is_not_standalone';
|
||||
if(!$this->mid && !$xml_info->action->{$this->act}->standalone) {
|
||||
$this->error = 'msg_module_is_not_standalone';
|
||||
return;
|
||||
}
|
||||
|
||||
// type, grant 값 구함
|
||||
$type = $xml_info->action->{$this->act}->type;
|
||||
$grant = $xml_info->action->{$this->act}->grant;
|
||||
|
||||
// 모듈 객체 생성
|
||||
$this->oModule = &$this->getModuleInstance($this->module, $type);
|
||||
if(!is_object($this->oModule)) return $this->error = 'msg_module_is_not_exists';
|
||||
$oModule = &$this->getModuleInstance($this->module, $type);
|
||||
if(!is_object($oModule)) {
|
||||
$this->error = 'msg_module_is_not_exists';
|
||||
return;
|
||||
}
|
||||
|
||||
// 모듈에 act값을 세팅
|
||||
$this->oModule->setAct($this->act);
|
||||
$oModule->setAct($this->act);
|
||||
|
||||
// 모듈 정보 세팅
|
||||
$this->oModule->setModuleInfo($this->module_info, $xml_info);
|
||||
$oModule->setModuleInfo($this->module_info, $xml_info);
|
||||
|
||||
// 모듈을 수행하고 결과가 false이면 message 모듈 호출 지정
|
||||
if(!$this->oModule->proc()) $this->error = $this->oModule->getMessage();
|
||||
if(!$oModule->proc()) $this->error = $oModule->getMessage();
|
||||
|
||||
return $oModule;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ 실행된 모듈의 컨텐츠를 출력
|
||||
**/
|
||||
function displayContent() {
|
||||
function displayContent(&$oModule = NULL) {
|
||||
// 설정된 모듈이 정상이지 않을 경우 message 모듈 객체 생성
|
||||
if(!$this->oModule || !is_object($this->oModule)) {
|
||||
if(!$oModule || !is_object($oModule)) {
|
||||
$this->error = 'msg_module_is_not_exists';
|
||||
}
|
||||
|
||||
// 에러가 발생하였을시 처리
|
||||
if($this->error) {
|
||||
// message 모듈 객체를 생성해서 컨텐츠 생성
|
||||
$oModule = &getView('message');
|
||||
$oModule->setError(-1);
|
||||
$oModule->setMessage($this->error);
|
||||
$oModule->dispContent();
|
||||
$oMessageView = &getView('message');
|
||||
$oMessageView->setError(-1);
|
||||
$oMessageView->setMessage($this->error);
|
||||
$oMessageView->dispContent();
|
||||
|
||||
// 정상적으로 호출된 객체가 있을 경우 해당 객체의 template를 변경
|
||||
if($this->oModule) {
|
||||
$this->oModule->setTemplatePath($oModule->getTemplatePath());
|
||||
$this->oModule->setTemplateFile($oModule->getTemplateFile());
|
||||
if($oModule) {
|
||||
$oModule->setTemplatePath($oMessageView->getTemplatePath());
|
||||
$oModule->setTemplateFile($oMessageView->getTemplateFile());
|
||||
|
||||
// 그렇지 않으면 message 객체를 호출된 객체로 지정
|
||||
} else {
|
||||
$this->oModule = $oModule;
|
||||
$oModule = $oMessageView;
|
||||
}
|
||||
}
|
||||
|
||||
// 컨텐츠 출력
|
||||
$oDisplayHandler = new DisplayHandler();
|
||||
$oDisplayHandler->printContent($this->oModule);
|
||||
|
||||
$oDisplayHandler->printContent($oModule);
|
||||
|
||||
// DB 및 기타 자원의 종결 처리
|
||||
Context::close();
|
||||
|
|
|
|||
|
|
@ -41,6 +41,6 @@
|
|||
**/
|
||||
$oModuleHandler = new ModuleHandler();
|
||||
$oModuleHandler->init();
|
||||
$oModuleHandler->procModule();
|
||||
$oModuleHandler->displayContent();
|
||||
$oModule = &$oModuleHandler->procModule();
|
||||
$oModuleHandler->displayContent($oModule);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
if(!$oMemberModel->isLogged()) return $this->act = 'dispLogin';
|
||||
|
||||
// 로그인되었는데 관리자(member->is_admin!=1)가 아니면 오류 표시
|
||||
if($logged_info->is_admin != 'Y') return $this->dispMessage('msg_is_not_administrator');
|
||||
if($logged_info->is_admin != 'Y') return $this->stop('msg_is_not_administrator');
|
||||
|
||||
// 관리자 모듈 목록을 세팅
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -48,8 +48,10 @@
|
|||
$oModule = &$oModuleHandler->procModule();
|
||||
|
||||
// 내용을 요청받은 모듈의 것으로 변경
|
||||
$this->setTemplatePath($oModule->getTemplatePath());
|
||||
$this->setTemplateFile($oModule->getTemplateFile());
|
||||
if($oModule) {
|
||||
$this->setTemplatePath($oModule->getTemplatePath());
|
||||
$this->setTemplateFile($oModule->getTemplateFile());
|
||||
}
|
||||
|
||||
// 없으면 관리자 메인 페이지 출력
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -9,9 +9,11 @@
|
|||
</div>
|
||||
<div id="admin_module_list">
|
||||
<!--@foreach($module_list as $module_item)-->
|
||||
<!--@if($module_item->module != $module)-->
|
||||
<div <!--@if($module_item->module==$sid)-->style="font-weight:bold;"<!--@end-->>
|
||||
<a href="{getUrl('sid',$module_item->module,'act','','module_srl','','page','')}">{$module_item->title}</a>
|
||||
</div>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</div>
|
||||
<div id="admin_module_content">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
$this->setTemplatePath($this->module_path."tpl");
|
||||
|
||||
// 설치가 되어 있으면 오류
|
||||
if(Context::isInstalled()) return $this->dispMessage('msg_already_installed');
|
||||
if(Context::isInstalled()) return $this->stop('msg_already_installed');
|
||||
|
||||
// 컨트롤러 생성
|
||||
$oController = &getController('install');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue