mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1225 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f6c7d16706
commit
568ed4f087
6 changed files with 92 additions and 352 deletions
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* @class board
|
||||
* @class blog
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief board 모듈의 high class
|
||||
* @brief blog 모듈의 high class
|
||||
**/
|
||||
|
||||
class board extends ModuleObject {
|
||||
class blog extends ModuleObject {
|
||||
|
||||
var $search_option = array('title','content','title_content','user_name','user_id','tag'); ///< 검색 옵션
|
||||
|
||||
|
|
@ -22,20 +22,15 @@
|
|||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('board', 'view', 'dispBoardAdminContent');
|
||||
$oModuleController->insertActionForward('board', 'view', 'dispBoardAdminModuleConfig');
|
||||
$oModuleController->insertActionForward('board', 'view', 'dispBoardAdminBoardInfo');
|
||||
$oModuleController->insertActionForward('board', 'view', 'dispBoardAdminInsertBoard');
|
||||
$oModuleController->insertActionForward('board', 'view', 'dispBoardAdminDeleteBoard');
|
||||
$oModuleController->insertActionForward('board', 'view', 'dispBoardAdminSkinInfo');
|
||||
$oModuleController->insertActionForward('board', 'view', 'dispBoardAdminCategoryInfo');
|
||||
$oModuleController->insertActionForward('board', 'view', 'dispBoardAdminGrantInfo');
|
||||
//$oModuleController->insertActionForward('board', 'controller', 'procBoardAdminInsertGrant');
|
||||
$oModuleController->insertActionForward('board', 'controller', 'procBoardAdminUpdateSkinInfo');
|
||||
//$oModuleController->insertActionForward('board', 'controller', 'procBoardAdminDeleteBoard');
|
||||
//$oModuleController->insertActionForward('board', 'controller', 'procBoardAdminInsertCategory');
|
||||
//$oModuleController->insertActionForward('board', 'controller', 'procBoardAdminUpdateCategory');
|
||||
//$oModuleController->insertActionForward('board', 'controller', 'procBoardAdminInsertConfig');
|
||||
$oModuleController->insertActionForward('blog', 'view', 'dispBlogAdminContent');
|
||||
$oModuleController->insertActionForward('blog', 'view', 'dispBlogAdminModuleConfig');
|
||||
$oModuleController->insertActionForward('blog', 'view', 'dispBlogAdminBlogInfo');
|
||||
$oModuleController->insertActionForward('blog', 'view', 'dispBlogAdminInsertBlog');
|
||||
$oModuleController->insertActionForward('blog', 'view', 'dispBlogAdminDeleteBlog');
|
||||
$oModuleController->insertActionForward('blog', 'view', 'dispBlogAdminSkinInfo');
|
||||
$oModuleController->insertActionForward('blog', 'view', 'dispBlogAdminCategoryInfo');
|
||||
$oModuleController->insertActionForward('blog', 'view', 'dispBlogAdminGrantInfo');
|
||||
$oModuleController->insertActionForward('blog', 'controller', 'procBlogAdminUpdateSkinInfo');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* @class boardController
|
||||
* @class blogController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief board 모듈의 Controller class
|
||||
* @brief blog 모듈의 Controller class
|
||||
**/
|
||||
|
||||
class boardController extends board {
|
||||
class blogController extends blog {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
/**
|
||||
* @brief 문서 입력
|
||||
**/
|
||||
function procBoardInsertDocument() {
|
||||
function procBlogInsertDocument() {
|
||||
// 글작성시 필요한 변수를 세팅
|
||||
$obj = Context::getRequestVars();
|
||||
$obj->module_srl = $this->module_srl;
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
/**
|
||||
* @brief 문서 삭제
|
||||
**/
|
||||
function procBoardDeleteDocument() {
|
||||
function procBlogDeleteDocument() {
|
||||
// 문서 번호 확인
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
||||
|
|
@ -85,21 +85,10 @@
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 추천
|
||||
**/
|
||||
function procBoardVoteDocument() {
|
||||
// document module controller 객체 생성
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
$document_srl = Context::get('document_srl');
|
||||
return $oDocumentController->updateVotedCount($document_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 코멘트 추가
|
||||
**/
|
||||
function procBoardInsertComment() {
|
||||
function procBlogInsertComment() {
|
||||
// 댓글 입력에 필요한 데이터 추출
|
||||
$obj = Context::gets('document_srl','comment_srl','parent_srl','content','password','nick_name','nick_name','member_srl','email_address','homepage');
|
||||
$obj->module_srl = $this->module_srl;
|
||||
|
|
@ -146,7 +135,7 @@
|
|||
/**
|
||||
* @brief 코멘트 삭제
|
||||
**/
|
||||
function procBoardDeleteComment() {
|
||||
function procBlogDeleteComment() {
|
||||
// 댓글 번호 확인
|
||||
$comment_srl = Context::get('comment_srl');
|
||||
if(!$comment_srl) return $this->doError('msg_invalid_request');
|
||||
|
|
@ -166,7 +155,7 @@
|
|||
/**
|
||||
* @brief 엮인글 삭제
|
||||
**/
|
||||
function procBoardDeleteTrackback() {
|
||||
function procBlogDeleteTrackback() {
|
||||
$trackback_srl = Context::get('trackback_srl');
|
||||
|
||||
// trackback module의 controller 객체 생성
|
||||
|
|
@ -183,7 +172,7 @@
|
|||
/**
|
||||
* @brief 문서와 댓글의 비밀번호를 확인
|
||||
**/
|
||||
function procBoardVerificationPassword() {
|
||||
function procBlogVerificationPassword() {
|
||||
// 비밀번호와 문서 번호를 받음
|
||||
$password = md5(Context::get('password'));
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
|
@ -217,64 +206,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자가 글 선택시 세션에 담음
|
||||
**/
|
||||
function procBoardAdminAddCart() {
|
||||
$document_srl = Context::get('srl');
|
||||
$check_flag = Context::get('check_flag');
|
||||
if(!$document_srl || !in_array($check_flag, array('add','remove'))) return;
|
||||
|
||||
$flag_list = $_SESSION['document_management'][$this->module_srl];
|
||||
|
||||
if($check_flag == 'remove') unset($flag_list[$document_srl]);
|
||||
else $flag_list[$document_srl] = true;
|
||||
|
||||
$_SESSION['document_management'][$this->module_srl] = $flag_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 세션에 담긴 선택글의 이동/ 삭제
|
||||
**/
|
||||
function procBoardAdminManageCheckedDocument() {
|
||||
$type = Context::get('type');
|
||||
$module_srl = Context::get('target_board');
|
||||
$flag_list = $_SESSION['document_management'][$this->module_srl];
|
||||
|
||||
$document_srl_list = array_keys($flag_list);
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$document_srl_count = count($document_srl_list);
|
||||
|
||||
if($type == 'move') {
|
||||
if(!$module_srl) return new Object(-1, 'fail_to_move');
|
||||
else {
|
||||
$output = $oDocumentController->moveDocumentModule($document_srl_list, $module_srl, $this->module_srl);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_move');
|
||||
$msg_code = 'success_moved';
|
||||
$_SESSION['document_management'][$this->module_srl] = null;
|
||||
}
|
||||
|
||||
} elseif($type =='delete') {
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
for($i=0;$i<$document_srl_count;$i++) {
|
||||
$document_srl = $document_srl_list[$i];
|
||||
$output = $oDocumentController->deleteDocument($document_srl, true);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_delete');
|
||||
}
|
||||
$oDB->commit();
|
||||
$msg_code = 'success_deleted';
|
||||
$_SESSION['document_management'][$this->module_srl] = null;
|
||||
}
|
||||
|
||||
$this->setMessage($msg_code);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 권한 추가
|
||||
**/
|
||||
function procBoardAdminInsertGrant() {
|
||||
function procBlogAdminInsertGrant() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// 현 모듈의 권한 목록을 가져옴
|
||||
|
|
@ -298,7 +233,7 @@
|
|||
/**
|
||||
* @brief 스킨 정보 업데이트
|
||||
**/
|
||||
function procBoardAdminUpdateSkinInfo() {
|
||||
function procBlogAdminUpdateSkinInfo() {
|
||||
// module_srl에 해당하는 정보들을 가져오기
|
||||
$module_srl = Context::get('module_srl');
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -378,14 +313,14 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 게시판 추가
|
||||
* @brief 블로그 추가
|
||||
**/
|
||||
function procBoardAdminInsertBoard() {
|
||||
function procBlogAdminInsertBlog() {
|
||||
// 일단 입력된 값들을 모두 받아서 db 입력항목과 그외 것으로 분리
|
||||
$args = Context::gets('module_srl','module_category_srl','board_name','skin','browser_title','description','is_default','header_text','footer_text','admin_id');
|
||||
$args->module = 'board';
|
||||
$args->mid = $args->board_name;
|
||||
unset($args->board_name);
|
||||
$args = Context::gets('module_srl','module_category_srl','blog_name','skin','browser_title','description','is_default','header_text','footer_text','admin_id');
|
||||
$args->module = 'blog';
|
||||
$args->mid = $args->blog_name;
|
||||
unset($args->blog_name);
|
||||
if($args->is_default!='Y') $args->is_default = 'N';
|
||||
|
||||
// 기본 값외의 것들을 정리
|
||||
|
|
@ -394,7 +329,7 @@
|
|||
unset($extra_var->mo);
|
||||
unset($extra_var->act);
|
||||
unset($extra_var->page);
|
||||
unset($extra_var->board_name);
|
||||
unset($extra_var->blog_name);
|
||||
|
||||
// module_srl이 넘어오면 원 모듈이 있는지 확인
|
||||
if($args->module_srl) {
|
||||
|
|
@ -431,9 +366,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 게시판 삭제
|
||||
* @brief 블로그 삭제
|
||||
**/
|
||||
function procBoardAdminDeleteBoard() {
|
||||
function procBlogAdminDeleteBlog() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// 원본을 구해온다
|
||||
|
|
@ -441,7 +376,7 @@
|
|||
$output = $oModuleController->deleteModule($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->add('module','board');
|
||||
$this->add('module','blog');
|
||||
$this->add('page',Context::get('page'));
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
|
@ -449,7 +384,7 @@
|
|||
/**
|
||||
* @brief 카테고리 추가
|
||||
**/
|
||||
function procBoardAdminInsertCategory() {
|
||||
function procBlogAdminInsertCategory() {
|
||||
// 일단 입력된 값들을 모두 받아서 db 입력항목과 그외 것으로 분리
|
||||
$module_srl = Context::get('module_srl');
|
||||
$category_title = Context::get('category_title');
|
||||
|
|
@ -467,7 +402,7 @@
|
|||
/**
|
||||
* @brief 카테고리의 내용 수정
|
||||
**/
|
||||
function procBoardAdminUpdateCategory() {
|
||||
function procBlogAdminUpdateCategory() {
|
||||
$module_srl = Context::get('module_srl');
|
||||
$category_srl = Context::get('category_srl');
|
||||
$mode = Context::get('mode');
|
||||
|
|
@ -504,15 +439,15 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 게시판 기본 정보의 추가
|
||||
* @brief 블로그 기본 정보의 추가
|
||||
**/
|
||||
function procBoardAdminInsertConfig() {
|
||||
function procBlogAdminInsertConfig() {
|
||||
// 기본 정보를 받음
|
||||
$args = Context::gets('test');
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('board',$args);
|
||||
$output = $oModuleController->insertModuleConfig('blog',$args);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* @class boardView
|
||||
* @class blogView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief board 모듈의 View class
|
||||
* @brief blog 모듈의 View class
|
||||
**/
|
||||
|
||||
class boardView extends board {
|
||||
class blogView extends blog {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
*
|
||||
* board 모듈은 일반 사용과 관리자용으로 나누어진다.\n
|
||||
* blog 모듈은 일반 사용과 관리자용으로 나누어진다.\n
|
||||
**/
|
||||
function init() {
|
||||
if(substr_count($this->act, 'Admin')) $this->initAdmin();
|
||||
|
|
@ -47,13 +47,13 @@
|
|||
$module_category = $oModuleModel->getModuleCategories();
|
||||
Context::set('module_category', $module_category);
|
||||
|
||||
// 템플릿 경로 지정 (board의 경우 tpl에 관리자용 템플릿 모아놓음)
|
||||
// 템플릿 경로 지정 (blog의 경우 tpl에 관리자용 템플릿 모아놓음)
|
||||
$template_path = sprintf("%stpl/",$this->module_path);
|
||||
$this->setTemplatePath($template_path);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 일반 게시판 호출시에 관련 정보를 세팅해줌
|
||||
* @brief 일반 블로그 호출시에 관련 정보를 세팅해줌
|
||||
**/
|
||||
function initNormal() {
|
||||
// 카테고리를 사용하는지 확인후 사용시 카테고리 목록을 구해와서 Context에 세팅
|
||||
|
|
@ -77,15 +77,15 @@
|
|||
$this->setTemplatePath($template_path);
|
||||
|
||||
// rss url
|
||||
if($this->grant->view) Context::set('rss_url', getUrl('','mid',$this->mid,'act','dispBoardRss'));
|
||||
if($this->grant->view) Context::set('rss_url', getUrl('','mid',$this->mid,'act','dispBlogRss'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 목록 및 선택된 글 출력
|
||||
**/
|
||||
function dispBoardContent() {
|
||||
function dispBlogContent() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->list) return $this->dispBoardMessage('msg_not_permitted');
|
||||
if(!$this->grant->list) return $this->dispBlogMessage('msg_not_permitted');
|
||||
|
||||
// 목록 구현에 필요한 변수들을 가져온다
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
|
@ -167,9 +167,9 @@
|
|||
/**
|
||||
* @brief 글 작성 화면 출력
|
||||
**/
|
||||
function dispBoardWrite() {
|
||||
function dispBlogWrite() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->write_document) return $this->dispBoardMessage('msg_not_permitted');
|
||||
if(!$this->grant->write_document) return $this->dispBlogMessage('msg_not_permitted');
|
||||
|
||||
// GET parameter에서 document_srl을 가져옴
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
|
@ -205,9 +205,9 @@
|
|||
/**
|
||||
* @brief 문서 삭제 화면 출력
|
||||
**/
|
||||
function dispBoardDelete() {
|
||||
function dispBlogDelete() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->write_document) return $this->dispBoardMessage('msg_not_permitted');
|
||||
if(!$this->grant->write_document) return $this->dispBlogMessage('msg_not_permitted');
|
||||
|
||||
// 삭제할 문서번호를 가져온다
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
}
|
||||
|
||||
// 삭제하려는 글이 없으면 에러
|
||||
if(!$document) return $this->dispBoardContent();
|
||||
if(!$document) return $this->dispBlogContent();
|
||||
|
||||
// 권한이 없는 경우 비밀번호 입력화면으로
|
||||
if($document&&!$document->is_granted) return $this->setTemplateFile('input_password_form');
|
||||
|
|
@ -232,9 +232,9 @@
|
|||
/**
|
||||
* @brief 댓글의 답글 화면 출력
|
||||
**/
|
||||
function dispBoardReplyComment() {
|
||||
function dispBlogReplyComment() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
||||
if(!$this->grant->write_comment) return $this->dispBlogMessage('msg_not_permitted');
|
||||
|
||||
// 목록 구현에 필요한 변수들을 가져온다
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
|
@ -248,7 +248,7 @@
|
|||
$source_comment = $oCommentModel->getComment($parent_srl, $this->grant->manager);
|
||||
|
||||
// 댓글이 없다면 오류
|
||||
if(!$source_comment) return $this->dispBoardMessage('msg_invalid_request');
|
||||
if(!$source_comment) return $this->dispBlogMessage('msg_invalid_request');
|
||||
|
||||
// 필요한 정보들 세팅
|
||||
Context::set('document_srl',$document_srl);
|
||||
|
|
@ -265,9 +265,9 @@
|
|||
/**
|
||||
* @brief 댓글 수정 폼 출력
|
||||
**/
|
||||
function dispBoardModifyComment() {
|
||||
function dispBlogModifyComment() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
||||
if(!$this->grant->write_comment) return $this->dispBlogMessage('msg_not_permitted');
|
||||
|
||||
// 목록 구현에 필요한 변수들을 가져온다
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
|
@ -281,7 +281,7 @@
|
|||
$comment = $oCommentModel->getComment($comment_srl, $this->grant->manager);
|
||||
|
||||
// 댓글이 없다면 오류
|
||||
if(!$comment) return $this->dispBoardMessage('msg_invalid_request');
|
||||
if(!$comment) return $this->dispBlogMessage('msg_invalid_request');
|
||||
|
||||
// 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로
|
||||
if($comment_srl&&$comment&&!$comment->is_granted) return $this->setTemplateFile('input_password_form');
|
||||
|
|
@ -300,9 +300,9 @@
|
|||
/**
|
||||
* @brief 댓글 삭제 화면 출력
|
||||
**/
|
||||
function dispBoardDeleteComment() {
|
||||
function dispBlogDeleteComment() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
||||
if(!$this->grant->write_comment) return $this->dispBlogMessage('msg_not_permitted');
|
||||
|
||||
// 삭제할 댓글번호를 가져온다
|
||||
$comment_srl = Context::get('comment_srl');
|
||||
|
|
@ -314,7 +314,7 @@
|
|||
}
|
||||
|
||||
// 삭제하려는 글이 없으면 에러
|
||||
if(!$comment) return $this->dispBoardContent();
|
||||
if(!$comment) return $this->dispBlogContent();
|
||||
|
||||
// 권한이 없는 경우 비밀번호 입력화면으로
|
||||
if($comment_srl&&$comment&&!$comment->is_granted) return $this->setTemplateFile('input_password_form');
|
||||
|
|
@ -327,7 +327,7 @@
|
|||
/**
|
||||
* @brief 엮인글 삭제 화면 출력
|
||||
**/
|
||||
function dispBoardDeleteTrackback() {
|
||||
function dispBlogDeleteTrackback() {
|
||||
// 삭제할 댓글번호를 가져온다
|
||||
$trackback_srl = Context::get('trackback_srl');
|
||||
|
||||
|
|
@ -337,7 +337,7 @@
|
|||
$trackback = $output->data;
|
||||
|
||||
// 삭제하려는 글이 없으면 에러
|
||||
if(!$trackback) return $this->dispBoardContent();
|
||||
if(!$trackback) return $this->dispBlogContent();
|
||||
|
||||
Context::set('trackback',$trackback);
|
||||
|
||||
|
|
@ -347,7 +347,7 @@
|
|||
/**
|
||||
* @brief 메세지 출력
|
||||
**/
|
||||
function dispBoardMessage($msg_code) {
|
||||
function dispBlogMessage($msg_code) {
|
||||
$msg = Context::getLang($msg_code);
|
||||
if(!$msg) $msg = $msg_code;
|
||||
Context::set('message', $msg);
|
||||
|
|
@ -357,9 +357,9 @@
|
|||
/**
|
||||
* @brief RSS 출력
|
||||
**/
|
||||
function dispBoardRss() {
|
||||
function dispBlogRss() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->list) return $this->dispBoardMessage('msg_not_permitted');
|
||||
if(!$this->grant->list) return $this->dispBlogMessage('msg_not_permitted');
|
||||
|
||||
// 컨텐츠 추출
|
||||
$args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl
|
||||
|
|
@ -412,22 +412,22 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 게시판 관리 목록 보여줌
|
||||
* @brief 블로그 관리 목록 보여줌
|
||||
**/
|
||||
function dispBoardAdminContent() {
|
||||
// 등록된 board 모듈을 불러와 세팅
|
||||
function dispBlogAdminContent() {
|
||||
// 등록된 blog 모듈을 불러와 세팅
|
||||
$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 = executeQuery('board.getBoardList', $args);
|
||||
$output = executeQuery('blog.getBlogList', $args);
|
||||
|
||||
// 템플릿에 쓰기 위해서 context::set
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('board_list', $output->data);
|
||||
Context::set('blog_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
|
|
@ -435,26 +435,26 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 게시판에 필요한 기본 설정들
|
||||
* @brief 블로그에 필요한 기본 설정들
|
||||
**/
|
||||
function dispBoardAdminModuleConfig() {
|
||||
function dispBlogAdminModuleConfig() {
|
||||
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('board');
|
||||
$config = $oModuleModel->getModuleConfig('blog');
|
||||
Context::set('config',$config);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('board_config');
|
||||
$this->setTemplateFile('blog_config');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 선택된 게시판의 정보 출력
|
||||
* @brief 선택된 블로그의 정보 출력
|
||||
**/
|
||||
function dispBoardAdminBoardInfo() {
|
||||
function dispBlogAdminBlogInfo() {
|
||||
|
||||
// module_srl 값이 없다면 그냥 index 페이지를 보여줌
|
||||
if(!Context::get('module_srl')) return $this->dispBoardAdminContent();
|
||||
if(!Context::get('module_srl')) return $this->dispBlogAdminContent();
|
||||
|
||||
// 레이아웃이 정해져 있다면 레이아웃 정보를 추가해줌(layout_title, layout)
|
||||
if($this->module_info->layout_srl) {
|
||||
|
|
@ -472,13 +472,13 @@
|
|||
}
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('board_info');
|
||||
$this->setTemplateFile('blog_info');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 게시판 추가 폼 출력
|
||||
* @brief 블로그 추가 폼 출력
|
||||
**/
|
||||
function dispBoardAdminInsertBoard() {
|
||||
function dispBlogAdminInsertBlog() {
|
||||
|
||||
// 스킨 목록을 구해옴
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -486,15 +486,15 @@
|
|||
Context::set('skin_list',$skin_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('board_insert');
|
||||
$this->setTemplateFile('blog_insert');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 게시판 삭제 화면 출력
|
||||
* @brief 블로그 삭제 화면 출력
|
||||
**/
|
||||
function dispBoardAdminDeleteBoard() {
|
||||
function dispBlogAdminDeleteBlog() {
|
||||
|
||||
if(!Context::get('module_srl')) return $this->dispBoardAdminContent();
|
||||
if(!Context::get('module_srl')) return $this->dispBlogAdminContent();
|
||||
|
||||
$module_info = Context::get('module_info');
|
||||
|
||||
|
|
@ -505,13 +505,13 @@
|
|||
Context::set('module_info',$module_info);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('board_delete');
|
||||
$this->setTemplateFile('blog_delete');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스킨 정보 보여줌
|
||||
**/
|
||||
function dispBoardAdminSkinInfo() {
|
||||
function dispBlogAdminSkinInfo() {
|
||||
|
||||
// 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음
|
||||
$module_info = Context::get('module_info');
|
||||
|
|
@ -538,7 +538,7 @@
|
|||
/**
|
||||
* @brief 카테고리의 정보 출력
|
||||
**/
|
||||
function dispBoardAdminCategoryInfo() {
|
||||
function dispBlogAdminCategoryInfo() {
|
||||
|
||||
// module_srl을 구함
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
|
@ -570,7 +570,7 @@
|
|||
/**
|
||||
* @brief 권한 목록 출력
|
||||
**/
|
||||
function dispBoardAdminGrantInfo() {
|
||||
function dispBlogAdminGrantInfo() {
|
||||
// module_srl을 구함
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
|
|
@ -585,33 +585,5 @@
|
|||
|
||||
$this->setTemplateFile('grant_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 선택한 목록 출력
|
||||
**/
|
||||
function dispBoardAdminManageDocument() {
|
||||
// 선택한 목록을 세션에서 가져옴
|
||||
$flag_list = $_SESSION['document_management'][$this->module_srl];
|
||||
|
||||
// 목록이 있으면 게시글을 가져옴
|
||||
if(count($flag_list)) $document_srl_list = array_keys($flag_list);
|
||||
if(is_array($document_srl_list) && count($document_srl_list)) {
|
||||
$oDocumentModeul = &getModel('document');
|
||||
$document_list = $oDocumentModeul->getDocuments($document_srl_list, $this->grant->is_admin);
|
||||
Context::set('document_list', $document_list);
|
||||
}
|
||||
|
||||
// 게시판의 목록을 가져옴
|
||||
$output = executeQuery('board.getAllBoard', $args);
|
||||
$board_list = $output->data;
|
||||
if($board_list && !is_array($board_list)) $board_list = array($board_list);
|
||||
Context::set('board_list', $board_list);
|
||||
|
||||
// 팝업 레이아웃 선택
|
||||
$this->setLayoutPath('./common/tpl');
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
$this->setTemplateFile('checked_list');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -16,134 +16,13 @@
|
|||
</select>
|
||||
</form>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<!--@end-->
|
||||
|
||||
<!--@foreach($document_list as $no => $val)-->
|
||||
<!-- 글 내용 보여주기 -->
|
||||
<div>
|
||||
<table border="1" width="100%" style="table-layout:fixed">
|
||||
<col width="120" />
|
||||
<col width="*" />
|
||||
|
||||
<!--@if($category_list && $val->category_srl)-->
|
||||
<tr>
|
||||
<th>{$lang->category}</th>
|
||||
<td>{$category_list[$val->category_srl]->title}</td>
|
||||
</tr>
|
||||
<!--@foreach($document_list as $no => $document)-->
|
||||
<!--@if($document && $grant->view)-->
|
||||
<!--#include("./view_document.html")-->
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th>{$lang->title}</th>
|
||||
<td>{htmlspecialchars($val->title)}</td>
|
||||
</tr>
|
||||
<!--@if($val->homepage)-->
|
||||
<tr>
|
||||
<th>{$lang->homepage}</th>
|
||||
<td><a href="{$val->homepage}" onclick="winopen('{$val->homepage}'); return false;">{htmlspecialchars($val->homepage)}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<th>{$lang->date}</th>
|
||||
<td>{zdate($val->regdate,"Y-m-d H:i:s")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->writer}</th>
|
||||
<td><div class="member_{$val->member_srl}">{htmlspecialchars($val->nick_name)}</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->readed_count}</th>
|
||||
<td>{$val->readed_count}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->voted_count}</th>
|
||||
<td>{$val->voted_count}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->content}</th>
|
||||
<td height="100" valign="top">{$val->content}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->document_url}</th>
|
||||
<td>{getUrl()}{$val->document_srl}</td>
|
||||
</tr>
|
||||
|
||||
<!--@if($val->allow_trackback=='Y')-->
|
||||
<tr>
|
||||
<th>{$lang->trackback_url}</th>
|
||||
<td>{getUrl()}trackback/{$val->document_srl}</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($val->tag_list)-->
|
||||
<tr>
|
||||
<th>{$lang->tag}</th>
|
||||
<td>
|
||||
<!--@foreach($val->tag_list as $val)-->
|
||||
<a href="{getUrl('search_target','tag','search_keyword',$val,'document_srl','')}">{htmlspecialchars($val)}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($val->uploaded_count && $val->uploaded_list)-->
|
||||
<tr>
|
||||
<th>{$lang->uploaded_file}</th>
|
||||
<td>
|
||||
<!--@foreach($val->uploaded_list as $key => $file)-->
|
||||
<div><a href="{$file->download_url}">{$file->source_filename} ({FileHandler::filesize($file->file_size)})</a> ({number_format($file->download_count)})</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th>ipaddress</th>
|
||||
<td>{$val->ipaddress}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<!--@if($val->allow_comment=='Y')-->
|
||||
{$lang->allow_comment}
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($val->lock_comment=='Y')-->
|
||||
{$lang->lock_comment}
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($val->allow_trackback=='Y')-->
|
||||
{$lang->allow_trackback}
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 관련 링크 -->
|
||||
<div>
|
||||
<a href="{getUrl('document_srl','')}">[{$lang->cmd_list}]</a>
|
||||
<a href="#" onclick="doVote();return false;">[{$lang->cmd_vote}]</a>
|
||||
|
||||
<!--@if($val->is_granted)-->
|
||||
<a href="{getUrl('act','dispBlogWrite')}">[{$lang->cmd_modify}]</a>
|
||||
<a href="{getUrl('act','dispBlogDelete')}">[{$lang->cmd_delete}]</a>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 엮인글 파일 include -->
|
||||
<!--@if($val->allow_trackback=='Y')-->
|
||||
<a name="trackback"></a>
|
||||
<!--#include("./trackback.html")-->
|
||||
<!--@end-->
|
||||
|
||||
<!-- 댓글 파일 include -->
|
||||
<!--@if($grant->write_comment&&$val->allow_comment=='Y')-->
|
||||
<a name="comment"></a>
|
||||
<!--#include("./comment.html")-->
|
||||
<!--@end-->
|
||||
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
<!-- 현 글의 기본 정보를 담고 있는 form. 필수 -->
|
||||
<form id="fo_document_info" action="./" method="get">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
||||
</form>
|
||||
|
||||
<!-- 글 내용 보여주기 -->
|
||||
<div>
|
||||
<table border="1" width="100%" style="table-layout:fixed">
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
<!--%import("filter/manage_checked_document.xml")-->
|
||||
<!--%import("js/blog_admin.js")-->
|
||||
|
||||
<div style="width:400px">
|
||||
|
||||
<div>{$lang->cmd_manage_document}</div>
|
||||
|
||||
<!--@if(!count($document_list))-->
|
||||
<div>{$lang->msg_no_checked_document}</div>
|
||||
<!--@else-->
|
||||
<form action="./" method="get" id="fo_management">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="type" value="" />
|
||||
<div>{$lang->checked_count} : {count($document_list)}</div>
|
||||
|
||||
<div><a href="#" onclick="doManageDocument('delete');return false;">{$lang->cmd_delete}</a></div>
|
||||
|
||||
<!--@if(count($blog_list)>1)-->
|
||||
<div>
|
||||
<select name="target_blog">
|
||||
<!--@foreach($blog_list as $key => $val)-->
|
||||
<!--@if($module_srl != $val->module_srl)-->
|
||||
<option value="{$val->module_srl}">{$val->browser_title} ({$val->mid})</option>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</select>
|
||||
<a href="#" onclick="doManageDocument('move');return false;">{$lang->cmd_move}</a>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</form>
|
||||
<!--@end-->
|
||||
|
||||
<div><a href="#" onclick="window.close(); return false;">{$lang->cmd_close}</a></div>
|
||||
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue