mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@21 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7c8fc30c8c
commit
ef0f13e800
3 changed files with 123 additions and 106 deletions
147
admin.php
147
admin.php
|
|
@ -1,83 +1,82 @@
|
|||
<?php
|
||||
/**
|
||||
* @file ./admin.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 관리자 페이지
|
||||
* 추가되는 모듈의 관리를 위해 소스코드의 변경을 피하기 위해
|
||||
* 관리자 페이지는 각 모듈의 admin action을 호출하여 구성을 한다.
|
||||
**/
|
||||
/**
|
||||
* @file ./admin.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 관리자 페이지
|
||||
*
|
||||
* 추가되는 모듈의 관리를 위해 소스코드의 변경을 피하기 위해\n
|
||||
* 관리자 페이지는 각 모듈의 admin action을 호출하여 구성을 한다.
|
||||
**/
|
||||
|
||||
/**
|
||||
* @brief 필요한 설정 파일들을 include
|
||||
**/
|
||||
require_once("./config/config.inc.php");
|
||||
/**
|
||||
* @brief 필요한 설정 파일들을 include
|
||||
**/
|
||||
require_once("./config/config.inc.php");
|
||||
|
||||
/**
|
||||
* @brief Context 객체를 생성하여 초기화\n
|
||||
* 모든 Request Argument/ 환경변수등을 세팅
|
||||
**/
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->init();
|
||||
/**
|
||||
* @brief Context 객체를 생성하여 초기화\n
|
||||
* 모든 Request Argument/ 환경변수등을 세팅
|
||||
**/
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->init();
|
||||
|
||||
/**
|
||||
* @brief 설치가 안되어 있다면 index.php로 이동
|
||||
* ModuleHandler를 이용하지 않기에 별도로 체크를 해주어야 함
|
||||
**/
|
||||
if(!Context::isInstalled()) {
|
||||
header("location:./index.php");
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자페이지에서 모듈의 선택은 sid로 한다.
|
||||
**/
|
||||
$sid = Context::get('sid');
|
||||
if($sid) {
|
||||
$oModule = module_manager::getAdminModuleObject($sid);
|
||||
if(!$oModule) {
|
||||
$sid = null;
|
||||
Context::set('sid',$sid);
|
||||
unset($oModule);
|
||||
/**
|
||||
* @brief 설치가 안되어 있다면 index.php로 이동
|
||||
* ModuleHandler를 이용하지 않기에 별도로 체크를 해주어야 함
|
||||
**/
|
||||
if(!Context::isInstalled()) {
|
||||
header("location:./index.php");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자(admin) 모듈 객체 생성
|
||||
**/
|
||||
$oAdmin = getModule('admin');
|
||||
$oAdmin->moduleInit(null);
|
||||
|
||||
/**
|
||||
* @brief 역시 ModuleHandler를 이용하지 않기에 직접 act 검사
|
||||
**/
|
||||
$act = Context::get('act');
|
||||
if(!$sid&&!$oAdmin->isExistsAct($act)) $act = 'dispAdminIndex';
|
||||
|
||||
/**
|
||||
* @brief 관리자 모듈의 실행 결과가 있으면 해당 실행결과를 출력
|
||||
**/
|
||||
if($oAdmin->proc($act)) {
|
||||
|
||||
$oModule = &$oAdmin;
|
||||
|
||||
/**
|
||||
* @brief 관리자 모듈의 실행 결과가 없으면 호출된 다른 모듈의 관리자를 확인
|
||||
**/
|
||||
} else {
|
||||
$oModule = module_manager::getAdminModuleObject($sid);
|
||||
if($oModule) {
|
||||
$oModule->moduleInit(null);
|
||||
$oModule->proc();
|
||||
|
||||
// 관리자용 레이아웃으로 변경
|
||||
$oModule->setLayoutPath($oAdmin->getLayoutPath());
|
||||
$oModule->setLayoutTpl($oAdmin->getLayoutTpl());
|
||||
/**
|
||||
* @brief 관리자페이지에서 모듈의 선택은 sid로 한다.
|
||||
**/
|
||||
$sid = Context::get('sid');
|
||||
if($sid) {
|
||||
$oModule = module_manager::getAdminModuleObject($sid);
|
||||
if(!$oModule) {
|
||||
$sid = null;
|
||||
Context::set('sid',$sid);
|
||||
unset($oModule);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DisplayHandler 객체를 생성하여 모듈의 처리 결과를 출력
|
||||
**/
|
||||
$oDisplayHandler = new DisplayHandler();
|
||||
$oDisplayHandler->printContent($oModule);
|
||||
/**
|
||||
* @brief 관리자(admin) 모듈 객체 생성
|
||||
**/
|
||||
$oAdmin = getModule('admin');
|
||||
$oAdmin->moduleInit(null);
|
||||
|
||||
/**
|
||||
* @brief 역시 ModuleHandler를 이용하지 않기에 직접 act 검사
|
||||
**/
|
||||
$act = Context::get('act');
|
||||
if(!$sid&&!$oAdmin->isExistsAct($act)) $act = 'dispAdminIndex';
|
||||
|
||||
/**
|
||||
* @brief 관리자 모듈의 실행 결과가 있으면 해당 실행결과를 출력
|
||||
**/
|
||||
if($oAdmin->proc($act)) {
|
||||
$oModule = &$oAdmin;
|
||||
/**
|
||||
* @brief 관리자 모듈의 실행 결과가 없으면 호출된 다른 모듈의 관리자를 확인
|
||||
**/
|
||||
} else {
|
||||
$oModule = module_manager::getAdminModuleObject($sid);
|
||||
if($oModule) {
|
||||
$oModule->moduleInit(null);
|
||||
$oModule->proc();
|
||||
|
||||
// 관리자용 레이아웃으로 변경
|
||||
$oModule->setLayoutPath($oAdmin->getLayoutPath());
|
||||
$oModule->setLayoutTpl($oAdmin->getLayoutTpl());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DisplayHandler 객체를 생성하여 모듈의 처리 결과를 출력
|
||||
**/
|
||||
$oDisplayHandler = new DisplayHandler();
|
||||
$oDisplayHandler->printContent($oModule);
|
||||
?>
|
||||
|
|
|
|||
41
rss.php
41
rss.php
|
|
@ -1,22 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* @file : rss.php
|
||||
* @author : zero <zero@nzeo.com>
|
||||
* @desc : rss를 출력하기 위한 파일. index.php와 거의 동일하나 act를 dispRss 로 고정시키는 것만 다름
|
||||
**/
|
||||
/**
|
||||
* @file ./rss.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief rss를 출력하기 위한 파일. index.php와 거의 동일하나 act를 dispRss 로 고정시키는 것만 다름
|
||||
**/
|
||||
|
||||
// 필요한 설정 파일들을 include
|
||||
require_once("./config/config.inc.php");
|
||||
/**
|
||||
* @brief 필요한 설정 파일들을 includ
|
||||
**/
|
||||
require_once("./config/config.inc.php");
|
||||
|
||||
// Request Method와 설정값들을 세팅
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->init();
|
||||
/**
|
||||
* @brief Request Method와 설정값들을 세팅
|
||||
**/
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->init();
|
||||
|
||||
// act값을 dispRss로 강제 설정
|
||||
// 각 모듈마다 dispRss가 필수적으로 있어야 함
|
||||
Context::set('act', 'dispRss');
|
||||
/**
|
||||
* @brief act값을 dispRss로 강제 설정
|
||||
*
|
||||
* 각 모듈마다 dispRss가 필수적으로 있어야 함
|
||||
**/
|
||||
Context::set('act', 'dispRss');
|
||||
|
||||
// ModuleHandler 호출하여 content 출력
|
||||
$oModuleHandler = new ModuleHandler();
|
||||
$oModule = $oModuleHandler->proc();
|
||||
/**
|
||||
* @brief ModuleHandler 호출하여 content 출력
|
||||
**/
|
||||
$oModuleHandler = new ModuleHandler();
|
||||
$oModule = $oModuleHandler->proc();
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* @file : trackback.php
|
||||
* @author : zero <zero@nzeo.com>
|
||||
* @desc : 트랙백을 받기 위한 파일. 파일이름때문에.. index.php와 거의 동일하나 act를 procReceiveTrackback로 고정
|
||||
**/
|
||||
/**
|
||||
* @file ./trackback.php
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief 트랙백을 받기 위한 파일. 파일이름때문에.. index.php와 거의 동일하나 act를 procReceiveTrackback로 고정
|
||||
**/
|
||||
|
||||
// 필요한 설정 파일들을 include
|
||||
require_once("./config/config.inc.php");
|
||||
/**
|
||||
* @brief 필요한 설정 파일들을 include
|
||||
**/
|
||||
require_once("./config/config.inc.php");
|
||||
|
||||
// Request Method와 설정값들을 세팅
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->init();
|
||||
/**
|
||||
* @brief Request Method와 설정값들을 세팅
|
||||
**/
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->init();
|
||||
|
||||
// act값을 procReceiveTrackback로 강제 설정
|
||||
// 각 모듈마다 procReceiveTrackback가 필수적으로 있어야 함
|
||||
Context::set('act', 'procReceiveTrackback');
|
||||
/**
|
||||
* @brief act값을 procReceiveTrackback로 강제 설정
|
||||
*
|
||||
* 각 모듈마다 procReceiveTrackback가 필수적으로 있어야 함
|
||||
**/
|
||||
Context::set('act', 'procReceiveTrackback');
|
||||
|
||||
// ModuleHandler 호출하여 content 출력
|
||||
$oModuleHandler = new ModuleHandler();
|
||||
$oModule = $oModuleHandler->proc();
|
||||
/**
|
||||
* @brief ModuleHandler 호출하여 content 출력
|
||||
**/
|
||||
$oModuleHandler = new ModuleHandler();
|
||||
$oModule = $oModuleHandler->proc();
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue