git-svn-id: http://xe-core.googlecode.com/svn/trunk@163 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-02-23 03:29:12 +00:00
parent ad4cfd30f4
commit cac2d957b2
6 changed files with 41 additions and 11 deletions

View file

@ -12,6 +12,15 @@
function init() {
}
/**
* @brief admin 모듈내에서 다른 모듈을 실행하는 부분
**/
function procOtherModule($module, $act) {
$oModuleHandler = new ModuleHandler($module, $act);
$oModule = &$oModuleHandler->procModule();
return $oModule;
}
/**
* @brief 로그인 시킴
**/

View file

@ -36,7 +36,24 @@
* @brief 관리자 메인 페이지 출력
**/
function dispIndex() {
$this->setTemplateFile('index');
// mo(module), act 변수값이 넘어오면 해당 모듈을 실행
$mo = Context::get('mo');
$act = Context::get('act');
if($mo && $mo != 'admin' && $act) {
$oAdminController = &getController('admin');
$oModule = &$oAdminController->procOtherModule($mo, $act);
}
// 만약 oModule이 없으면 관리자 초기 페이지 출력
if(!$oModule || !is_object($oModule)) {
$this->setTemplateFile('index');
// oModule이 정상이라면 해당 모듈의 template path, file을 가로챔
} else {
$this->setTemplatePath($oModule->getTemplatePath());
$this->setTemplateFile($oModule->getTemplateFile());
}
}
/**

View file

@ -11,7 +11,7 @@
<tr>
<td rowspan="2">
<!--@if($val->admin_index_act)-->
<a href="#" onclick="location.href='{getUrl('mo',$val->module,'ac',$val->admin_index_act)}'">{$val->title}</a> <br /> ({$val->module})
<a href="#" onclick="location.href='{getUrl('mo',$val->module,'act',$val->admin_index_act)}'">{$val->title}</a> <br /> ({$val->module})
<!--@else-->
{$val->title} <br />
({$val->module})