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@864 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5a2be2d812
commit
35b9bb8fd2
28 changed files with 186 additions and 485 deletions
|
|
@ -51,9 +51,8 @@
|
|||
* addons라는 테이블에 애드온의 이름을 등록하는 것으로 활성화를 시키게 된다
|
||||
**/
|
||||
function doActivate($addon) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->addon = $addon;
|
||||
return $oDB->executeQuery('addon.insertAddon', $args);
|
||||
return executeQuery('addon.insertAddon', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -62,9 +61,8 @@
|
|||
* addons라는 테이블에 애드온의 이름을 제거하는 것으로 비활성화를 시키게 된다
|
||||
**/
|
||||
function doDeactivate($addon) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->addon = $addon;
|
||||
return $oDB->executeQuery('addon.deleteAddon', $args);
|
||||
return executeQuery('addon.deleteAddon', $args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@
|
|||
// activated된 애드온 목록을 구함
|
||||
$activated_addons = $this->getActivatedAddons();
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 다운받은 애드온과 설치된 애드온의 목록을 구함
|
||||
$searched_list = FileHandler::readDir('./addons');
|
||||
$searched_count = count($searched_list);
|
||||
|
|
@ -109,9 +106,8 @@
|
|||
* @brief 활성화된 애드온 목록을 구해옴
|
||||
**/
|
||||
function getActivatedAddons() {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->list_order = 'addon';
|
||||
$output = $oDB->executeQuery('addon.getAddons', $args);
|
||||
$output = executeQuery('addon.getAddons', $args);
|
||||
if(!$output->data) return array();
|
||||
if(!is_array($output->data)) $output->data = array($output->data);
|
||||
|
||||
|
|
@ -127,9 +123,8 @@
|
|||
* @brief 애드온이 활성화 되어 있는지 체크
|
||||
**/
|
||||
function isActivatedAddon($addon) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->addon = $addon;
|
||||
$output = $oDB->executeQuery('addon.getAddonIsActivated', $args);
|
||||
$output = executeQuery('addon.getAddonIsActivated', $args);
|
||||
if($output->data->count>0) return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,15 +28,12 @@
|
|||
* @brief 숏컷의 삭제
|
||||
**/
|
||||
function procAdminDeleteShortCut() {
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module = Context::get('selected_module');
|
||||
|
||||
// 삭제 불가능 바로가기의 처리
|
||||
if(in_array($args->module, array('module','addon','plugin','layout'))) return new Object(-1, 'msg_manage_module_cannot_delete');
|
||||
|
||||
$output = $oDB->executeQuery('admin.deleteShortCut', $args);
|
||||
$output = executeQuery('admin.deleteShortCut', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
|
|
@ -55,8 +52,7 @@
|
|||
$args->default_act = $module_info->admin_index_act;
|
||||
if(!$args->default_act) return new Object(-1, 'msg_default_act_is_null');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('admin.insertShortCut', $args);
|
||||
$output = executeQuery('admin.insertShortCut', $args);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,7 @@
|
|||
* @brief admin shortcut 에 등록된 목록을 return;
|
||||
**/
|
||||
function getShortCuts() {
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('admin.getShortCutList');
|
||||
$output = executeQuery('admin.getShortCutList');
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
if(!is_array($output->data)) $list = array($output->data);
|
||||
|
|
|
|||
|
|
@ -61,8 +61,6 @@
|
|||
if($document_srl != $document->document_srl) return new Object(-1,'msg_invalid_document');
|
||||
if($document->lock_comment=='Y') return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$obj->list_order = $obj->comment_srl * -1;
|
||||
if($obj->password) $obj->password = md5($obj->password);
|
||||
|
||||
|
|
@ -83,7 +81,7 @@
|
|||
$obj->uploaded_count = $oFileModel->getFilesCount($obj->comment_srl);
|
||||
|
||||
// 댓글을 입력
|
||||
$output = $oDB->executeQuery('comment.insertComment', $obj);
|
||||
$output = executeQuery('comment.insertComment', $obj);
|
||||
|
||||
// 입력에 이상이 없으면 해당 글의 댓글 수를 올림
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -120,8 +118,6 @@
|
|||
// 권한이 있는지 확인
|
||||
if(!$is_admin && !$source_obj->is_granted) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
if($obj->password) $obj->password = md5($obj->password);
|
||||
|
||||
// 로그인 되어 있고 작성자와 수정자가 동일하면 수정자의 정보를 세팅
|
||||
|
|
@ -152,7 +148,7 @@
|
|||
$obj->uploaded_count = $oFileModel->getFilesCount($obj->document_srl);
|
||||
|
||||
// 업데이트
|
||||
$output = $oDB->executeQuery('comment.updateComment', $obj);
|
||||
$output = executeQuery('comment.updateComment', $obj);
|
||||
|
||||
$output->add('comment_srl', $obj->comment_srl);
|
||||
return $output;
|
||||
|
|
@ -178,10 +174,8 @@
|
|||
if(!$is_admin && !$comment->is_granted) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 삭제
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = $oDB->executeQuery('comment.deleteComment', $args);
|
||||
$output = executeQuery('comment.deleteComment', $args);
|
||||
if(!$output->toBool()) return new Object(-1, 'msg_error_occured');
|
||||
|
||||
// 첨부 파일 삭제
|
||||
|
|
@ -214,9 +208,8 @@
|
|||
if(!$oDocumentModel->isGranted($document_srl)) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 삭제
|
||||
$oDB = &DB::getInstance();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('comment.deleteComments', $args);
|
||||
$output = executeQuery('comment.deleteComments', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -224,9 +217,8 @@
|
|||
* @brief 특정 모듈의 모든 댓글 삭제
|
||||
**/
|
||||
function deleteModuleComments($module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('comment.deleteModuleComments', $args);
|
||||
$output = executeQuery('comment.deleteModuleComments', $args);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,9 +26,8 @@
|
|||
* @brief 자식 답글의 갯수 리턴
|
||||
**/
|
||||
function getChildCommentCount($comment_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = $oDB->executeQuery('comment.getChildCommentCount', $args);
|
||||
$output = executeQuery('comment.getChildCommentCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
|
|
@ -36,10 +35,8 @@
|
|||
* @brief 댓글 가져오기
|
||||
**/
|
||||
function getComment($comment_srl, $is_admin = false) {
|
||||
// DB에서 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = $oDB->executeQuery('comment.getComment', $args);
|
||||
$output = executeQuery('comment.getComment', $args);
|
||||
$comment = $output->data;
|
||||
|
||||
// 첨부파일 가져오기
|
||||
|
|
@ -62,9 +59,8 @@
|
|||
function getComments($comment_srl_list) {
|
||||
if(is_array($comment_srl_list)) $comment_srls = implode(',',$comment_srl_list);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$args->comment_srls = $comment_srls;
|
||||
$output = $oDB->executeQuery('comment.getComments', $args);
|
||||
$output = executeQuery('comment.getComments', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
|
|
@ -72,9 +68,8 @@
|
|||
* @brief document_srl 에 해당하는 댓글의 전체 갯수를 가져옴
|
||||
**/
|
||||
function getCommentCount($document_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('comment.getCommentCount', $args);
|
||||
$output = executeQuery('comment.getCommentCount', $args);
|
||||
$total_count = $output->data->count;
|
||||
return (int)$total_count;
|
||||
}
|
||||
|
|
@ -83,11 +78,9 @@
|
|||
* @brief document_srl에 해당하는 문서의 댓글 목록을 가져옴
|
||||
**/
|
||||
function getCommentList($document_srl, $is_admin = false) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
$args->list_order = 'list_order';
|
||||
$output = $oDB->executeQuery('comment.getCommentList', $args);
|
||||
$output = executeQuery('comment.getCommentList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$source_list= $output->data;
|
||||
|
|
@ -155,10 +148,6 @@
|
|||
* @brief 모든 댓글를 시간 역순으로 가져옴 (관리자용)
|
||||
**/
|
||||
function getTotalCommentList($obj) {
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$query_id = 'comment.getTotalCommentList';
|
||||
|
||||
// 변수 설정
|
||||
|
|
@ -211,7 +200,7 @@
|
|||
}
|
||||
|
||||
// comment.getTotalCommentList 쿼리 실행
|
||||
$output = $oDB->executeQuery($query_id, $args);
|
||||
$output = executeQuery($query_id, $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
|
|
|||
|
|
@ -36,9 +36,8 @@
|
|||
if(!in_array($module_srl, $module_srl_list)) $module_srl_list[] = $module_srl;
|
||||
}
|
||||
if(count($module_srl_list)) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = $oDB->executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
$mid_output = executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
if($mid_output->data && !is_array($mid_output->data)) $mid_output->data = array($mid_output->data);
|
||||
for($i=0;$i<count($mid_output->data);$i++) {
|
||||
$mid_info = $mid_output->data[$i];
|
||||
|
|
|
|||
|
|
@ -47,9 +47,6 @@
|
|||
* @brief 문서 입력
|
||||
**/
|
||||
function insertDocument($obj) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 기본 변수들 정리
|
||||
if($obj->is_secret!='Y') $obj->is_secret = 'N';
|
||||
if($obj->allow_comment!='Y') $obj->allow_comment = 'N';
|
||||
|
|
@ -98,7 +95,7 @@
|
|||
}
|
||||
|
||||
// DB에 입력
|
||||
$output = $oDB->executeQuery('document.insertDocument', $obj);
|
||||
$output = executeQuery('document.insertDocument', $obj);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
|
@ -120,8 +117,6 @@
|
|||
* @brief 문서 수정
|
||||
**/
|
||||
function updateDocument($source_obj, $obj) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 기본 변수들 정리
|
||||
if($obj->is_secret!='Y') $obj->is_secret = 'N';
|
||||
if($obj->allow_comment!='Y') $obj->allow_comment = 'N';
|
||||
|
|
@ -154,7 +149,7 @@
|
|||
}
|
||||
|
||||
// 수정
|
||||
$obj->update_order = $oDB->getNextSequence() * -1;
|
||||
$obj->update_order = getNextSequence() * -1;
|
||||
|
||||
// 공지사항일 경우 list_order에 무지막지한 값을, 그렇지 않으면 document_srl*-1값을
|
||||
if($obj->is_notice=='Y') $obj->list_order = $this->notice_list_order;
|
||||
|
|
@ -184,7 +179,7 @@
|
|||
}
|
||||
|
||||
// DB에 입력
|
||||
$output = $oDB->executeQuery('document.updateDocument', $obj);
|
||||
$output = executeQuery('document.updateDocument', $obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 성공하였을 경우 category_srl이 있으면 카테고리 update
|
||||
|
|
@ -216,11 +211,9 @@
|
|||
// 권한이 있는지 확인
|
||||
if(!$document->is_granted&&!$is_admin) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 글 삭제
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('document.deleteDocument', $args);
|
||||
$output = executeQuery('document.deleteDocument', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 댓글 삭제
|
||||
|
|
@ -251,10 +244,8 @@
|
|||
* @brief 특정 모듈의 전체 문서 삭제
|
||||
**/
|
||||
function deleteModuleDocument($module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('document.deleteModuleDocument', $args);
|
||||
$output = executeQuery('document.deleteModuleDocument', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -286,9 +277,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 로그인 사용자이면 member_srl, 비회원이면 ipaddress로 판단
|
||||
if($member_srl) {
|
||||
$args->member_srl = $member_srl;
|
||||
|
|
@ -296,16 +284,16 @@
|
|||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('document.getDocumentReadedLogInfo', $args);
|
||||
$output = executeQuery('document.getDocumentReadedLogInfo', $args);
|
||||
|
||||
// 로그 정보에 조회 로그가 있으면 세션 등록후 패스
|
||||
if($output->data->count) return $_SESSION['readed_document'][$document_srl] = true;
|
||||
|
||||
// 조회수 업데이트
|
||||
$output = $oDB->executeQuery('document.updateReadedCount', $args);
|
||||
$output = executeQuery('document.updateReadedCount', $args);
|
||||
|
||||
// 로그 남기기
|
||||
$output = $oDB->executeQuery('document.insertDocumentReadedLog', $args);
|
||||
$output = executeQuery('document.insertDocumentReadedLog', $args);
|
||||
|
||||
// 세션 정보에 남김
|
||||
return $_SESSION['readed_document'][$document_srl] = true;
|
||||
|
|
@ -341,9 +329,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 로그인 사용자이면 member_srl, 비회원이면 ipaddress로 판단
|
||||
if($member_srl) {
|
||||
$args->member_srl = $member_srl;
|
||||
|
|
@ -351,7 +336,7 @@
|
|||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('document.getDocumentVotedLogInfo', $args);
|
||||
$output = executeQuery('document.getDocumentVotedLogInfo', $args);
|
||||
|
||||
// 로그 정보에 추천 로그가 있으면 세션 등록후 패스
|
||||
if($output->data->count) {
|
||||
|
|
@ -360,10 +345,10 @@
|
|||
}
|
||||
|
||||
// 추천수 업데이트
|
||||
$output = $oDB->executeQuery('document.updateVotedCount', $args);
|
||||
$output = executeQuery('document.updateVotedCount', $args);
|
||||
|
||||
// 로그 남기기
|
||||
$output = $oDB->executeQuery('document.insertDocumentVotedLog', $args);
|
||||
$output = executeQuery('document.insertDocumentVotedLog', $args);
|
||||
|
||||
// 세션 정보에 남김
|
||||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
|
|
@ -376,46 +361,39 @@
|
|||
* @brief 해당 document의 댓글 수 증가
|
||||
**/
|
||||
function updateCommentCount($document_srl, $comment_count) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
$args->comment_count = $comment_count;
|
||||
|
||||
return $oDB->executeQuery('document.updateCommentCount', $args);
|
||||
return executeQuery('document.updateCommentCount', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 해당 document의 엮인글 수증가
|
||||
**/
|
||||
function updateTrackbackCount($document_srl, $trackback_count) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
$args->trackback_count = $trackback_count;
|
||||
|
||||
return $oDB->executeQuery('document.updateTrackbackCount', $args);
|
||||
return executeQuery('document.updateTrackbackCount', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 카테고리 추가
|
||||
**/
|
||||
function insertCategory($module_srl, $title) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->list_order = $args->category_srl = $oDB->getNextSequence();
|
||||
$args->list_order = $args->category_srl = getNextSequence();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->title = $title;
|
||||
$args->document_count = 0;
|
||||
|
||||
return $oDB->executeQuery('document.insertCategory', $args);
|
||||
return executeQuery('document.insertCategory', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 카테고리 정보 수정
|
||||
**/
|
||||
function updateCategory($args) {
|
||||
$oDB = &DB::getInstance();
|
||||
return $oDB->executeQuery('document.updateCategory', $args);
|
||||
return executeQuery('document.updateCategory', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -426,23 +404,19 @@
|
|||
$oDocumentModel = &getModel('document');
|
||||
if(!$document_count) $document_count = $oDocumentModel->getCategoryDocumentCount($category_srl);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->category_srl = $category_srl;
|
||||
$args->document_count = $document_count;
|
||||
return $oDB->executeQuery('document.updateCategoryCount', $args);
|
||||
return executeQuery('document.updateCategoryCount', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 카테고리 삭제
|
||||
**/
|
||||
function deleteCategory($category_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->category_srl = $category_srl;
|
||||
|
||||
// 카테고리 정보를 삭제
|
||||
$output = $oDB->executeQuery('document.deleteCategory', $args);
|
||||
$output = executeQuery('document.deleteCategory', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 현 카테고리 값을 가지는 문서들의 category_srl을 0 으로 세팅
|
||||
|
|
@ -450,7 +424,7 @@
|
|||
|
||||
$args->target_category_srl = 0;
|
||||
$args->source_category_srl = $category_srl;
|
||||
$output = $oDB->executeQuery('document.updateDocumentCategory', $args);
|
||||
$output = executeQuery('document.updateDocumentCategory', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -458,10 +432,8 @@
|
|||
* @brief 특정 모듈의 카테고리를 모두 삭제
|
||||
**/
|
||||
function deleteModuleCategory($module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('document.deleteModuleCategory', $args);
|
||||
$output = executeQuery('document.deleteModuleCategory', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -469,12 +441,11 @@
|
|||
* @brief 카테고리를 상단으로 이동
|
||||
**/
|
||||
function moveCategoryUp($category_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 선택된 카테고리의 정보를 구한다
|
||||
$args->category_srl = $category_srl;
|
||||
$output = $oDB->executeQuery('document.getCategory', $args);
|
||||
$output = executeQuery('document.getCategory', $args);
|
||||
|
||||
$category = $output->data;
|
||||
$list_order = $category->list_order;
|
||||
|
|
@ -516,12 +487,11 @@
|
|||
* @brief 카테고리를 아래로 이동
|
||||
**/
|
||||
function moveCategoryDown($category_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 선택된 카테고리의 정보를 구한다
|
||||
$args->category_srl = $category_srl;
|
||||
$output = $oDB->executeQuery('document.getCategory', $args);
|
||||
$output = executeQuery('document.getCategory', $args);
|
||||
|
||||
$category = $output->data;
|
||||
$list_order = $category->list_order;
|
||||
|
|
|
|||
|
|
@ -25,9 +25,8 @@
|
|||
**/
|
||||
function getDocument($document_srl, $is_admin=false, $get_extra_info=false) {
|
||||
// DB에서 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('document.getDocument', $args);
|
||||
$output = executeQuery('document.getDocument', $args);
|
||||
$document = $output->data;
|
||||
if(!$document) return;
|
||||
|
||||
|
|
@ -83,9 +82,8 @@
|
|||
if(is_array($document_srl_list)) $document_srls = implode(',',$document_srl_list);
|
||||
|
||||
// DB에서 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$args->document_srls = $document_srls;
|
||||
$output = $oDB->executeQuery('document.getDocuments', $args);
|
||||
$output = executeQuery('document.getDocuments', $args);
|
||||
$document_list = $output->data;
|
||||
if(!$document_list) return;
|
||||
|
||||
|
|
@ -113,9 +111,6 @@
|
|||
**/
|
||||
function getDocumentList($obj) {
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
if(!in_array($obj->sort_index, array('list_order', 'update_order'))) $obj->sort_index = 'list_order';
|
||||
|
||||
// module_srl 대신 mid가 넘어왔을 경우는 직접 module_srl을 구해줌
|
||||
|
|
@ -215,7 +210,7 @@
|
|||
}
|
||||
|
||||
// document.getDocumentList 쿼리 실행
|
||||
$output = $oDB->executeQuery($query_id, $args);
|
||||
$output = executeQuery($query_id, $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
|
@ -239,9 +234,6 @@
|
|||
* @brief module_srl에 해당하는 문서의 전체 갯수를 가져옴
|
||||
**/
|
||||
function getDocumentCount($module_srl, $search_obj = NULL) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 검색 옵션 추가
|
||||
$args->module_srl = $module_srl;
|
||||
$args->s_title = $search_obj->s_title;
|
||||
|
|
@ -252,7 +244,7 @@
|
|||
$args->s_regdate = $search_obj->s_regdate;
|
||||
$args->category_srl = $search_obj->category_srl;
|
||||
|
||||
$output = $oDB->executeQuery('document.getDocumentCount', $args);
|
||||
$output = executeQuery('document.getDocumentCount', $args);
|
||||
|
||||
// 전체 갯수를 return
|
||||
$total_count = $output->data->count;
|
||||
|
|
@ -262,15 +254,12 @@
|
|||
* @brief 해당 document의 page 가져오기, module_srl이 없으면 전체에서..
|
||||
**/
|
||||
function getDocumentPage($document_srl, $module_srl=0, $list_count) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 변수 설정
|
||||
$args->document_srl = $document_srl;
|
||||
$args->module_srl = $module_srl;
|
||||
|
||||
// 전체 갯수를 구한후 해당 글의 페이지를 검색
|
||||
$output = $oDB->executeQuery('document.getDocumentPage', $args);
|
||||
$output = executeQuery('document.getDocumentPage', $args);
|
||||
$count = $output->data->count;
|
||||
$page = (int)(($count-1)/$list_count)+1;
|
||||
return $page;
|
||||
|
|
@ -280,10 +269,8 @@
|
|||
* @brief 카테고리의 정보를 가져옴
|
||||
**/
|
||||
function getCategory($category_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->category_srl = $category_srl;
|
||||
$output = $oDB->executeQuery('document.getCategory', $args);
|
||||
$output = executeQuery('document.getCategory', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
|
|
@ -291,11 +278,9 @@
|
|||
* @brief 특정 모듈의 카테고리 목록을 가져옴
|
||||
**/
|
||||
function getCategoryList($module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$args->sort_index = 'list_order';
|
||||
$output = $oDB->executeQuery('document.getCategoryList', $args);
|
||||
$output = executeQuery('document.getCategoryList', $args);
|
||||
|
||||
$category_list = $output->data;
|
||||
|
||||
|
|
@ -314,10 +299,8 @@
|
|||
* @brief 카테고리에 속한 문서의 갯수를 구함
|
||||
**/
|
||||
function getCategoryDocumentCount($category_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->category_srl = $category_srl;
|
||||
$output = $oDB->executeQuery('document.getCategoryDocumentCount', $args);
|
||||
$output = executeQuery('document.getCategoryDocumentCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,9 +39,8 @@
|
|||
if(!in_array($module_srl, $module_srl_list)) $module_srl_list[] = $module_srl;
|
||||
}
|
||||
if(count($module_srl_list)) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = $oDB->executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
$mid_output = executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
if($mid_output->data && !is_array($mid_output->data)) $mid_output->data = array($mid_output->data);
|
||||
for($i=0;$i<count($mid_output->data);$i++) {
|
||||
$mid_info = $mid_output->data[$i];
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@
|
|||
if(!$args->document_srl || (!$args->title && !$args->content)) return new Object(0,'');
|
||||
|
||||
// 저장
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.insertSavedDoc', $args);
|
||||
$output = executeQuery('editor.insertSavedDoc', $args);
|
||||
|
||||
$this->setMessage('msg_auto_saved');
|
||||
}
|
||||
|
|
@ -73,9 +72,7 @@
|
|||
function procEditorAdminEnableComponent() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$args->enabled = 'Y';
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
$output = executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
|
|
@ -87,9 +84,7 @@
|
|||
function procEditorAdminDisableComponent() {
|
||||
$args->component_name = Context::get('component_name');
|
||||
$args->enabled = 'N';
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
$output = executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
|
|
@ -103,8 +98,7 @@
|
|||
$mode = Context::get('mode');
|
||||
|
||||
// DB에서 전체 목록 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.getComponentList', $args);
|
||||
$output = executeQuery('editor.getComponentList', $args);
|
||||
$db_list = $output->data;
|
||||
foreach($db_list as $key => $val) {
|
||||
if($val->component_name == $args->component_name) break;
|
||||
|
|
@ -115,21 +109,21 @@
|
|||
|
||||
$prev_args->component_name = $db_list[$key-1]->component_name;
|
||||
$prev_args->list_order = $db_list[$key]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $prev_args);
|
||||
executeQuery('editor.updateComponent', $prev_args);
|
||||
|
||||
$cur_args->component_name = $db_list[$key]->component_name;
|
||||
$cur_args->list_order = $db_list[$key-1]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $cur_args);
|
||||
executeQuery('editor.updateComponent', $cur_args);
|
||||
} else {
|
||||
if($key == count($db_list)-1) return new Object(-1,'msg_component_is_last_order');
|
||||
|
||||
$next_args->component_name = $db_list[$key+1]->component_name;
|
||||
$next_args->list_order = $db_list[$key]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $next_args);
|
||||
executeQuery('editor.updateComponent', $next_args);
|
||||
|
||||
$cur_args->component_name = $db_list[$key]->component_name;
|
||||
$cur_args->list_order = $db_list[$key+1]->list_order;
|
||||
$oDB->executeQuery('editor.updateComponent', $cur_args);
|
||||
executeQuery('editor.updateComponent', $cur_args);
|
||||
}
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
|
|
@ -148,8 +142,7 @@
|
|||
$args->component_name = $component_name;
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.updateComponent', $args);
|
||||
$output = executeQuery('editor.updateComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
|
|
@ -168,8 +161,7 @@
|
|||
}
|
||||
|
||||
// 일단 이전 저장본 삭제
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->executeQuery('editor.deleteSavedDoc', $args);
|
||||
executeQuery('editor.deleteSavedDoc', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -179,18 +171,16 @@
|
|||
if($enabled) $enabled = 'Y';
|
||||
else $enabled = 'N';
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->component_name = $component_name;
|
||||
$args->enabled = $enabled;
|
||||
|
||||
// 컴포넌트가 있는지 확인
|
||||
$output = $oDB->executeQuery('editor.isComponentInserted', $args);
|
||||
$output = executeQuery('editor.isComponentInserted', $args);
|
||||
if($output->data->count) return new Object(-1, 'msg_component_is_not_founded');
|
||||
|
||||
// 입력
|
||||
$args->list_order = $oDB->getNextSequence();
|
||||
$output = $oDB->executeQuery('editor.insertComponent', $args);
|
||||
$args->list_order = getNextSequence();
|
||||
$output = executeQuery('editor.insertComponent', $args);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,8 +58,7 @@
|
|||
$auto_save_args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.getSavedDocument', $auto_save_args);
|
||||
$output = executeQuery('editor.getSavedDocument', $auto_save_args);
|
||||
$saved_doc = $output->data;
|
||||
if(!$saved_doc) return;
|
||||
|
||||
|
|
@ -103,9 +102,7 @@
|
|||
function getComponentList($filter_enabled = true) {
|
||||
if($filter_enabled) $args->enabled = "Y";
|
||||
|
||||
// DB에서 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.getComponentList', $args);
|
||||
$output = executeQuery('editor.getComponentList', $args);
|
||||
$db_list = $output->data;
|
||||
|
||||
// 파일목록을 구함
|
||||
|
|
@ -164,9 +161,7 @@
|
|||
function getComponent($component_name) {
|
||||
$args->component_name = $component_name;
|
||||
|
||||
// DB에서 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('editor.getComponent', $args);
|
||||
$output = executeQuery('editor.getComponent', $args);
|
||||
$component = $output->data;
|
||||
|
||||
$component_name = $component->component_name;
|
||||
|
|
|
|||
|
|
@ -85,11 +85,8 @@
|
|||
$oMemberModel = &getModel('member');
|
||||
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 파일 정보를 정리
|
||||
$args->file_srl = $oDB->getNextSequence();
|
||||
$args->file_srl = getNextSequence();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$args->module_srl = $module_srl;
|
||||
$args->direct_download = $direct_download;
|
||||
|
|
@ -100,7 +97,7 @@
|
|||
$args->member_srl = $member_srl;
|
||||
$args->sid = md5(rand(rand(1111111,4444444),rand(4444445,9999999)));
|
||||
|
||||
$output = $oDB->executeQuery('file.insertFile', $args);
|
||||
$output = executeQuery('file.insertFile', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$output->add('file_srl', $args->file_srl);
|
||||
|
|
@ -113,11 +110,9 @@
|
|||
* @brief 첨부파일 삭제
|
||||
**/
|
||||
function deleteFile($file_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 파일 정보를 가져옴
|
||||
$args->file_srl = $file_srl;
|
||||
$output = $oDB->executeQuery('file.getFile', $args);
|
||||
$output = executeQuery('file.getFile', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$file_info = $output->data;
|
||||
if(!$file_info) return new Object(-1, 'file_not_founded');
|
||||
|
|
@ -126,7 +121,7 @@
|
|||
$uploaded_filename = $output->data->uploaded_filename;
|
||||
|
||||
// DB에서 삭제
|
||||
$output = $oDB->executeQuery('file.deleteFile', $args);
|
||||
$output = executeQuery('file.deleteFile', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 삭제 성공하면 파일 삭제
|
||||
|
|
@ -139,10 +134,8 @@
|
|||
* @brief 특정 문서의 첨부파일을 모두 삭제
|
||||
**/
|
||||
function deleteFiles($module_srl, $upload_target_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = $oDB->executeQuery('file.deleteFiles', $args);
|
||||
$output = executeQuery('file.deleteFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 실제 파일 삭제
|
||||
|
|
@ -159,10 +152,8 @@
|
|||
* @brief 특정 모두의 첨부파일 모두 삭제
|
||||
**/
|
||||
function deleteModuleFiles($module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('file.deleteModuleFiles', $args);
|
||||
$output = executeQuery('file.deleteModuleFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 실제 파일 삭제
|
||||
|
|
@ -179,7 +170,6 @@
|
|||
**/
|
||||
function moveFile($source_srl, $target_module_srl, $target_srl) {
|
||||
if($source_srl == $target_srl) return;
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
$file_list = $oFileModel->getFiles($source_srl);
|
||||
|
|
@ -214,7 +204,7 @@
|
|||
$args->uploaded_filename = $new_file;
|
||||
$args->module_srl = $file_info->module_srl;
|
||||
$args->upload_target_srl = $target_srl;
|
||||
$oDB->executeQuery('file.updateFile', $args);
|
||||
executeQuery('file.updateFile', $args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -291,8 +281,7 @@
|
|||
|
||||
// 이상이 없으면 download_count 증가
|
||||
$args->file_srl = $file_srl;
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->executeQuery('file.updateFileDownloadCount', $args);
|
||||
executeQuery('file.updateFileDownloadCount', $args);
|
||||
|
||||
// 파일 출력
|
||||
$filename = $file_obj->source_filename;
|
||||
|
|
|
|||
|
|
@ -17,10 +17,8 @@
|
|||
* @brief 특정 문서에 속한 첨부파일의 개수를 return
|
||||
**/
|
||||
function getFilesCount($upload_target_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = $oDB->executeQuery('file.getFilesCount', $args);
|
||||
$output = executeQuery('file.getFilesCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
|
|
@ -35,10 +33,8 @@
|
|||
* @brief 파일 정보를 구함
|
||||
**/
|
||||
function getFile($file_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->file_srl = $file_srl;
|
||||
$output = $oDB->executeQuery('file.getFile', $args);
|
||||
$output = executeQuery('file.getFile', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$file = $output->data;
|
||||
|
|
@ -51,11 +47,9 @@
|
|||
* @brief 특정 문서에 속한 파일을 모두 return
|
||||
**/
|
||||
function getFiles($upload_target_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$args->sort_index = 'file_srl';
|
||||
$output = $oDB->executeQuery('file.getFiles', $args);
|
||||
$output = executeQuery('file.getFiles', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
$file_list = $output->data;
|
||||
|
|
@ -76,10 +70,6 @@
|
|||
* @brief 모든 첨부파일을 시간 역순으로 가져옴 (관리자용)
|
||||
**/
|
||||
function getFileList($obj) {
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 검색 옵션 정리
|
||||
$search_target = trim(Context::get('search_target'));
|
||||
$search_keyword = trim(Context::get('search_keyword'));
|
||||
|
|
@ -112,7 +102,7 @@
|
|||
$args->page_count = $obj->page_count?$obj->page_count:10;
|
||||
|
||||
// file.getFileList쿼리 실행
|
||||
$output = $oDB->executeQuery('file.getFileList', $args);
|
||||
$output = executeQuery('file.getFileList', $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
|
|
|||
|
|
@ -36,9 +36,8 @@
|
|||
if(!in_array($module_srl, $module_srl_list)) $module_srl_list[] = $module_srl;
|
||||
}
|
||||
if(count($module_srl_list)) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = $oDB->executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
$mid_output = executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
if($mid_output->data && !is_array($mid_output->data)) $mid_output->data = array($mid_output->data);
|
||||
for($i=0;$i<count($mid_output->data);$i++) {
|
||||
$mid_info = $mid_output->data[$i];
|
||||
|
|
|
|||
|
|
@ -18,13 +18,11 @@
|
|||
* 레이아웃의 신규 생성은 제목만 받아서 layouts테이블에 입력함
|
||||
**/
|
||||
function procLayoutAdminInsert() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->layout_srl = $oDB->getNextSequence();
|
||||
$args->layout_srl = getNextSequence();
|
||||
$args->layout = Context::get('layout');
|
||||
$args->title = Context::get('title');
|
||||
|
||||
$output = $oDB->executeQuery("layout.insertLayout", $args);
|
||||
$output = executeQuery("layout.insertLayout", $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->add('layout_srl', $args->layout_srl);
|
||||
|
|
@ -47,8 +45,7 @@
|
|||
$args = Context::gets('layout_srl','title');
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('layout.updateLayout', $args);
|
||||
$output = executeQuery('layout.updateLayout', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
|
|
@ -71,15 +68,14 @@
|
|||
}
|
||||
|
||||
// DB에서 삭제
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 레이아웃 메뉴 삭제
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = $oDB->executeQuery("layout.deleteLayoutMenus", $args);
|
||||
$output = executeQuery("layout.deleteLayoutMenus", $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 레이아웃 삭제
|
||||
$output = $oDB->executeQuery("layout.deleteLayout", $args);
|
||||
$output = executeQuery("layout.deleteLayout", $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
|
|
@ -118,17 +114,15 @@
|
|||
$oLayoutModel = &getModel('layout');
|
||||
$menu_info = $oLayoutModel->getLayoutMenuInfo($args->menu_srl);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 존재하게 되면 update를 해준다
|
||||
if($menu_info->menu_srl == $args->menu_srl) {
|
||||
$output = $oDB->executeQuery('layout.updateLayoutMenu', $args);
|
||||
$output = executeQuery('layout.updateLayoutMenu', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 존재하지 않으면 insert를 해준다
|
||||
} else {
|
||||
$args->listorder = -1*$args->menu_srl;
|
||||
$output = $oDB->executeQuery('layout.insertLayoutMenu', $args);
|
||||
$output = executeQuery('layout.insertLayoutMenu', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +142,7 @@
|
|||
if(eregi("^mid=", $args->url)) {
|
||||
$target_args->layout_srl = $args->layout_srl;
|
||||
$target_args->mid = substr($args->url,4);
|
||||
$output = $oDB->executeQuery("module.updateModuleLayout", $target_args);
|
||||
$output = executeQuery("module.updateModuleLayout", $target_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
}
|
||||
|
|
@ -166,15 +160,13 @@
|
|||
$node_info = $oLayoutModel->getLayoutMenuInfo($args->menu_srl);
|
||||
if($node_info->parent_srl) $parent_srl = $node_info->parent_srl;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 자식 노드가 있는지 체크하여 있으면 삭제 못한다는 에러 출력
|
||||
$output = $oDB->executeQuery('layout.getChildMenuCount', $args);
|
||||
$output = executeQuery('layout.getChildMenuCount', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
if($output->data->count>0) return new Object(-1, msg_cannot_delete_for_child);
|
||||
|
||||
// DB에서 삭제
|
||||
$output = $oDB->executeQuery("layout.deleteLayoutMenu", $args);
|
||||
$output = executeQuery("layout.deleteLayoutMenu", $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 해당 메뉴의 정보를 구함
|
||||
|
|
@ -204,18 +196,17 @@
|
|||
$target_node = $oLayoutModel->getLayoutMenuInfo($target_node_srl);
|
||||
|
||||
// source_node에 target_node_srl의 parent_srl, listorder 값을 입력
|
||||
$oDB = &DB::getInstance();
|
||||
$source_args->menu_srl = $source_node_srl;
|
||||
$source_args->parent_srl = $target_node->parent_srl;
|
||||
$source_args->listorder = $target_node->listorder;
|
||||
$output = $oDB->executeQuery('layout.updateLayoutMenuParent', $source_args);
|
||||
$output = executeQuery('layout.updateLayoutMenuParent', $source_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// target_node의 listorder값을 +1해 준다
|
||||
$target_args->menu_srl = $target_node_srl;
|
||||
$target_args->parent_srl = $target_node->parent_srl;
|
||||
$target_args->listorder = $target_node->listorder -1;
|
||||
$output = $oDB->executeQuery('layout.updateLayoutMenuParent', $target_args);
|
||||
$output = executeQuery('layout.updateLayoutMenuParent', $target_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// xml파일 재생성
|
||||
|
|
@ -260,10 +251,9 @@
|
|||
if(!$layout_srl || !$menu_id) return;
|
||||
|
||||
// DB에서 layout_srl에 해당하는 메뉴 목록을 listorder순으로 구해옴
|
||||
$oDB = &DB::getInstance();
|
||||
$args->layout_srl = $layout_srl;
|
||||
$args->menu_id = $menu_id;
|
||||
$output = $oDB->executeQuery("layout.getLayoutMenuList", $args);
|
||||
$output = executeQuery("layout.getLayoutMenuList", $args);
|
||||
if(!$output->toBool()) return;
|
||||
|
||||
// 캐시 파일의 이름을 지정
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@
|
|||
$parent_info = $this->getLayoutMenuInfo($parent_srl);
|
||||
|
||||
// 추가하려는 메뉴의 기본 변수 설정
|
||||
$oDB = &DB::getInstance();
|
||||
$menu_info->menu_srl = $oDB->getNextSequence();
|
||||
$menu_info->menu_srl = getNextSequence();
|
||||
$menu_info->parent_srl = $parent_srl;
|
||||
$menu_info->parent_menu_name = $parent_info->name;
|
||||
|
||||
|
|
@ -48,8 +47,7 @@
|
|||
|
||||
// 찾아진 값이 없다면 신규 메뉴 추가로 보고 menu_srl값만 구해줌
|
||||
if(!$menu_info->menu_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$menu_info->menu_srl = $oDB->getNextSequence();
|
||||
$menu_info->menu_srl = getNextSequence();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -70,8 +68,7 @@
|
|||
* 생성되었다는 것은 DB에 등록이 되었다는 것을 의미
|
||||
**/
|
||||
function getLayoutList() {
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('layout.getLayoutList');
|
||||
$output = executeQuery('layout.getLayoutList');
|
||||
if(!$output->data) return;
|
||||
|
||||
if(is_array($output->data)) return $output->data;
|
||||
|
|
@ -84,9 +81,8 @@
|
|||
**/
|
||||
function getLayout($layout_srl) {
|
||||
// 일단 DB에서 정보를 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = $oDB->executeQuery('layout.getLayout', $args);
|
||||
$output = executeQuery('layout.getLayout', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
// layout, extra_vars를 정리한 후 xml 파일 정보를 불러옴 (불러올때 결합)
|
||||
|
|
@ -227,11 +223,9 @@
|
|||
* 이 정보중에 group_srls의 경우는 , 로 연결되어 들어가며 사용시에는 explode를 통해 array로 변환 시킴
|
||||
**/
|
||||
function getLayoutMenuInfo($menu_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// menu_srl 이 있으면 해당 메뉴의 정보를 가져온다
|
||||
$args->menu_srl = $menu_srl;
|
||||
$output = $oDB->executeQuery('layout.getLayoutMenu', $args);
|
||||
$output = executeQuery('layout.getLayoutMenu', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$node = $output->data;
|
||||
|
|
|
|||
|
|
@ -50,12 +50,9 @@
|
|||
$_SESSION['group_srls'] = array_keys($member_info->group_list);
|
||||
$_SESSION['is_admin'] = $member_info->is_admin=='Y'?true:false;
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 사용자 정보의 최근 로그인 시간을 기록
|
||||
$args->member_srl = $member_info->member_srl;
|
||||
$output = $oDB->executeQuery('member.updateLastLogin', $args);
|
||||
$output = executeQuery('member.updateLastLogin', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -189,8 +186,6 @@
|
|||
* @brief 가입 항목 추가
|
||||
**/
|
||||
function procMemberAdminInsertJoinForm() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->member_join_form_srl = Context::get('member_join_form_srl');
|
||||
|
||||
$args->column_type = Context::get('column_type');
|
||||
|
|
@ -202,7 +197,7 @@
|
|||
$args->required = Context::get('required');
|
||||
if(!in_array(strtoupper($args->required), array('Y','N'))) $args->required = 'N';
|
||||
$args->description = Context::get('description');
|
||||
$args->list_order = $oDB->getNextSequence();
|
||||
$args->list_order = getNextSequence();
|
||||
|
||||
// 기본값의 정리
|
||||
if(in_array($args->column_type, array('checkbox','select')) && count($args->default_value) ) {
|
||||
|
|
@ -212,8 +207,8 @@
|
|||
}
|
||||
|
||||
// member_join_form_srl이 있으면 수정, 없으면 추가
|
||||
if(!$args->member_join_form_srl) $output = $oDB->executeQuery('member.insertJoinForm', $args);
|
||||
else $output = $oDB->executeQuery('member.updateJoinForm', $args);
|
||||
if(!$args->member_join_form_srl) $output = executeQuery('member.insertJoinForm', $args);
|
||||
else $output = executeQuery('member.updateJoinForm', $args);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
|
@ -502,15 +497,12 @@
|
|||
$member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address);
|
||||
if($member_srl) return new Object(-1,'msg_exists_email_address');
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// DB에 입력
|
||||
$args->member_srl = $oDB->getNextSequence();
|
||||
$args->member_srl = getNextSequence();
|
||||
if($args->password) $args->password = md5($args->password);
|
||||
else unset($args->password);
|
||||
|
||||
$output = $oDB->executeQuery('member.insertMember', $args);
|
||||
$output = executeQuery('member.insertMember', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 입력된 그룹 값이 없으면 기본 그룹의 값을 등록
|
||||
|
|
@ -561,14 +553,11 @@
|
|||
$member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address);
|
||||
if($member_srl&&$args->member_srl!=$member_srl) return new Object(-1,'msg_exists_email_address');
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// DB에 update
|
||||
if($args->password) $args->password = md5($args->password);
|
||||
else $args->password = $member_info->password;
|
||||
|
||||
$output = $oDB->executeQuery('member.updateMember', $args);
|
||||
$output = executeQuery('member.updateMember', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 그룹 정보가 있으면 그룹 정보를 변경
|
||||
|
|
@ -576,7 +565,7 @@
|
|||
$group_srl_list = explode('|@|', $args->group_srl_list);
|
||||
|
||||
// 일단 해당 회원의 모든 그룹 정보를 삭제
|
||||
$output = $oDB->executeQuery('member.deleteMemberGroupMember', $args);
|
||||
$output = executeQuery('member.deleteMemberGroupMember', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 하나 하나 루프를 돌면서 입력
|
||||
|
|
@ -605,16 +594,13 @@
|
|||
// 관리자의 경우 삭제 불가능
|
||||
if($member_info->is_admin == 'Y') return new Object(-1, 'msg_cannot_delete_admin');
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// member_group_member에서 해당 항목들 삭제
|
||||
$args->member_srl = $member_srl;
|
||||
$output = $oDB->executeQuery('member.deleteMemberGroupMember', $args);
|
||||
$output = executeQuery('member.deleteMemberGroupMember', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// member 테이블에서 삭제
|
||||
return $oDB->executeQuery('member.deleteMember', $args);
|
||||
return executeQuery('member.deleteMember', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -624,57 +610,47 @@
|
|||
$args->member_srl = $member_srl;
|
||||
$args->group_srl = $group_srl;
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 추가
|
||||
return $oDB->executeQuery('member.addMemberToGroup',$args);
|
||||
return executeQuery('member.addMemberToGroup',$args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원의 그룹값을 변경
|
||||
**/
|
||||
function changeGroup($source_group_srl, $target_group_srl) {
|
||||
// DB객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->source_group_srl = $source_group_srl;
|
||||
$args->target_group_srl = $target_group_srl;
|
||||
|
||||
return $oDB->executeQuery('member.changeGroup', $args);
|
||||
return executeQuery('member.changeGroup', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 그룹 등록
|
||||
**/
|
||||
function insertGroup($args) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// is_default값을 체크, Y일 경우 일단 모든 is_default에 대해서 N 처리
|
||||
if($args->is_default!='Y') {
|
||||
$args->is_default = 'N';
|
||||
} else {
|
||||
$output = $oDB->executeQuery('member.updateGroupDefaultClear');
|
||||
$output = executeQuery('member.updateGroupDefaultClear');
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
return $oDB->executeQuery('member.insertGroup', $args);
|
||||
return executeQuery('member.insertGroup', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 그룹 정보 수정
|
||||
**/
|
||||
function updateGroup($args) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// is_default값을 체크, Y일 경우 일단 모든 is_default에 대해서 N 처리
|
||||
if($args->is_default!='Y') $args->is_default = 'N';
|
||||
else {
|
||||
$output = $oDB->executeQuery('member.updateGroupDefaultClear');
|
||||
$output = executeQuery('member.updateGroupDefaultClear');
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
return $oDB->executeQuery('member.updateGroup', $args);
|
||||
return executeQuery('member.updateGroup', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -697,43 +673,35 @@
|
|||
// default_group_srl로 변경
|
||||
$this->changeGroup($group_srl, $default_group_srl);
|
||||
|
||||
// 그룹 삭제
|
||||
$oDB = &DB::getInstance();
|
||||
$args->group_srl = $group_srl;
|
||||
return $oDB->executeQuery('member.deleteGroup', $args);
|
||||
return executeQuery('member.deleteGroup', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지아이디 등록
|
||||
**/
|
||||
function insertDeniedID($user_id, $desription = '') {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->user_id = $user_id;
|
||||
$args->description = $description;
|
||||
$args->list_order = -1*$oDB->getNextSequence();
|
||||
$args->list_order = -1*getNextSequence();
|
||||
|
||||
return $oDB->executeQuery('member.insertDeniedID', $args);
|
||||
return executeQuery('member.insertDeniedID', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 금지아이디 삭제
|
||||
**/
|
||||
function deleteDeniedID($user_id) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->user_id = $user_id;
|
||||
return $oDB->executeQuery('member.deleteDeniedID', $args);
|
||||
return executeQuery('member.deleteDeniedID', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 가입폼 항목을 삭제
|
||||
**/
|
||||
function deleteJoinForm($member_join_form_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->member_join_form_srl = $member_join_form_srl;
|
||||
$output = $oDB->executeQuery('member.deleteJoinForm', $args);
|
||||
$output = executeQuery('member.deleteJoinForm', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -741,13 +709,11 @@
|
|||
* @brief 가입항목을 상단으로 이동
|
||||
**/
|
||||
function moveJoinFormUp($member_join_form_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$oMemberModel = &getModel('member');
|
||||
|
||||
// 선택된 가입항목의 정보를 구한다
|
||||
$args->member_join_form_srl = $member_join_form_srl;
|
||||
$output = $oDB->executeQuery('member.getJoinForm', $args);
|
||||
$output = executeQuery('member.getJoinForm', $args);
|
||||
|
||||
$join_form = $output->data;
|
||||
$list_order = $join_form->list_order;
|
||||
|
|
@ -775,10 +741,10 @@
|
|||
$prev_args->list_order = $list_order;
|
||||
|
||||
// DB 처리
|
||||
$output = $oDB->executeQuery('member.updateMemberJoinFormListorder', $cur_args);
|
||||
$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$oDB->executeQuery('member.updateMemberJoinFormListorder', $prev_args);
|
||||
executeQuery('member.updateMemberJoinFormListorder', $prev_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return new Object();
|
||||
|
|
@ -788,13 +754,11 @@
|
|||
* @brief 가입항목을 하단으로 이동
|
||||
**/
|
||||
function moveJoinFormDown($member_join_form_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$oMemberModel = &getModel('member');
|
||||
|
||||
// 선택된 가입항목의 정보를 구한다
|
||||
$args->member_join_form_srl = $member_join_form_srl;
|
||||
$output = $oDB->executeQuery('member.getJoinForm', $args);
|
||||
$output = executeQuery('member.getJoinForm', $args);
|
||||
|
||||
$join_form = $output->data;
|
||||
$list_order = $join_form->list_order;
|
||||
|
|
@ -823,10 +787,10 @@
|
|||
$next_args->list_order = $list_order;
|
||||
|
||||
// DB 처리
|
||||
$output = $oDB->executeQuery('member.updateMemberJoinFormListorder', $cur_args);
|
||||
$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$output = $oDB->executeQuery('member.updateMemberJoinFormListorder', $next_args);
|
||||
$output = executeQuery('member.updateMemberJoinFormListorder', $next_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return new Object();
|
||||
|
|
|
|||
|
|
@ -99,11 +99,8 @@
|
|||
**/
|
||||
function getMemberInfoByUserID($user_id) {
|
||||
if(!$this->member_info[$member_srl]) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->user_id = $user_id;
|
||||
$output = $oDB->executeQuery('member.getMemberInfo', $args);
|
||||
$output = executeQuery('member.getMemberInfo', $args);
|
||||
if(!$output) return $output;
|
||||
|
||||
$member_info = $this->arrangeMemberInfo($output->data);
|
||||
|
|
@ -119,11 +116,8 @@
|
|||
**/
|
||||
function getMemberInfoByMemberSrl($member_srl) {
|
||||
if(!$this->member_info[$member_srl]) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->member_srl = $member_srl;
|
||||
$output = $oDB->executeQuery('member.getMemberInfoByMemberSrl', $args);
|
||||
$output = executeQuery('member.getMemberInfoByMemberSrl', $args);
|
||||
if(!$output) return $output;
|
||||
|
||||
$member_info = $this->arrangeMemberInfo($output->data);
|
||||
|
|
@ -155,11 +149,8 @@
|
|||
* @brief userid에 해당하는 member_srl을 구함
|
||||
**/
|
||||
function getMemberSrlByUserID($user_id) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->user_id = $user_id;
|
||||
$output = $oDB->executeQuery('member.getMemberSrl', $args);
|
||||
$output = executeQuery('member.getMemberSrl', $args);
|
||||
return $output->data->member_srl;
|
||||
}
|
||||
|
||||
|
|
@ -167,11 +158,8 @@
|
|||
* @brief userid에 해당하는 member_srl을 구함
|
||||
**/
|
||||
function getMemberSrlByEmailAddress($email_address) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->email_address = $email_address;
|
||||
$output = $oDB->executeQuery('member.getMemberSrl', $args);
|
||||
$output = executeQuery('member.getMemberSrl', $args);
|
||||
return $output->data->member_srl;
|
||||
}
|
||||
|
||||
|
|
@ -179,11 +167,8 @@
|
|||
* @brief userid에 해당하는 member_srl을 구함
|
||||
**/
|
||||
function getMemberSrlByNickName($nick_name) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->nick_name = $nick_name;
|
||||
$output = $oDB->executeQuery('member.getMemberSrl', $args);
|
||||
$output = executeQuery('member.getMemberSrl', $args);
|
||||
return $output->data->member_srl;
|
||||
}
|
||||
|
||||
|
|
@ -208,9 +193,6 @@
|
|||
* @brief 회원 목록을 구함
|
||||
**/
|
||||
function getMemberList() {
|
||||
// 등록된 member 모듈을 불러와 세팅
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 검색 옵션 정리
|
||||
$args->is_admin = Context::get('is_admin')=='Y'?'Y':'';
|
||||
$args->is_denied = Context::get('is_denied')=='Y'?'Y':'';
|
||||
|
|
@ -259,7 +241,7 @@
|
|||
$args->page = Context::get('page');
|
||||
$args->list_count = 40;
|
||||
$args->page_count = 10;
|
||||
return $oDB->executeQuery($query_id, $args);
|
||||
return executeQuery($query_id, $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -267,11 +249,8 @@
|
|||
**/
|
||||
function getMemberGroups($member_srl) {
|
||||
if(!$this->member_groups[$member_srl]) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->member_srl = $member_srl;
|
||||
$output = $oDB->executeQuery('member.getMemberGroups', $args);
|
||||
$output = executeQuery('member.getMemberGroups', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
$group_list = $output->data;
|
||||
|
|
@ -289,10 +268,7 @@
|
|||
* @brief 기본 그룹을 가져옴
|
||||
**/
|
||||
function getDefaultGroup() {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$output = $oDB->executeQuery('member.getDefaultGroup');
|
||||
$output = executeQuery('member.getDefaultGroup');
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
|
|
@ -300,11 +276,8 @@
|
|||
* @brief group_srl에 해당하는 그룹 정보 가져옴
|
||||
**/
|
||||
function getGroup($group_srl) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->group_srl = $group_srl;
|
||||
$output = $oDB->executeQuery('member.getGroup', $args);
|
||||
$output = executeQuery('member.getGroup', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
|
|
@ -312,10 +285,7 @@
|
|||
* @brief 그룹 목록을 가져옴
|
||||
**/
|
||||
function getGroups() {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$output = $oDB->executeQuery('member.getGroups');
|
||||
$output = executeQuery('member.getGroups');
|
||||
if(!$output->data) return;
|
||||
|
||||
$group_list = $output->data;
|
||||
|
|
@ -338,12 +308,9 @@
|
|||
global $lang;
|
||||
|
||||
if(!$this->join_form_list) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// list_order 컬럼의 정렬을 위한 인자 세팅
|
||||
$args->sort_index = "list_order";
|
||||
$output = $oDB->executeQuery('member.getJoinFormList', $args);
|
||||
$output = executeQuery('member.getJoinFormList', $args);
|
||||
|
||||
// 결과 데이터가 없으면 NULL return
|
||||
$join_form_list = $output->data;
|
||||
|
|
@ -430,10 +397,8 @@
|
|||
* @brief 한개의 가입항목을 가져옴
|
||||
**/
|
||||
function getJoinForm($member_join_form_srl) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
$args->member_join_form_srl = $member_join_form_srl;
|
||||
$output = $oDB->executeQuery('member.getJoinForm', $args);
|
||||
$output = executeQuery('member.getJoinForm', $args);
|
||||
$join_form = $output->data;
|
||||
if(!$join_form) return NULL;
|
||||
|
||||
|
|
@ -454,15 +419,12 @@
|
|||
**/
|
||||
function getDeniedIDList() {
|
||||
if(!$this->denied_id_list) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->sort_index = "list_order";
|
||||
$args->page = Context::get('page');
|
||||
$args->list_count = 40;
|
||||
$args->page_count = 10;
|
||||
|
||||
$output = $oDB->executeQuery('member.getDeniedIDList', $args);
|
||||
$output = executeQuery('member.getDeniedIDList', $args);
|
||||
$this->denied_id_list = $output;
|
||||
}
|
||||
return $this->denied_id_list;
|
||||
|
|
@ -472,11 +434,8 @@
|
|||
* @brief 금지 아이디인지 확인
|
||||
**/
|
||||
function isDeniedID($user_id) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->user_id = $user_id;
|
||||
$output = $oDB->executeQuery('member.chkDeniedID', $args);
|
||||
$output = executeQuery('member.chkDeniedID', $args);
|
||||
if($output->data->count) return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,10 +17,8 @@
|
|||
* @brief 모듈 카테고리 추가
|
||||
**/
|
||||
function procModuleAdminInsertCategory() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->title = Context::get('title');
|
||||
$output = $oDB->executeQuery('module.insertModuleCategory', $args);
|
||||
$output = executeQuery('module.insertModuleCategory', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage("success_registed");
|
||||
|
|
@ -51,10 +49,8 @@
|
|||
* @brief 기본 모듈 생성
|
||||
**/
|
||||
function makeDefaultModule() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 설치된 기본 모듈이 있는지 확인
|
||||
$output = $oDB->executeQuery('module.getDefaultMidInfo');
|
||||
$output = executeQuery('module.getDefaultMidInfo');
|
||||
if($output->data) return;
|
||||
|
||||
// 기본 데이터 세팅
|
||||
|
|
@ -76,17 +72,14 @@
|
|||
$args->module = $module;
|
||||
$args->config = serialize($config);
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 일단 삭제 (캐쉬 파일도 지운다)
|
||||
$output = $oDB->executeQuery('module.deleteModuleConfig', $args);
|
||||
$output = executeQuery('module.deleteModuleConfig', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
@unlink( sprintf('./files/cache/module_info/%s.config.php',$module) );
|
||||
|
||||
// 변수 정리후 query 실행
|
||||
$output = $oDB->executeQuery('module.insertModuleConfig', $args);
|
||||
$output = executeQuery('module.insertModuleConfig', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -102,13 +95,10 @@
|
|||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $args->skin);
|
||||
$skin_vars->colorset = $skin_info->colorset[0]->name;
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 변수 정리후 query 실행
|
||||
$args->module_srl = $oDB->getNextSequence();
|
||||
$args->module_srl = getNextSequence();
|
||||
$args->skin_vars = serialize($skin_vars);
|
||||
$output = $oDB->executeQuery('module.insertModule', $args);
|
||||
$output = executeQuery('module.insertModule', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$output->add('module_srl',$args->module_srl);
|
||||
|
|
@ -119,9 +109,7 @@
|
|||
* @brief 모듈의 정보를 수정
|
||||
**/
|
||||
function updateModule($args) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$output = $oDB->executeQuery('module.updateModule', $args);
|
||||
$output = executeQuery('module.updateModule', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$output->add('module_srl',$args->module_srl);
|
||||
|
|
@ -138,8 +126,7 @@
|
|||
$args->type = $type;
|
||||
$args->act = $act;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('module.insertActionFoward', $args);
|
||||
$output = executeQuery('module.insertActionFoward', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -147,12 +134,10 @@
|
|||
* @brief 모듈의 기타 정보를 변경
|
||||
**/
|
||||
function updateModuleSkinVars($module_srl, $skin_vars) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// skin_vars 정보 세팅
|
||||
$args->module_srl = $module_srl;
|
||||
$args->skin_vars = $skin_vars;
|
||||
$output = $oDB->executeQuery('module.updateModuleSkinVars', $args);
|
||||
$output = executeQuery('module.updateModuleSkinVars', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
|
|
@ -162,11 +147,9 @@
|
|||
* @brief 모듈의 권한 정보 변경
|
||||
**/
|
||||
function updateModuleGrant($module_srl, $grants) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$args->grants = $grants;
|
||||
$output = $oDB->executeQuery('module.updateModuleGrant', $args);
|
||||
$output = executeQuery('module.updateModuleGrant', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
|
|
@ -178,8 +161,6 @@
|
|||
* 모듈 삭제시는 관련 정보들을 모두 삭제 시도한다.
|
||||
**/
|
||||
function deleteModule($module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
|
||||
// addon 삭제
|
||||
|
|
@ -216,7 +197,7 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
// module 정보를 DB에서 삭제
|
||||
$output = $oDB->executeQuery('module.deleteModule', $args);
|
||||
$output = executeQuery('module.deleteModule', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -225,9 +206,7 @@
|
|||
* @brief 모든 모듈의 is_default값을 N 으로 세팅 (기본 모듈 해제)
|
||||
**/
|
||||
function clearDefaultModule() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$output = $oDB->executeQuery('module.clearDefaultModule');
|
||||
$output = executeQuery('module.clearDefaultModule');
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
|
|
@ -237,21 +216,17 @@
|
|||
* @brief 모듈 카테고리의 제목 변경
|
||||
**/
|
||||
function doUpdateModuleCategory() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->title = Context::get('title');
|
||||
$args->module_category_srl = Context::get('module_category_srl');
|
||||
return $oDB->executeQuery('module.updateModuleCategory', $args);
|
||||
return executeQuery('module.updateModuleCategory', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 카테고리 삭제
|
||||
**/
|
||||
function doDeleteModuleCategory() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_category_srl = Context::get('module_category_srl');
|
||||
return $oDB->executeQuery('module.deleteModuleCategory', $args);
|
||||
return executeQuery('module.deleteModuleCategory', $args);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,12 +19,9 @@
|
|||
* 이 경우는 캐시파일을 이용할 수가 없음
|
||||
**/
|
||||
function getModuleInfoByDocumentSrl($document_srl) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 DB에서 가져옴
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('module.getModuleInfoByDocument', $args);
|
||||
$output = executeQuery('module.getModuleInfoByDocument', $args);
|
||||
|
||||
return $this->arrangeModuleInfo($output->data);
|
||||
}
|
||||
|
|
@ -33,18 +30,15 @@
|
|||
* @brief mid로 모듈의 정보를 구함
|
||||
**/
|
||||
function getModuleInfoByMid($mid='') {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// $mid값이 인자로 주어질 경우 $mid로 모듈의 정보를 구함
|
||||
if($mid) {
|
||||
$args->mid = $mid;
|
||||
$output = $oDB->executeQuery('module.getMidInfo', $args);
|
||||
$output = executeQuery('module.getMidInfo', $args);
|
||||
}
|
||||
|
||||
// 모듈의 정보가 없다면($mid가 잘못이거나 없었을 경우) 기본 모듈을 가져옴
|
||||
if(!$output->data) {
|
||||
$output = $oDB->executeQuery('module.getDefaultMidInfo');
|
||||
$output = executeQuery('module.getDefaultMidInfo');
|
||||
}
|
||||
$module_info = $this->arrangeModuleInfo($output->data);
|
||||
|
||||
|
|
@ -55,12 +49,9 @@
|
|||
* @brief module_srl에 해당하는 모듈의 정보를 구함
|
||||
**/
|
||||
function getModuleInfoByModuleSrl($module_srl) {
|
||||
// db객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 가져옴
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('module.getMidInfo', $args);
|
||||
$output = executeQuery('module.getMidInfo', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
$module_info = $this->arrangeModuleInfo($output->data);
|
||||
|
|
@ -122,8 +113,7 @@
|
|||
* @brief DB에 생성된 mid목록을 구해옴
|
||||
**/
|
||||
function getMidList() {
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('module.getMidList');
|
||||
$output = executeQuery('module.getMidList');
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$list = $output->data;
|
||||
|
|
@ -140,9 +130,8 @@
|
|||
**/
|
||||
function getModuleSrlByMid($mid) {
|
||||
if(is_array($mid)) $mid = "'".implode("','",$mid)."'";
|
||||
$oDB = &DB::getInstance();
|
||||
$args->mid = $mid;
|
||||
$output = $oDB->executeQuery('module.getModuleSrlByMid', $args);
|
||||
$output = executeQuery('module.getModuleSrlByMid', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$list = $output->data;
|
||||
|
|
@ -367,10 +356,8 @@
|
|||
$cache_file = sprintf('./files/cache/module_info/%s.config.php',$module);
|
||||
|
||||
if(!file_exists($cache_file)) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module = $module;
|
||||
$output = $oDB->executeQuery('module.getModuleConfig', $args);
|
||||
$output = executeQuery('module.getModuleConfig', $args);
|
||||
|
||||
$config = base64_encode($output->data->config);
|
||||
|
||||
|
|
@ -439,11 +426,8 @@
|
|||
* @brief 모듈 카테고리의 목록을 구함
|
||||
**/
|
||||
function getModuleCategories() {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 DB에서 가져옴
|
||||
$output = $oDB->executeQuery('module.getModuleCategories');
|
||||
$output = executeQuery('module.getModuleCategories');
|
||||
if(!$output->toBool()) return $output;
|
||||
$list = $output->data;
|
||||
if(!$list) return;
|
||||
|
|
@ -459,12 +443,9 @@
|
|||
* @brief 특정 모듈 카테고리의 내용을 구함
|
||||
**/
|
||||
function getModuleCategory($module_category_srl) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 DB에서 가져옴
|
||||
$args->module_category_srl = $module_category_srl;
|
||||
$output = $oDB->executeQuery('module.getModuleCategory', $args);
|
||||
$output = executeQuery('module.getModuleCategory', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
return $output->data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,14 +53,12 @@
|
|||
* @brief 페이지 관리 목록 보여줌
|
||||
**/
|
||||
function dispPageAdminContent() {
|
||||
// 등록된 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('page.getPageList', $args);
|
||||
$output = executeQuery('page.getPageList', $args);
|
||||
|
||||
// 템플릿에 쓰기 위해서 context::set
|
||||
Context::set('total_count', $output->total_count);
|
||||
|
|
@ -143,10 +141,7 @@
|
|||
}
|
||||
|
||||
// module_srl이 없으면 sequence값으로 미리 구해 놓음
|
||||
if(!$module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$module_srl = $oDB->getNextSequence();
|
||||
}
|
||||
if(!$module_srl) $module_srl = getNextSequence();
|
||||
Context::set('module_srl',$module_srl);
|
||||
|
||||
// 플러그인 목록을 세팅
|
||||
|
|
|
|||
|
|
@ -64,9 +64,8 @@
|
|||
* 등록된 IP는 스패머로 간주
|
||||
**/
|
||||
function insertIP($ipaddress) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->ipaddress = $ipaddress;
|
||||
return $oDB->executeQuery('spamfilter.insertDeniedIP', $args);
|
||||
return executeQuery('spamfilter.insertDeniedIP', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -76,9 +75,8 @@
|
|||
function deleteIP($ipaddress) {
|
||||
if(!$ipaddress) return;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$args->ipaddress = $ipaddress;
|
||||
return $oDB->executeQuery('spamfilter.deleteDeniedIP', $args);
|
||||
return executeQuery('spamfilter.deleteDeniedIP', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -88,9 +86,8 @@
|
|||
function insertWord($word) {
|
||||
if(!$word) return;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$args->word = $word;
|
||||
return $oDB->executeQuery('spamfilter.insertDeniedWord', $args);
|
||||
return executeQuery('spamfilter.insertDeniedWord', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -100,9 +97,8 @@
|
|||
function deleteWord($word) {
|
||||
if(!$word) return;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$args->word = $word;
|
||||
return $oDB->executeQuery('spamfilter.deleteDeniedWord', $args);
|
||||
return executeQuery('spamfilter.deleteDeniedWord', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -111,8 +107,7 @@
|
|||
* 스패머로 등록할 수 있음
|
||||
**/
|
||||
function insertLog() {
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('spamfilter.insertLog');
|
||||
$output = executeQuery('spamfilter.insertLog');
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,9 @@
|
|||
* @brief 등록된 금지 IP의 목록을 return
|
||||
**/
|
||||
function getDeniedIPList() {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->sort_index = "regdate";
|
||||
$args->page = Context::get('page')?Context::get('page'):1;
|
||||
$output = $oDB->executeQuery('spamfilter.getDeniedIPList', $args);
|
||||
$output = executeQuery('spamfilter.getDeniedIPList', $args);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) return array($output->data);
|
||||
return $output->data;
|
||||
|
|
@ -39,9 +38,8 @@
|
|||
* @brief 인자로 넘겨진 ipaddress가 금지 ip인지 체크하여 return
|
||||
**/
|
||||
function isDeniedIP($ipaddress) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->ipaddress = $ipaddress;
|
||||
$output = $oDB->executeQuery('spamfilter.isDeniedIP', $args);
|
||||
$output = executeQuery('spamfilter.isDeniedIP', $args);
|
||||
if($output->data->count>0) return true;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -50,9 +48,8 @@
|
|||
* @brief 등록된 금지 Word 의 목록을 return
|
||||
**/
|
||||
function getDeniedWordList() {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->sort_index = "regdate";
|
||||
$output = $oDB->executeQuery('spamfilter.getDeniedWordList', $args);
|
||||
$output = executeQuery('spamfilter.getDeniedWordList', $args);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) return array($output->data);
|
||||
return $output->data;
|
||||
|
|
@ -64,10 +61,9 @@
|
|||
function getLogCount($time = 60, $ipaddress='') {
|
||||
if(!$ipaddress) $ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$args->ipaddress = $ipaddress;
|
||||
$args->regdate = date("YmdHis", time()-$time);
|
||||
$output = $oDB->executeQuery('spamfilter.getLogCount', $args);
|
||||
$output = executeQuery('spamfilter.getLogCount', $args);
|
||||
$count = $output->data->count;
|
||||
return $count;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,16 +33,13 @@
|
|||
}
|
||||
if(!count($tag_list)) return;
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 다시 태그를 입력
|
||||
$args->module_srl = $module_srl;
|
||||
$args->document_srl = $document_srl;
|
||||
$tag_count = count($tag_list);
|
||||
for($i=0;$i<$tag_count;$i++) {
|
||||
$args->tag = $tag_list[$i];
|
||||
$oDB->executeQuery('tag.insertTag', $args);
|
||||
executeQuery('tag.insertTag', $args);
|
||||
}
|
||||
|
||||
return implode(',',$tag_list);
|
||||
|
|
@ -52,22 +49,16 @@
|
|||
* @brief 특정 문서의 태그 삭제
|
||||
**/
|
||||
function deleteTag($document_srl) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
return $oDB->executeQuery('tag.deleteTag', $args);
|
||||
return executeQuery('tag.deleteTag', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 태그 삭제
|
||||
**/
|
||||
function deleteModuleTags($module_srl) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
return $oDB->executeQuery('tag.deleteModuleTags', $args);
|
||||
return executeQuery('tag.deleteModuleTags', $args);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -60,10 +60,9 @@
|
|||
$obj->excerpt = strip_tags($obj->excerpt);
|
||||
|
||||
// 엮인글를 입력
|
||||
$oDB = &DB::getInstance();
|
||||
$obj->list_order = $obj->trackback_srl = $oDB->getNextSequence();
|
||||
$obj->list_order = $obj->trackback_srl = getNextSequence();
|
||||
$obj->module_srl = $document->module_srl;
|
||||
$output = $oDB->executeQuery('trackback.insertTrackback', $obj);
|
||||
$output = executeQuery('trackback.insertTrackback', $obj);
|
||||
|
||||
// 입력에 이상이 없으면 해당 글의 엮인글 수를 올림
|
||||
if(!$output->toBool()) $oTrackbackView->dispMessage(-1, 'fail');
|
||||
|
|
@ -103,10 +102,8 @@
|
|||
// 권한이 있는지 확인
|
||||
if(!$is_admin && !$oDocumentModel->isGranted($document_srl)) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 삭제
|
||||
$oDB = &DB::getInstance();
|
||||
$args->trackback_srl = $trackback_srl;
|
||||
$output = $oDB->executeQuery('trackback.deleteTrackback', $args);
|
||||
$output = executeQuery('trackback.deleteTrackback', $args);
|
||||
if(!$output->toBool()) return new Object(-1, 'msg_error_occured');
|
||||
|
||||
// 엮인글 수를 구해서 업데이트
|
||||
|
|
@ -126,12 +123,9 @@
|
|||
* @brief 글에 속한 모든 트랙백 삭제
|
||||
**/
|
||||
function deleteTrackbacks($document_srl) {
|
||||
// DB객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 삭제
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('trackback.deleteTrackbacks', $args);
|
||||
$output = executeQuery('trackback.deleteTrackbacks', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -140,12 +134,9 @@
|
|||
* @brief 모듈에 속한 모든 트랙백 삭제
|
||||
**/
|
||||
function deleteModuleTrackbacks($module_srl) {
|
||||
// DB객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 삭제
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('trackback.deleteModuleTrackbacks', $args);
|
||||
$output = executeQuery('trackback.deleteModuleTrackbacks', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,20 +17,16 @@
|
|||
* @brief 하나의 트랙백 정보를 구함
|
||||
**/
|
||||
function getTrackback($trackback_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->trackback_srl = $trackback_srl;
|
||||
return $oDB->executeQuery('trackback.getTrackback', $args);
|
||||
return executeQuery('trackback.getTrackback', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief document_srl 에 해당하는 엮인글의 전체 갯수를 가져옴
|
||||
**/
|
||||
function getTrackbackCount($document_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('trackback.getTrackbackCount', $args);
|
||||
$output = executeQuery('trackback.getTrackbackCount', $args);
|
||||
$total_count = $output->data->count;
|
||||
|
||||
return (int)$total_count;
|
||||
|
|
@ -41,11 +37,9 @@
|
|||
* spamfilter 에서 사용할 method임
|
||||
**/
|
||||
function getTrackbackCountByIPAddress($document_srl, $ipaddress) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
$args->ipaddress = $ipaddress;
|
||||
$output = $oDB->executeQuery('trackback.getTrackbackCountByIPAddress', $args);
|
||||
$output = executeQuery('trackback.getTrackbackCountByIPAddress', $args);
|
||||
$total_count = $output->data->count;
|
||||
|
||||
return (int)$total_count;
|
||||
|
|
@ -55,11 +49,9 @@
|
|||
* @brief 특정 문서에 속한 엮인글의 목록을 가져옴
|
||||
**/
|
||||
function getTrackbackList($document_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
$args->list_order = 'list_order';
|
||||
$output = $oDB->executeQuery('trackback.getTrackbackList', $args);
|
||||
$output = executeQuery('trackback.getTrackbackList', $args);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
|
@ -74,10 +66,6 @@
|
|||
* @brief 모든 엮인글를 시간 역순으로 가져옴 (관리자용)
|
||||
**/
|
||||
function getTotalTrackbackList($obj) {
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 검색 옵션 정리
|
||||
$search_target = trim(Context::get('search_target'));
|
||||
$search_keyword = trim(Context::get('search_keyword'));
|
||||
|
|
@ -117,7 +105,7 @@
|
|||
$args->page_count = $obj->page_count?$obj->page_count:10;
|
||||
|
||||
// trackback.getTotalTrackbackList 쿼리 실행
|
||||
$output = $oDB->executeQuery('trackback.getTotalTrackbackList', $args);
|
||||
$output = executeQuery('trackback.getTotalTrackbackList', $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
|
|
|||
|
|
@ -36,9 +36,8 @@
|
|||
if(!in_array($module_srl, $module_srl_list)) $module_srl_list[] = $module_srl;
|
||||
}
|
||||
if(count($module_srl_list)) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = $oDB->executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
$mid_output = executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
if($mid_output->data && !is_array($mid_output->data)) $mid_output->data = array($mid_output->data);
|
||||
for($i=0;$i<count($mid_output->data);$i++) {
|
||||
$mid_info = $mid_output->data[$i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue