mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 14:19:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@674 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
403603ec0d
commit
3b980a8183
14 changed files with 132 additions and 401 deletions
|
|
@ -20,88 +20,46 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 목록 출력
|
||||
* @brief 페이지 관리 목록 보여줌
|
||||
**/
|
||||
function dispList() {
|
||||
$this->initAdmin();
|
||||
|
||||
// 목록 구현에 필요한 변수들을 가져온다
|
||||
$page_srl = Context::get('page_srl');
|
||||
$page = Context::get('page');
|
||||
function dispAdminContent() {
|
||||
// 등록된 page 모듈을 불러와 세팅
|
||||
$oDB = &DB::getInstance();
|
||||
$args->sort_index = "module_srl";
|
||||
$args->page = Context::get('page');
|
||||
$args->list_count = 40;
|
||||
$args->page_count = 10;
|
||||
$args->s_module_category_srl = Context::get('module_category_srl');
|
||||
$output = $oDB->executeQuery('pagemaker.getPageList', $args);
|
||||
|
||||
// document 객체를 생성. 기본 데이터 구조의 경우 document모듈만 쓰면 만사 해결.. -_-;
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl
|
||||
$args->page = $page; ///< 페이지
|
||||
$args->list_count = $this->list_count; ///< 한페이지에 보여줄 글 수
|
||||
$args->page_count = $this->page_count; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||
|
||||
$args->search_target = Context::get('search_target'); ///< 검색 대상 (title, contents...)
|
||||
$args->search_keyword = Context::get('search_keyword'); ///< 검색어
|
||||
if($this->module_info->use_category=='Y') $args->category_srl = Context::get('category'); ///< 카테고리 사용시 선택된 카테고리
|
||||
|
||||
$args->sort_index = 'list_order'; ///< 소팅 값
|
||||
|
||||
// 목록 구함, document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
||||
$output = $oDocumentModel->getDocumentList($args);
|
||||
|
||||
// 템플릿에 쓰기 위해서 document_model::getDocumentList() 의 return object에 있는 값들을 세팅
|
||||
// 템플릿에 쓰기 위해서 context::set
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('document_list', $output->data);
|
||||
Context::set('page_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
// 템플릿에서 사용할 검색옵션 세팅
|
||||
$count_search_option = count($this->search_option);
|
||||
for($i=0;$i<$count_search_option;$i++) {
|
||||
$search_option[$this->search_option[$i]] = Context::getLang($this->search_option[$i]);
|
||||
}
|
||||
Context::set('search_option', $search_option);
|
||||
|
||||
$this->setTemplateFile('list');
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 작성 화면 출력
|
||||
* @brief 페이지에 필요한 기본 설정들
|
||||
**/
|
||||
function dispWrite() {
|
||||
function dispAdminModuleConfig() {
|
||||
// 관리자 관련 정보 세팅
|
||||
$this->initAdmin();
|
||||
|
||||
// GET parameter에서 document_srl을 가져옴
|
||||
$document_srl = Context::get('document_srl');
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('page');
|
||||
Context::set('config',$config);
|
||||
|
||||
// document 모듈 객체 생성
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 지정된 글이 없다면 (신규) 새로운 번호를 만든다
|
||||
if($document_srl) {
|
||||
$document = $oDocumentModel->getDocument($document_srl, $this->grant->manager);
|
||||
if(!$document) {
|
||||
unset($document_srl);
|
||||
Context::set('document_srl','');
|
||||
}
|
||||
}
|
||||
|
||||
// 문서 번호가 없으면 새로운 값을 받아옴
|
||||
if(!$document_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$document_srl = $oDB->getNextSequence();
|
||||
}
|
||||
|
||||
Context::set('document_srl',$document_srl);
|
||||
Context::set('document', $document);
|
||||
|
||||
// 에디터 모듈의 getEditor를 호출하여 세팅
|
||||
$oEditorView = &getView('editor');
|
||||
$editor = $oEditorView->getEditor($document_srl, true);
|
||||
Context::set('editor', $editor);
|
||||
|
||||
$this->setTemplateFile('write_form');
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('page_config');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue