mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 22:59:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@123 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
242b24d369
commit
756ecc1423
28 changed files with 197 additions and 153 deletions
|
|
@ -24,7 +24,7 @@
|
|||
$password = Context::get('password');
|
||||
|
||||
// member모듈 controller 객체 생성
|
||||
$oMemberController = getController('member');
|
||||
$oMemberController = &getController('member');
|
||||
return $oMemberController->doLogin($user_id, $password);
|
||||
}
|
||||
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
**/
|
||||
function procLogout() {
|
||||
// member모듈 controller 객체 생성
|
||||
$oMemberController = getController('member');
|
||||
$oMemberController = &getController('member');
|
||||
return $oMemberController->doLogout();
|
||||
}
|
||||
|
||||
|
|
@ -47,10 +47,10 @@
|
|||
if($obj->is_notice!='Y'||!$this->grant->manager) $obj->is_notice = 'N';
|
||||
|
||||
// document module의 model 객체 생성
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// document module의 controller 객체 생성
|
||||
$oDocumentController = getController('document');
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
// 이미 존재하는 글인지 체크
|
||||
$document = $oDocumentModel->getDocument($obj->document_srl);
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
$trackback_url = Context::get('trackback_url');
|
||||
$trackback_charset = Context::get('trackback_charset');
|
||||
if($trackback_url) {
|
||||
$oTrackbackController = getController('trackback');
|
||||
$oTrackbackController = &getController('trackback');
|
||||
$oTrackbackController->sendTrackback($obj, $trackback_url, $trackback_charset);
|
||||
}
|
||||
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
if(!$document_srl) return $this->doError('msg_invalid_document');
|
||||
|
||||
// document module model 객체 생성
|
||||
$oDocumentController = getController('document');
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
// 삭제 시도
|
||||
$output = $oDocumentController->deleteDocument($document_srl);
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
**/
|
||||
function procVoteDocument() {
|
||||
// document module controller 객체 생성
|
||||
$oDocumentController = getController('document');
|
||||
$oDocumentController = &getController('document');
|
||||
|
||||
$document_srl = Context::get('document_srl');
|
||||
return $oDocumentController->updateVotedCount($document_srl);
|
||||
|
|
@ -121,10 +121,10 @@
|
|||
$obj->module_srl = $this->module_srl;
|
||||
|
||||
// comment 모듈의 model 객체 생성
|
||||
$oCommentModel = getModel('comment');
|
||||
$oCommentModel = &getModel('comment');
|
||||
|
||||
// comment 모듈의 controller 객체 생성
|
||||
$oCommentController = getController('comment');
|
||||
$oCommentController = &getController('comment');
|
||||
|
||||
// comment_srl이 없을 경우 신규 입력
|
||||
if(!$obj->comment_srl) {
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
|
||||
// 삭제
|
||||
// comment 모듈의 controller 객체 생성
|
||||
$oCommentController = getController('comment');
|
||||
$oCommentController = &getController('comment');
|
||||
|
||||
$output = $oCommentController->deleteComment($comment_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
$obj = Context::gets('document_srl','url','title','excerpt');
|
||||
|
||||
// trackback module의 controller 객체 생성
|
||||
$oTrackbackController = getController('trackback');
|
||||
$oTrackbackController = &getController('trackback');
|
||||
$oTrackbackController->insertTrackback($obj);
|
||||
}
|
||||
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
$trackback_srl = Context::get('trackback_srl');
|
||||
|
||||
// trackback module의 controller 객체 생성
|
||||
$oTrackbackController = getController('trackback');
|
||||
$oTrackbackController = &getController('trackback');
|
||||
$output = $oTrackbackController->deleteTrackback($trackback_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
|
@ -222,12 +222,12 @@
|
|||
// comment_srl이 있을 경우 댓글이 대상
|
||||
if($comment_srl) {
|
||||
// 문서번호에 해당하는 글이 있는지 확인
|
||||
$oCommentModel = getModel('comment');
|
||||
$oCommentModel = &getModel('comment');
|
||||
$data = $oCommentModel->getComment($comment_srl);
|
||||
// comment_srl이 없으면 문서가 대상
|
||||
} else {
|
||||
// 문서번호에 해당하는 글이 있는지 확인
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$data = $oDocumentModel->getDocument($document_srl);
|
||||
}
|
||||
|
||||
|
|
@ -239,11 +239,11 @@
|
|||
|
||||
// 해당 글에 대한 권한 부여
|
||||
if($comment_srl) {
|
||||
$oCommentController = getController('comment');
|
||||
$oCommentController = &getController('comment');
|
||||
$oCommentController->addGrant($comment_srl);
|
||||
} else {
|
||||
$_SESSION['own_document'][$document_srl] = true;
|
||||
$oDocumentController = getController('document');
|
||||
$oDocumentController = &getController('document');
|
||||
$oDocumentController->addGrant($document_srl);
|
||||
}
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@
|
|||
$file_srl = Context::get('file_srl');
|
||||
|
||||
// file class의 controller 객체 생성
|
||||
$oFileController = getController('file');
|
||||
$oFileController = &getController('file');
|
||||
$output = $oFileController->deleteFile($file_srl);
|
||||
|
||||
// 첨부파일의 목록을 java script로 출력
|
||||
|
|
@ -275,7 +275,7 @@
|
|||
$module_srl = $this->module_srl;
|
||||
|
||||
// file class의 controller 객체 생성
|
||||
$oFileController = getController('file');
|
||||
$oFileController = &getController('file');
|
||||
$output = $oFileController->insertFile($module_srl, $document_srl);
|
||||
|
||||
// 첨부파일의 목록을 java script로 출력
|
||||
|
|
@ -294,7 +294,7 @@
|
|||
$sid = Context::get('sid');
|
||||
|
||||
// document module 객체 생성후 해당 파일의 정보를 체크
|
||||
$oFileModel = getModel('file');
|
||||
$oFileModel = &getModel('file');
|
||||
$oFileModel->procDownload($file_srl, $sid);
|
||||
}
|
||||
|
||||
|
|
@ -308,12 +308,12 @@
|
|||
$document_srl = Context::get('document_srl');
|
||||
|
||||
// document_srl의 글이 등록되어 있다면 pass
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$data = $oDocumentModel->getDocument($document_srl);
|
||||
if($data) exit();
|
||||
|
||||
// 등록되어 있지 않다면 첨부파일 삭제
|
||||
$oFileController = getController('file');
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->deleteFiles($this->module_srl, $document_srl);
|
||||
}
|
||||
|
||||
|
|
@ -324,7 +324,7 @@
|
|||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// 현 모듈의 권한 목록을 가져옴
|
||||
$oBoardView = getModule('view');
|
||||
$oBoardView = &getModule('view');
|
||||
$grant_list = $oBoardView->grant_list;
|
||||
|
||||
if(count($grant_list)) {
|
||||
|
|
@ -335,7 +335,7 @@
|
|||
$grant = serialize($arr_grant);
|
||||
}
|
||||
|
||||
$oModule = getModule('module_manager');
|
||||
$oModule = &getModule('module_manager');
|
||||
$oModule->updateModuleGrant($module_srl, $grant);
|
||||
|
||||
$this->add('sid','board');
|
||||
|
|
@ -351,12 +351,12 @@
|
|||
function procUpdateSkinInfo() {
|
||||
// module_srl에 해당하는 정보들을 가져오기
|
||||
$module_srl = Context::get('module_srl');
|
||||
$oModule = getModule('module_manager');
|
||||
$oModule = &getModule('module_manager');
|
||||
$module_info = $oModule->getModuleInfoByModuleSrl($module_srl);
|
||||
$skin = $module_info->skin;
|
||||
|
||||
// 스킨의 정볼르 구해옴 (extra_vars를 체크하기 위해서)
|
||||
$oModule = getModule('module_manager');
|
||||
$oModule = &getModule('module_manager');
|
||||
$skin_info = $oModule->loadSkinInfo($this->module_path, $skin);
|
||||
|
||||
// 입력받은 변수들을 체크 (sid, act, module_srl, page등 기본적인 변수들 없앰)
|
||||
|
|
@ -422,7 +422,7 @@
|
|||
// serialize하여 저장
|
||||
$extra_vars = serialize($obj);
|
||||
|
||||
$oModule = getModule('module_manager');
|
||||
$oModule = &getModule('module_manager');
|
||||
$oModule->updateModuleExtraVars($module_srl, $extra_vars);
|
||||
|
||||
$url = sprintf("./admin.php?sid=%s&module_srl=%s&act=dispSkinInfo&page=%s", 'board', $module_srl, Context::get('page'));
|
||||
|
|
@ -447,7 +447,7 @@
|
|||
unset($extra_var->page);
|
||||
|
||||
// module_srl이 있으면 원본을 구해온다
|
||||
$oModule = getModule('module_manager');
|
||||
$oModule = &getModule('module_manager');
|
||||
|
||||
// module_srl이 넘어오면 원 모듈이 있는지 확인
|
||||
if($args->module_srl) {
|
||||
|
|
@ -487,7 +487,7 @@
|
|||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// 원본을 구해온다
|
||||
$oModule = getModule('module_manager');
|
||||
$oModule = &getModule('module_manager');
|
||||
$output = $oModule->deleteModule($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
|
@ -506,7 +506,7 @@
|
|||
$category_title = Context::get('category_title');
|
||||
|
||||
// module_srl이 있으면 원본을 구해온다
|
||||
$oDocument = getModule('document');
|
||||
$oDocument = &getModule('document');
|
||||
$output = $oDocument->insertCategory($module_srl, $category_title);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
|
@ -524,7 +524,7 @@
|
|||
$category_srl = Context::get('category_srl');
|
||||
$mode = Context::get('mode');
|
||||
|
||||
$oDocument = getModule('document');
|
||||
$oDocument = &getModule('document');
|
||||
|
||||
switch($mode) {
|
||||
case 'up' :
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
function init() {
|
||||
// 카테고리를 사용한다면 카테고리 목록을 구해옴
|
||||
if($this->module_info->use_category=='Y') {
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$this->category_list = $oDocumentModel->getCategoryList($this->module_srl);
|
||||
Context::set('category_list', $this->category_list);
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
$page = Context::get('page');
|
||||
|
||||
// document 객체를 생성. 기본 데이터 구조의 경우 document모듈만 쓰면 만사 해결.. -_-;
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// document_srl이 있다면 해당 글을 구해오자
|
||||
if($this->grant->view && $document_srl) {
|
||||
|
|
@ -68,14 +68,14 @@
|
|||
|
||||
// 댓글 가져오기
|
||||
if($document->comment_count && $document->allow_comment == 'Y') {
|
||||
$oCommentModel = getModel('comment');
|
||||
$oCommentModel = &getModel('comment');
|
||||
$comment_list = $oCommentModel->getCommentList($document_srl);
|
||||
Context::set('comment_list', $comment_list);
|
||||
}
|
||||
|
||||
// 트랙백 가져오기
|
||||
if($document->trackback_count && $document->allow_trackback == 'Y') {
|
||||
$oTrackback = getModule('trackback');
|
||||
$oTrackback = &getModule('trackback');
|
||||
$trackback_list = $oTrackback->getTrackbackList($document_srl);
|
||||
Context::set('trackback_list', $trackback_list);
|
||||
}
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
if($category) $search_obj->category_srl = $category;
|
||||
|
||||
// 목록의 경우 document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocumentModel = &getModel('document');
|
||||
$output = $oDocumentModel->getDocumentList($this->module_srl, 'list_order', $page, $this->list_count, $this->page_count, $search_obj);
|
||||
|
||||
// 템플릿에 쓰기 위해서 context::set
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
$document_srl = Context::get('document_srl');
|
||||
|
||||
// document 모듈 객체 생성
|
||||
$oDocument = getModule('document');
|
||||
$oDocument = &getModule('document');
|
||||
|
||||
// 지정된 글이 없다면 (신규) 새로운 번호를 만든다
|
||||
if(!$document_srl) {
|
||||
|
|
@ -190,7 +190,7 @@
|
|||
|
||||
// 지정된 글이 있는지 확인
|
||||
if($document_srl) {
|
||||
$oDocument = getModule('document');
|
||||
$oDocument = &getModule('document');
|
||||
$document = $oDocument->getDocument($document_srl);
|
||||
}
|
||||
|
||||
|
|
@ -220,7 +220,7 @@
|
|||
if(!$parent_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
// 해당 댓글를 찾아본다
|
||||
$oComment = getModule('comment');
|
||||
$oComment = &getModule('comment');
|
||||
$source_comment = $oComment->getComment($parent_srl);
|
||||
|
||||
// 댓글이 없다면 오류
|
||||
|
|
@ -250,7 +250,7 @@
|
|||
if(!$comment_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
// 해당 댓글를 찾아본다
|
||||
$oComment = getModule('comment');
|
||||
$oComment = &getModule('comment');
|
||||
$comment = $oComment->getComment($comment_srl);
|
||||
|
||||
// 댓글이 없다면 오류
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
|
||||
// 삭제하려는 댓글가 있는지 확인
|
||||
if($comment_srl) {
|
||||
$oComment = getModule('comment');
|
||||
$oComment = &getModule('comment');
|
||||
$comment = $oComment->getComment($comment_srl);
|
||||
}
|
||||
|
||||
|
|
@ -329,7 +329,7 @@
|
|||
$trackback_srl = Context::get('trackback_srl');
|
||||
|
||||
// 삭제하려는 댓글가 있는지 확인
|
||||
$oTrackback = getModule('trackback');
|
||||
$oTrackback = &getModule('trackback');
|
||||
$output = $oTrackback->getTrackback($trackback_srl);
|
||||
$trackback = $output->data;
|
||||
|
||||
|
|
@ -358,14 +358,13 @@
|
|||
$info->link = sprintf("%s?mid=%s", Context::getRequestUri(), Context::get('mid'));
|
||||
|
||||
// 컨텐츠 추출
|
||||
$oDocument = getModule('document');
|
||||
$oDocument = &getModule('document');
|
||||
$output = $oDocument->getDocumentList($this->module_srl, 'update_order', $page, 20, 20, NULL);
|
||||
$document_list = $output->data;
|
||||
|
||||
// 출력하고 끝내기
|
||||
$oRss = getModule('rss');
|
||||
$oRss->printRssDocument($info, $document_list);
|
||||
exit();
|
||||
$oRss = &getView('rss');
|
||||
$oRss->dispRss($info, $document_list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -375,7 +374,7 @@
|
|||
// module_srl이 있으면 미리 체크하여 존재하는 모듈이면 module_info 세팅
|
||||
$module_srl = Context::get('module_srl');
|
||||
if($module_srl) {
|
||||
$oModule = getModule('module_manager');
|
||||
$oModule = &getModule('module_manager');
|
||||
$module_info = $oModule->getModuleInfoByModuleSrl($module_srl);
|
||||
if(!$module_info) {
|
||||
Context::set('module_srl','');
|
||||
|
|
@ -428,7 +427,7 @@
|
|||
|
||||
$module_info = Context::get('module_info');
|
||||
|
||||
$oDocument = getModule('document');
|
||||
$oDocument = &getModule('document');
|
||||
$document_count = $oDocument->getDocumentCount($module_info->module_srl);
|
||||
$module_info->document_count = $document_count;
|
||||
|
||||
|
|
@ -446,7 +445,7 @@
|
|||
$module_info = Context::get('module_info');
|
||||
$skin = $module_info->skin;
|
||||
|
||||
$oModule = getModule('module_manager');
|
||||
$oModule = &getModule('module_manager');
|
||||
$skin_info = $oModule->loadSkinInfo($this->module_path, $skin);
|
||||
|
||||
// skin_info에 extra_vars 값을 지정
|
||||
|
|
@ -471,7 +470,7 @@
|
|||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// 카테고리의 목록을 구해옴
|
||||
$oDocument = getModule('document');
|
||||
$oDocument = &getModule('document');
|
||||
$category_list = $oDocument->getCategoryList($module_srl);
|
||||
Context::set('category_list', $category_list);
|
||||
|
||||
|
|
@ -494,14 +493,14 @@
|
|||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// 현 모듈의 권한 목록을 가져옴
|
||||
$oBoard = getModule('board');
|
||||
$oBoard = &getModule('board');
|
||||
$grant_list = $oBoard->grant_list;
|
||||
|
||||
// 권한 목록 세팅
|
||||
Context::set('grant_list', $grant_list);
|
||||
|
||||
// 권한 그룹의 목록을 가져온다
|
||||
$oMember = getModule('member');
|
||||
$oMember = &getModule('member');
|
||||
$group_list = $oMember->getGroups();
|
||||
Context::set('group_list', $group_list);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue