mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 16:19:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@838 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d4880e4b96
commit
3aeb57a11c
7 changed files with 44 additions and 74 deletions
|
|
@ -92,9 +92,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// act값에 admin이 들어 있는데 관리자가 아닌 경우 오류 표시
|
// act값에 admin이 들어 있는데 관리자가 아닌 경우 오류 표시
|
||||||
if(!$grant->is_admin && eregi('admin', $this->act)) {
|
if(!$grant->is_admin && substr_count($this->act, 'Admin')) return $this->stop('msg_not_permitted_act');
|
||||||
return $this->stop('msg_not_permitted_act');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 권한 설정
|
// 권한 설정
|
||||||
if($xml_info->grant) {
|
if($xml_info->grant) {
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,15 @@
|
||||||
return $oDB->executeQuery($query_id, $args);
|
return $oDB->executeQuery($query_id, $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DB::getNextSequence() 의 alias
|
||||||
|
* @return big int
|
||||||
|
**/
|
||||||
|
function getNextSequence() {
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
return $oDB->getNextSequence();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Context::getUrl($args_list)를 쓰기 쉽게 함수로 선언
|
* @brief Context::getUrl($args_list)를 쓰기 쉽게 함수로 선언
|
||||||
* @return string
|
* @return string
|
||||||
|
|
@ -210,4 +219,11 @@
|
||||||
if($no >= $mod) $output .= getNumberingPath((int)$no/$mod, $size);
|
if($no >= $mod) $output .= getNumberingPath((int)$no/$mod, $size);
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 한글이 들어간 url의 decode
|
||||||
|
**/
|
||||||
|
function url_decode($str) {
|
||||||
|
return ereg_replace('%u([[:alnum:]]{4})', '&#x\1;',$str);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,11 @@
|
||||||
$msg_code = 'success_registed';
|
$msg_code = 'success_registed';
|
||||||
$obj->document_srl = $output->get('document_srl');
|
$obj->document_srl = $output->get('document_srl');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 오류 발생시 멈춤
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
// 트랙백 발송
|
// 트랙백이 있으면 트랙백 발송
|
||||||
$trackback_url = Context::get('trackback_url');
|
$trackback_url = Context::get('trackback_url');
|
||||||
$trackback_charset = Context::get('trackback_charset');
|
$trackback_charset = Context::get('trackback_charset');
|
||||||
if($trackback_url) {
|
if($trackback_url) {
|
||||||
|
|
@ -52,8 +54,11 @@
|
||||||
$oTrackbackController->sendTrackback($obj, $trackback_url, $trackback_charset);
|
$oTrackbackController->sendTrackback($obj, $trackback_url, $trackback_charset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 결과를 리턴
|
||||||
$this->add('mid', Context::get('mid'));
|
$this->add('mid', Context::get('mid'));
|
||||||
$this->add('document_srl', $output->get('document_srl'));
|
$this->add('document_srl', $output->get('document_srl'));
|
||||||
|
|
||||||
|
// 성공 메세지 등록
|
||||||
$this->setMessage($msg_code);
|
$this->setMessage($msg_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,6 +68,8 @@
|
||||||
function procBoardDeleteDocument() {
|
function procBoardDeleteDocument() {
|
||||||
// 문서 번호 확인
|
// 문서 번호 확인
|
||||||
$document_srl = Context::get('document_srl');
|
$document_srl = Context::get('document_srl');
|
||||||
|
|
||||||
|
// 문서 번호가 없다면 오류 발생
|
||||||
if(!$document_srl) return $this->doError('msg_invalid_document');
|
if(!$document_srl) return $this->doError('msg_invalid_document');
|
||||||
|
|
||||||
// document module model 객체 생성
|
// document module model 객체 생성
|
||||||
|
|
@ -72,6 +79,7 @@
|
||||||
$output = $oDocumentController->deleteDocument($document_srl, $this->grant->manager);
|
$output = $oDocumentController->deleteDocument($document_srl, $this->grant->manager);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
|
// 성공 메세지 등록
|
||||||
$this->add('mid', Context::get('mid'));
|
$this->add('mid', Context::get('mid'));
|
||||||
$this->add('page', $output->get('page'));
|
$this->add('page', $output->get('page'));
|
||||||
$this->setMessage('success_deleted');
|
$this->setMessage('success_deleted');
|
||||||
|
|
@ -143,7 +151,6 @@
|
||||||
$comment_srl = Context::get('comment_srl');
|
$comment_srl = Context::get('comment_srl');
|
||||||
if(!$comment_srl) return $this->doError('msg_invalid_request');
|
if(!$comment_srl) return $this->doError('msg_invalid_request');
|
||||||
|
|
||||||
// 삭제
|
|
||||||
// comment 모듈의 controller 객체 생성
|
// comment 모듈의 controller 객체 생성
|
||||||
$oCommentController = &getController('comment');
|
$oCommentController = &getController('comment');
|
||||||
|
|
||||||
|
|
@ -324,8 +331,7 @@
|
||||||
$oModuleController = &getController('module');
|
$oModuleController = &getController('module');
|
||||||
$oModuleController->updateModuleSkinVars($module_srl, $skin_vars);
|
$oModuleController->updateModuleSkinVars($module_srl, $skin_vars);
|
||||||
|
|
||||||
$url = sprintf("./?module=admin&mo=board&module_srl=%s&act=dispAdminSkinInfo&page=%s", $module_srl, Context::get('page'));
|
print "<script type=\"text/javascript\">top.location.href=top.location.href;</script>";
|
||||||
print "<script type=\"text/javascript\">location.href=\"".$url."\";</script>";
|
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,12 @@
|
||||||
* board 모듈은 일반 사용과 관리자용으로 나누어진다.\n
|
* board 모듈은 일반 사용과 관리자용으로 나누어진다.\n
|
||||||
**/
|
**/
|
||||||
function init() {
|
function init() {
|
||||||
|
if(substr_count($this->act, 'Admin')) $this->initAdmin();
|
||||||
|
else $this->initNormal();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 관리자 기능 호출시에 관련 정보들 세팅해줌
|
* @brief 관리자 act 호출시에 관련 정보들 세팅해줌
|
||||||
**/
|
**/
|
||||||
function initAdmin() {
|
function initAdmin() {
|
||||||
// module_srl이 있으면 미리 체크하여 존재하는 모듈이면 module_info 세팅
|
// module_srl이 있으면 미리 체크하여 존재하는 모듈이면 module_info 세팅
|
||||||
|
|
@ -41,10 +43,8 @@
|
||||||
$module_category = $oModuleModel->getModuleCategories();
|
$module_category = $oModuleModel->getModuleCategories();
|
||||||
Context::set('module_category', $module_category);
|
Context::set('module_category', $module_category);
|
||||||
|
|
||||||
// 템플릿 경로 구함 (board의 경우 tpl에 관리자용 템플릿 모아놓음)
|
// 템플릿 경로 지정 (board의 경우 tpl에 관리자용 템플릿 모아놓음)
|
||||||
$template_path = sprintf("%stpl/",$this->module_path);
|
$template_path = sprintf("%stpl/",$this->module_path);
|
||||||
|
|
||||||
// 템플릿 경로 지정
|
|
||||||
$this->setTemplatePath($template_path);
|
$this->setTemplatePath($template_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,7 +52,6 @@
|
||||||
* @brief 일반 게시판 호출시에 관련 정보를 세팅해줌
|
* @brief 일반 게시판 호출시에 관련 정보를 세팅해줌
|
||||||
**/
|
**/
|
||||||
function initNormal() {
|
function initNormal() {
|
||||||
|
|
||||||
// 카테고리를 사용하는지 확인후 사용시 카테고리 목록을 구해와서 Context에 세팅
|
// 카테고리를 사용하는지 확인후 사용시 카테고리 목록을 구해와서 Context에 세팅
|
||||||
if($this->module_info->use_category=='Y') {
|
if($this->module_info->use_category=='Y') {
|
||||||
$oDocumentModel = &getModel('document');
|
$oDocumentModel = &getModel('document');
|
||||||
|
|
@ -69,10 +68,8 @@
|
||||||
$this->list_count = $this->module_info->list_count?$this->module_info->list_count:20;
|
$this->list_count = $this->module_info->list_count?$this->module_info->list_count:20;
|
||||||
$this->page_count = $this->module_info->page_count?$this->module_info->page_count:10;
|
$this->page_count = $this->module_info->page_count?$this->module_info->page_count:10;
|
||||||
|
|
||||||
// 스킨 템플릿 경로 구함
|
// 스킨 템플릿 경로 지정
|
||||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->skin);
|
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->skin);
|
||||||
|
|
||||||
// 템플릿 경로 지정
|
|
||||||
$this->setTemplatePath($template_path);
|
$this->setTemplatePath($template_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,9 +77,6 @@
|
||||||
* @brief 목록 및 선택된 글 출력
|
* @brief 목록 및 선택된 글 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardContent() {
|
function dispBoardContent() {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
if(!$this->grant->list) return $this->dispBoardMessage('msg_not_permitted');
|
if(!$this->grant->list) return $this->dispBoardMessage('msg_not_permitted');
|
||||||
|
|
||||||
|
|
@ -96,7 +90,9 @@
|
||||||
// document_srl이 있다면 해당 글을 구해오자
|
// document_srl이 있다면 해당 글을 구해오자
|
||||||
if($this->grant->view && $document_srl) {
|
if($this->grant->view && $document_srl) {
|
||||||
|
|
||||||
|
// 글을 구함
|
||||||
$document = $oDocumentModel->getDocument($document_srl, $this->grant->manager, true);
|
$document = $oDocumentModel->getDocument($document_srl, $this->grant->manager, true);
|
||||||
|
|
||||||
// 찾아지지 않았다면 초기화
|
// 찾아지지 않았다면 초기화
|
||||||
if($document->document_srl != $document_srl) {
|
if($document->document_srl != $document_srl) {
|
||||||
unset($document);
|
unset($document);
|
||||||
|
|
@ -129,6 +125,7 @@
|
||||||
$args->list_count = $this->list_count; ///< 한페이지에 보여줄 글 수
|
$args->list_count = $this->list_count; ///< 한페이지에 보여줄 글 수
|
||||||
$args->page_count = $this->page_count; ///< 페이지 네비게이션에 나타날 페이지의 수
|
$args->page_count = $this->page_count; ///< 페이지 네비게이션에 나타날 페이지의 수
|
||||||
|
|
||||||
|
// 검색 옵션
|
||||||
$args->search_target = Context::get('search_target'); ///< 검색 대상 (title, contents...)
|
$args->search_target = Context::get('search_target'); ///< 검색 대상 (title, contents...)
|
||||||
$args->search_keyword = Context::get('search_keyword'); ///< 검색어
|
$args->search_keyword = Context::get('search_keyword'); ///< 검색어
|
||||||
if($this->module_info->use_category=='Y') $args->category_srl = Context::get('category'); ///< 카테고리 사용시 선택된 카테고리
|
if($this->module_info->use_category=='Y') $args->category_srl = Context::get('category'); ///< 카테고리 사용시 선택된 카테고리
|
||||||
|
|
@ -159,9 +156,6 @@
|
||||||
* @brief 글 작성 화면 출력
|
* @brief 글 작성 화면 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardWrite() {
|
function dispBoardWrite() {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
if(!$this->grant->write_document) return $this->dispBoardMessage('msg_not_permitted');
|
if(!$this->grant->write_document) return $this->dispBoardMessage('msg_not_permitted');
|
||||||
|
|
||||||
|
|
@ -180,10 +174,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$document_srl) {
|
if(!$document_srl) $document_srl = getNextSequence();
|
||||||
$oDB = &DB::getInstance();
|
|
||||||
$document_srl = $oDB->getNextSequence();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로
|
// 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로
|
||||||
if($document&&!$document->is_granted) return $this->setTemplateFile('input_password_form');
|
if($document&&!$document->is_granted) return $this->setTemplateFile('input_password_form');
|
||||||
|
|
@ -203,9 +194,6 @@
|
||||||
* @brief 문서 삭제 화면 출력
|
* @brief 문서 삭제 화면 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardDelete() {
|
function dispBoardDelete() {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
if(!$this->grant->write_document) return $this->dispBoardMessage('msg_not_permitted');
|
if(!$this->grant->write_document) return $this->dispBoardMessage('msg_not_permitted');
|
||||||
|
|
||||||
|
|
@ -233,9 +221,6 @@
|
||||||
* @brief 댓글의 답글 화면 출력
|
* @brief 댓글의 답글 화면 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardReplyComment() {
|
function dispBoardReplyComment() {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
||||||
|
|
||||||
|
|
@ -269,9 +254,6 @@
|
||||||
* @brief 댓글 수정 폼 출력
|
* @brief 댓글 수정 폼 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardModifyComment() {
|
function dispBoardModifyComment() {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
||||||
|
|
||||||
|
|
@ -307,9 +289,6 @@
|
||||||
* @brief 댓글 삭제 화면 출력
|
* @brief 댓글 삭제 화면 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardDeleteComment() {
|
function dispBoardDeleteComment() {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
if(!$this->grant->write_comment) return $this->dispBoardMessage('msg_not_permitted');
|
||||||
|
|
||||||
|
|
@ -337,9 +316,6 @@
|
||||||
* @brief 엮인글 삭제 화면 출력
|
* @brief 엮인글 삭제 화면 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardDeleteTrackback() {
|
function dispBoardDeleteTrackback() {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
// 삭제할 댓글번호를 가져온다
|
// 삭제할 댓글번호를 가져온다
|
||||||
$trackback_srl = Context::get('trackback_srl');
|
$trackback_srl = Context::get('trackback_srl');
|
||||||
|
|
||||||
|
|
@ -359,10 +335,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief 메세지 출력
|
* @brief 메세지 출력
|
||||||
**/
|
**/
|
||||||
function dispMessage($msg_code) {
|
function dispBoardMessage($msg_code) {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
$msg = Context::getLang($msg_code);
|
$msg = Context::getLang($msg_code);
|
||||||
if(!$msg) $msg = $msg_code;
|
if(!$msg) $msg = $msg_code;
|
||||||
Context::set('message', $msg);
|
Context::set('message', $msg);
|
||||||
|
|
@ -373,9 +346,6 @@
|
||||||
* @brief RSS 출력
|
* @brief RSS 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardRss() {
|
function dispBoardRss() {
|
||||||
// 모듈 관련 정보 세팅
|
|
||||||
$this->initNormal();
|
|
||||||
|
|
||||||
// 권한 체크
|
// 권한 체크
|
||||||
if(!$this->grant->list) return $this->dispBoardMessage('msg_not_permitted');
|
if(!$this->grant->list) return $this->dispBoardMessage('msg_not_permitted');
|
||||||
|
|
||||||
|
|
@ -419,8 +389,7 @@
|
||||||
**/
|
**/
|
||||||
function setCommentEditor($comment_srl=0) {
|
function setCommentEditor($comment_srl=0) {
|
||||||
if(!$comment_srl) {
|
if(!$comment_srl) {
|
||||||
$oDB = &DB::getInstance();
|
$comment_srl = getNextSequence();
|
||||||
$comment_srl = $oDB->getNextSequence();
|
|
||||||
Context::set('comment_srl', $comment_srl);
|
Context::set('comment_srl', $comment_srl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -434,17 +403,13 @@
|
||||||
* @brief 게시판 관리 목록 보여줌
|
* @brief 게시판 관리 목록 보여줌
|
||||||
**/
|
**/
|
||||||
function dispBoardAdminContent() {
|
function dispBoardAdminContent() {
|
||||||
// 관리자 관련 정보 세팅
|
|
||||||
$this->initAdmin();
|
|
||||||
|
|
||||||
// 등록된 board 모듈을 불러와 세팅
|
// 등록된 board 모듈을 불러와 세팅
|
||||||
$oDB = &DB::getInstance();
|
|
||||||
$args->sort_index = "module_srl";
|
$args->sort_index = "module_srl";
|
||||||
$args->page = Context::get('page');
|
$args->page = Context::get('page');
|
||||||
$args->list_count = 40;
|
$args->list_count = 40;
|
||||||
$args->page_count = 10;
|
$args->page_count = 10;
|
||||||
$args->s_module_category_srl = Context::get('module_category_srl');
|
$args->s_module_category_srl = Context::get('module_category_srl');
|
||||||
$output = $oDB->executeQuery('board.getBoardList', $args);
|
$output = executeQuery('board.getBoardList', $args);
|
||||||
|
|
||||||
// 템플릿에 쓰기 위해서 context::set
|
// 템플릿에 쓰기 위해서 context::set
|
||||||
Context::set('total_count', $output->total_count);
|
Context::set('total_count', $output->total_count);
|
||||||
|
|
@ -461,8 +426,6 @@
|
||||||
* @brief 게시판에 필요한 기본 설정들
|
* @brief 게시판에 필요한 기본 설정들
|
||||||
**/
|
**/
|
||||||
function dispBoardAdminModuleConfig() {
|
function dispBoardAdminModuleConfig() {
|
||||||
// 관리자 관련 정보 세팅
|
|
||||||
$this->initAdmin();
|
|
||||||
|
|
||||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
|
|
@ -478,8 +441,6 @@
|
||||||
* @brief 선택된 게시판의 정보 출력
|
* @brief 선택된 게시판의 정보 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardAdminBoardInfo() {
|
function dispBoardAdminBoardInfo() {
|
||||||
// 관리자 관련 정보 세팅
|
|
||||||
$this->initAdmin();
|
|
||||||
|
|
||||||
// module_srl 값이 없다면 그냥 index 페이지를 보여줌
|
// module_srl 값이 없다면 그냥 index 페이지를 보여줌
|
||||||
if(!Context::get('module_srl')) return $this->dispAdminContent();
|
if(!Context::get('module_srl')) return $this->dispAdminContent();
|
||||||
|
|
@ -507,8 +468,6 @@
|
||||||
* @brief 게시판 추가 폼 출력
|
* @brief 게시판 추가 폼 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardAdminInsertBoard() {
|
function dispBoardAdminInsertBoard() {
|
||||||
// 관리자 관련 정보 세팅
|
|
||||||
$this->initAdmin();
|
|
||||||
|
|
||||||
// 스킨 목록을 구해옴
|
// 스킨 목록을 구해옴
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
|
|
@ -528,8 +487,6 @@
|
||||||
* @brief 게시판 삭제 화면 출력
|
* @brief 게시판 삭제 화면 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardAdminDeleteBoard() {
|
function dispBoardAdminDeleteBoard() {
|
||||||
// 관리자 관련 정보 세팅
|
|
||||||
$this->initAdmin();
|
|
||||||
|
|
||||||
if(!Context::get('module_srl')) return $this->dispContent();
|
if(!Context::get('module_srl')) return $this->dispContent();
|
||||||
|
|
||||||
|
|
@ -549,8 +506,6 @@
|
||||||
* @brief 스킨 정보 보여줌
|
* @brief 스킨 정보 보여줌
|
||||||
**/
|
**/
|
||||||
function dispBoardAdminSkinInfo() {
|
function dispBoardAdminSkinInfo() {
|
||||||
// 관리자 관련 정보 세팅
|
|
||||||
$this->initAdmin();
|
|
||||||
|
|
||||||
// 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음
|
// 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음
|
||||||
$module_info = Context::get('module_info');
|
$module_info = Context::get('module_info');
|
||||||
|
|
@ -578,8 +533,6 @@
|
||||||
* @brief 카테고리의 정보 출력
|
* @brief 카테고리의 정보 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardAdminCategoryInfo() {
|
function dispBoardAdminCategoryInfo() {
|
||||||
// 관리자 관련 정보 세팅
|
|
||||||
$this->initAdmin();
|
|
||||||
|
|
||||||
// module_srl을 구함
|
// module_srl을 구함
|
||||||
$module_srl = Context::get('module_srl');
|
$module_srl = Context::get('module_srl');
|
||||||
|
|
@ -612,9 +565,6 @@
|
||||||
* @brief 권한 목록 출력
|
* @brief 권한 목록 출력
|
||||||
**/
|
**/
|
||||||
function dispBoardAdminGrantInfo() {
|
function dispBoardAdminGrantInfo() {
|
||||||
// 관리자 관련 정보 세팅
|
|
||||||
$this->initAdmin();
|
|
||||||
|
|
||||||
// module_srl을 구함
|
// module_srl을 구함
|
||||||
$module_srl = Context::get('module_srl');
|
$module_srl = Context::get('module_srl');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="winopen('./?module=editor&act=viewComponentInfo&component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;"><img src="../../../tpl/images/about_component.gif" title="{$lang->about_component}" alt="{$lang->about_component}" class="about_component_icon" border="0" /></a></div>
|
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="winopen('./?module=editor&act=viewComponentInfo&component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;"><img src="../../../tpl/images/about_component.gif" title="{$lang->about_component}" alt="{$lang->about_component}" class="about_component_icon" border="0" /></a></div>
|
||||||
|
|
||||||
<div class="header">{$lang->image_url}</div>
|
<div class="header">{$lang->image_url}</div>
|
||||||
<div class="body"><input type="text" class="image_url" id="image_url" value="{$manual_url}" onblur="getImageScale();" /></div>
|
<div class="body"><input type="text" class="image_url" id="image_url" value="{url_decode($manual_url)}" onblur="getImageScale();" /></div>
|
||||||
|
|
||||||
<div class="header">{$lang->image_scale}</div>
|
<div class="header">{$lang->image_scale}</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ function insertImage(obj) {
|
||||||
if(typeof(opener)=="undefined") return;
|
if(typeof(opener)=="undefined") return;
|
||||||
|
|
||||||
var url = xGetElementById("image_url").value;
|
var url = xGetElementById("image_url").value;
|
||||||
|
alert(url);
|
||||||
var alt = xGetElementById("image_alt").value;
|
var alt = xGetElementById("image_alt").value;
|
||||||
var align = "";
|
var align = "";
|
||||||
if(xGetElementById("align_normal").checked==true) align = "";
|
if(xGetElementById("align_normal").checked==true) align = "";
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,11 @@
|
||||||
// 기본적으로 필요한 변수인 upload_target_srl, module_srl을 설정
|
// 기본적으로 필요한 변수인 upload_target_srl, module_srl을 설정
|
||||||
$upload_target_srl = Context::get('upload_target_srl');
|
$upload_target_srl = Context::get('upload_target_srl');
|
||||||
$file_srl = Context::get('file_srl');
|
$file_srl = Context::get('file_srl');
|
||||||
if(!$file_srl) exit();
|
|
||||||
|
|
||||||
// 업로드 권한이 없거나 정보가 없을시 종료
|
// 업로드 권한이 없거나 정보가 없을시 종료
|
||||||
if(!$_SESSION['upload_enable'][$upload_target_srl]) exit();
|
if(!$_SESSION['upload_enable'][$upload_target_srl]) exit();
|
||||||
|
|
||||||
$output = $this->deleteFile($file_srl, $this->grant->manager);
|
if($file_srl) $output = $this->deleteFile($file_srl);
|
||||||
|
|
||||||
// 첨부파일의 목록을 java script로 출력
|
// 첨부파일의 목록을 java script로 출력
|
||||||
$this->printUploadedFileList($upload_target_srl);
|
$this->printUploadedFileList($upload_target_srl);
|
||||||
|
|
@ -113,7 +112,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief 첨부파일 삭제
|
* @brief 첨부파일 삭제
|
||||||
**/
|
**/
|
||||||
function deleteFile($file_srl, $is_admin = false) {
|
function deleteFile($file_srl) {
|
||||||
$oDB = &DB::getInstance();
|
$oDB = &DB::getInstance();
|
||||||
|
|
||||||
// 파일 정보를 가져옴
|
// 파일 정보를 가져옴
|
||||||
|
|
@ -269,7 +268,7 @@
|
||||||
$file_srl = trim($file_srl_list[$i]);
|
$file_srl = trim($file_srl_list[$i]);
|
||||||
if(!$file_srl) continue;
|
if(!$file_srl) continue;
|
||||||
|
|
||||||
$this->deleteFile($file_srl, true);
|
$this->deleteFile($file_srl);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setMessage( sprintf(Context::getLang('msg_checked_file_is_deleted'), $file_count) );
|
$this->setMessage( sprintf(Context::getLang('msg_checked_file_is_deleted'), $file_count) );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue