diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index 109d26d05..f108fd8bb 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -232,6 +232,7 @@ } $schema = sprintf('create table `%s` (%s%s) %s;', $this->addQuotes($table_name), "\n", implode($column_schema,",\n"), "ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci"); + $output = $this->_query($schema); if(!$output) return false; } @@ -369,6 +370,8 @@ * 그닥 좋지는 않은 구조이지만 편리하다.. -_-; **/ function _getNavigationData($table, $columns, $condition, $navigation) { + require_once('./classes/page/PageHandler.class.php'); + // 전체 개수를 구함 $count_query = sprintf("select count(*) as count from %s %s", $table, $condition); $result = $this->_query($count_query); @@ -390,7 +393,16 @@ $index = implode(',',$index_list); $query = sprintf('select %s from %s %s order by %s limit %d, %d', $columns, $table, $condition, $index, $start_count, $navigation->list_count); $result = $this->_query($query); - if($this->errno!=0) return; + if($this->errno!=0) { + $buff = new Object(); + $buff->total_count = 0; + $buff->total_page = 0; + $buff->page = 1; + $buff->data = array(); + + $buff->page_navigation = new PageHandler($total_count, $total_page, $page, $navigation->page_count); + return $buff; + } $virtual_no = $total_count - ($page-1)*$navigation->list_count; while($tmp = mysql_fetch_object($result)) { @@ -403,7 +415,6 @@ $buff->page = $page; $buff->data = $data; - require_once('./classes/page/PageHandler.class.php'); $buff->page_navigation = new PageHandler($total_count, $total_page, $page, $navigation->page_count); return $buff; } diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 26534281e..a0806c7b3 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -252,6 +252,10 @@ $instance_name = sprintf("%s%s",$module,"Model"); $class_file = sprintf('%s%s.%s.php', $class_path, $module, $type); break; + case 'class' : + $instance_name = $module; + $class_file = sprintf('%s%s.class.php', $class_path, $module); + break; default : $type = 'view'; $instance_name = sprintf("%s%s",$module,"View"); @@ -274,7 +278,10 @@ // 생성된 객체에 자신이 호출된 위치를 세팅해줌 $oModule->setModule($module); $oModule->setModulePath($class_path); - $oModule->init(); + if(method_exists($oModule, 'init') && !$GLOBALS['_inited_module'][$module][$type]) { + $GLOBALS['_inited_module'][$module][$type] = true; + $oModule->init(); + } // GLOBALS 변수에 생성된 객체 저장 $GLOBALS['_loaded_module'][$module][$type] = $oModule; diff --git a/classes/module/ModuleObject.class.php b/classes/module/ModuleObject.class.php index 06d2995e5..446edcda7 100644 --- a/classes/module/ModuleObject.class.php +++ b/classes/module/ModuleObject.class.php @@ -135,9 +135,6 @@ // 권한변수 설정 $this->grant = $grant; Context::set('grant', $grant); - - // 모듈의 init method 실행 - $this->init(); } /** diff --git a/common/js/xml_js_filter.js b/common/js/xml_js_filter.js index 5d177b528..d5c9fe824 100644 --- a/common/js/xml_js_filter.js +++ b/common/js/xml_js_filter.js @@ -16,6 +16,7 @@ function filterAlertMessage(ret_obj) { var message = ret_obj["message"]; var redirect_url = ret_obj["redirect_url"]; var url = location.href; + if(url.substr(-1)=='#') url = url.substr(0,url.length-1); if(typeof(message)!='undefined'&&message&&message!='success') alert(message); if(typeof(redirect_url)!='undefined'&&redirect_url) url = redirect_url; location.href = url; diff --git a/config/func.inc.php b/config/func.inc.php index 3c4800c36..cc8a7bb0e 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -29,24 +29,31 @@ /** * @brief module의 controller 객체 생성용 **/ - function getController($module_name) { + function &getController($module_name) { return getModule($module_name, 'controller'); } /** * @brief module의 view 객체 생성용 **/ - function getView($module_name) { + function &getView($module_name) { return getModule($module_name, 'view'); } /** * @brief module의 model 객체 생성용 **/ - function getModel($module_name) { + function &getModel($module_name) { return getModule($module_name, 'model'); } + /** + * @brief module의 상위 class 객체 생성용 + **/ + function &getClass($module_name) { + return getModule($module_name, 'class'); + } + /** * @brief Context::getUrl($args_list)를 쓰기 쉽게 함수로 선언 diff --git a/modules/addon/addon.class.php b/modules/addon/addon.class.php index f88b2a2eb..afd99aa54 100644 --- a/modules/addon/addon.class.php +++ b/modules/addon/addon.class.php @@ -9,5 +9,26 @@ var $cache_file = "./files/cache/activated_addons.cache.php"; + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/admin/admin.class.php b/modules/admin/admin.class.php index d343a281f..d090631d2 100644 --- a/modules/admin/admin.class.php +++ b/modules/admin/admin.class.php @@ -24,5 +24,33 @@ Context::set('menu_item', $menu_item); } + + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + // 게시판, 회원관리, 레이아웃관리등 자주 사용될 module을 admin_shortcut에 등록 + $oAdminController = &getController('admin'); + $oAdminController->insertShortCut('board'); + $oAdminController->insertShortCut('member'); + $oAdminController->insertShortCut('layout'); + + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/admin/admin.controller.php b/modules/admin/admin.controller.php index d267426f0..a4b3ce38d 100644 --- a/modules/admin/admin.controller.php +++ b/modules/admin/admin.controller.php @@ -45,5 +45,50 @@ $this->setRedirectUrl('./?module=admin'); } + + /** + * @brief 숏컷 추가 + **/ + function procInsertShortCut() { + $module = Context::get('selected_module'); + $output = $this->insertShortCut($module); + if(!$output->toBool()) return $output; + + $this->setMessage('success_registed'); + } + + /** + * @brief 숏컷을 추가하는 method + **/ + function insertShortCut($module) { + // 선택된 모듈의 정보중에서 admin_index act를 구함 + $oModuleModel = &getModel('module'); + $module_info = $oModuleModel->getModuleInfoXml($module); + + $args->module = $module; + $args->title = $module_info->title; + $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); + return $output; + } + + + /** + * @brief 숏컷의 내용 수정 + **/ + function procDeleteShortCut() { + $oDB = &DB::getInstance(); + + $args->shortcut_srl = Context::get('shortcut_srl'); + + $output = $oDB->executeQuery('admin.deleteShortCut', $args); + if(!$output->toBool()) return $output; + + $this->setMessage('success_deleted'); + } + } ?> diff --git a/modules/admin/admin.model.php b/modules/admin/admin.model.php index a8628f6b9..ab31db73c 100644 --- a/modules/admin/admin.model.php +++ b/modules/admin/admin.model.php @@ -13,5 +13,17 @@ function init() { } + /** + * @brief admin shortcut 에 등록된 목록을 return; + **/ + function getShortCuts() { + $oDB = &DB::getInstance(); + $output = $oDB->executeQuery('admin.getShortCutList'); + if(!$output->toBool()) return $output; + + if(!is_array($output->data)) return array($output->data); + return $output->data; + } + } ?> diff --git a/modules/admin/admin.view.php b/modules/admin/admin.view.php index 2f46703ab..c4f2b47a4 100644 --- a/modules/admin/admin.view.php +++ b/modules/admin/admin.view.php @@ -28,6 +28,11 @@ $this->setLayoutPath($this->getTemplatePath()); $this->setLayoutFile('layout.html'); + // shortcut 가져오기 + $oAdminModel = &getModel('admin'); + $shortcut_list = $oAdminModel->getShortCuts(); + Context::set('shortcut_list', $shortcut_list); + // admin class의 init parent::init(); } @@ -62,6 +67,14 @@ } } + /** + * @brief 관리자 메뉴 숏컷 출력 + **/ + function dispShortCut() { + + $this->setTemplateFile('shortcut_list'); + } + /** * @brief 모듈의 목록을 보여줌 **/ diff --git a/modules/admin/conf/module.xml b/modules/admin/conf/module.xml index a7914429c..05a73cf94 100644 --- a/modules/admin/conf/module.xml +++ b/modules/admin/conf/module.xml @@ -5,11 +5,14 @@ + + + diff --git a/modules/admin/lang/ko.lang.php b/modules/admin/lang/ko.lang.php index d8ff09fa1..a9845bd51 100644 --- a/modules/admin/lang/ko.lang.php +++ b/modules/admin/lang/ko.lang.php @@ -19,4 +19,5 @@ $lang->installed_path = "설치경로"; $lang->msg_is_not_administrator = '관리자만 접속이 가능합니다'; + $lang->msg_default_act_is_null = '기본 관리자 Action이 지정되어 있지 않아 바로가기 등록을 할 수가 없습니다'; ?> diff --git a/modules/admin/queries/deleteShortCut.xml b/modules/admin/queries/deleteShortCut.xml new file mode 100644 index 000000000..b037531b7 --- /dev/null +++ b/modules/admin/queries/deleteShortCut.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/modules/admin/queries/getShortCutList.xml b/modules/admin/queries/getShortCutList.xml new file mode 100644 index 000000000..797abbdc4 --- /dev/null +++ b/modules/admin/queries/getShortCutList.xml @@ -0,0 +1,8 @@ + + +
+ + + + + diff --git a/modules/admin/queries/insertShortCut.xml b/modules/admin/queries/insertShortCut.xml new file mode 100644 index 000000000..fdb75938e --- /dev/null +++ b/modules/admin/queries/insertShortCut.xml @@ -0,0 +1,13 @@ + + +
+ + + + + + + + + + diff --git a/modules/admin/schemas/admin_shortcut.xml b/modules/admin/schemas/admin_shortcut.xml index dbdafe5f0..4b2c6a1e1 100644 --- a/modules/admin/schemas/admin_shortcut.xml +++ b/modules/admin/schemas/admin_shortcut.xml @@ -1,6 +1,7 @@
- + + diff --git a/modules/admin/tpl/filter/delete_shortcut.xml b/modules/admin/tpl/filter/delete_shortcut.xml new file mode 100644 index 000000000..a1deb86e6 --- /dev/null +++ b/modules/admin/tpl/filter/delete_shortcut.xml @@ -0,0 +1,9 @@ + +
+ + + + + + +
diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index e105b2596..505410532 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -17,3 +17,10 @@ function doAdminLoginFocus() { var fo = xGetElementById('user_id'); if(fo) fo.focus(); } + +// 숏컷 삭제 +function doDeleteShortCut(shortcut_srl) { + var fo_obj = xGetElementById('fo_shortcut_info'); + fo_obj.shortcut_srl.value = shortcut_srl; + procFilter(fo_obj, delete_shortcut); +} diff --git a/modules/admin/tpl/layout.html b/modules/admin/tpl/layout.html index 4461adf8a..5e17b7095 100644 --- a/modules/admin/tpl/layout.html +++ b/modules/admin/tpl/layout.html @@ -14,22 +14,19 @@
- class="selected"> - {$lang->board_manager} - - class="selected"> - {$lang->member_manager} - - class="selected"> - {$lang->layout_manager} - + + module)-->class="selected"> + {$val->title} + + + [{$lang->cmd_management}]
act)-->class="selected"> - {$val->title} + {$val->title}
@@ -37,7 +34,7 @@
- {$selected_module_info->title} (ver {$selected_module_info->version}) + {$selected_module_info->title} (ver {$selected_module_info->version})
diff --git a/modules/admin/tpl/shortcut_list.html b/modules/admin/tpl/shortcut_list.html new file mode 100644 index 000000000..1d42f0ab5 --- /dev/null +++ b/modules/admin/tpl/shortcut_list.html @@ -0,0 +1,35 @@ + + + + + + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
{$lang->title}{$lang->module}{$lang->regdate}{$lang->cmd_delete}
{$lang->msg_shortcut_is_null}
{$shortcut_info->title}{$shortcut_info->module}{zdate($shortcut_info->last_update,"Y-m-d H:i:s")}{$lang->cmd_delete}
+ + + diff --git a/modules/board/board.class.php b/modules/board/board.class.php index e4c485026..f7a638dce 100644 --- a/modules/board/board.class.php +++ b/modules/board/board.class.php @@ -16,5 +16,26 @@ var $editor = 'default'; ///< 에디터 종류 + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/comment/comment.class.php b/modules/comment/comment.class.php index 07dd62395..32fb0a91a 100644 --- a/modules/comment/comment.class.php +++ b/modules/comment/comment.class.php @@ -7,5 +7,26 @@ class comment extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/document/document.class.php b/modules/document/document.class.php index 5f69fe0d7..5c3bace58 100644 --- a/modules/document/document.class.php +++ b/modules/document/document.class.php @@ -13,5 +13,26 @@ // 관리자페이지에서 사용할 검색 옵션 var $search_option = array('title','content','title_content','user_name',); ///< 검색 옵션 + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/document/schemas/documents.xml b/modules/document/schemas/documents.xml index 043364074..41d1c69b6 100644 --- a/modules/document/schemas/documents.xml +++ b/modules/document/schemas/documents.xml @@ -18,7 +18,7 @@ - + diff --git a/modules/file/file.class.php b/modules/file/file.class.php index 5edae4e5a..80a948532 100644 --- a/modules/file/file.class.php +++ b/modules/file/file.class.php @@ -7,5 +7,38 @@ class file extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + // file 모듈에서 사용할 디렉토리 생성 + $directory_list = array( + './files', + './files/attach', + './files/attach/images', + './files/attach/binaries', + ); + + foreach($directory_list as $dir) { + if(is_dir($dir)) continue; + @mkdir($dir, 0707); + @chmod($dir, 0707); + } + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } } ?> diff --git a/modules/install/install.class.php b/modules/install/install.class.php index 1ddf567b7..68b636667 100644 --- a/modules/install/install.class.php +++ b/modules/install/install.class.php @@ -7,5 +7,26 @@ class install extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index d6910d25c..a278c62b6 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -77,49 +77,10 @@ // DB접속이 가능한지 체크 if(!$oDB->isConnected()) return new Object(-1, 'msg_dbconnect_failed'); - // 모든 모듈의 테이블 생성 - $output = $this->makeTable(); + // 모든 모듈의 설치 + $output = $this->installDownloadedModule(); if(!$output->toBool()) return $output; - // 멤버 컨트롤러 객체 생성 - $oMemberController = &getController('member'); - - // 그룹을 입력 - $group_args->title = Context::getLang('default_group_1'); - $group_args->is_default = 'Y'; - $output = $oMemberController->insertGroup($group_args); - - $group_args->title = Context::getLang('default_group_2'); - $group_args->is_default = 'N'; - $oMemberController->insertGroup($group_args); - - // 관리자 정보 세팅 - $admin_info = Context::gets('user_id','password','nick_name','user_name', 'email_address'); - - // 관리자 정보 입력 - $oMemberController->insertAdmin($admin_info); - - // 금지 아이디 등록 (기본 + 모듈명) - $oModuleModel = &getModel('module'); - $module_list = $oModuleModel->getModuleList(); - foreach($module_list as $key => $val) { - $oMemberController->insertDeniedID($val->module,''); - } - $oMemberController->insertDeniedID('www',''); - $oMemberController->insertDeniedID('root',''); - $oMemberController->insertDeniedID('administrator',''); - $oMemberController->insertDeniedID('telnet',''); - $oMemberController->insertDeniedID('ftp',''); - $oMemberController->insertDeniedID('http',''); - - // 로그인 처리시킴 - $output = $oMemberController->procLogin($admin_info->user_id, $admin_info->password); - if(!$output) return $output; - - // 기본 모듈을 생성 - $oModule = &getController('module'); - $oModule->makeDefaultModule(); - // config 파일 생성 if(!$this->makeConfigFile()) return new Object(-1, 'msg_install_failed'); @@ -144,11 +105,6 @@ './files/cache/queries', './files/cache/js_filter_compiled', './files/cache/template_compiled', - './files/cache/module_info', - './files/cache/layout', - './files/attach', - './files/attach/images', - './files/attach/binaries', ); foreach($directory_list as $dir) { @@ -159,34 +115,58 @@ } /** - * @brief DB Table 생성 + * @brief 모든 모듈의 설치 * * 모든 module의 schemas 디렉토리를 확인하여 schema xml을 이용, 테이블 생성 **/ - function makeTable() { - // db instance생성 - $oDB = &DB::getInstance(); + function installDownloadedModule() { + + // install 모듈은 미리 설치 + $this->installModule('install', './modules/install/'); // 각 모듈의 schemas/*.xml 파일을 모두 찾아서 table 생성 $module_list_1 = FileHandler::readDir('./modules/', NULL, false, true); $module_list_2 = FileHandler::readDir('./files/modules/', NULL, false, true); $module_list = array_merge($module_list_1, $module_list_2); foreach($module_list as $module_path) { - $schema_dir = sprintf('%s/schemas/', $module_path); - $schema_files = FileHandler::readDir($schema_dir, NULL, false, true); - $file_cnt = count($schema_files); - if(!$file_cnt) continue; + // 모듈 이름을 구함 + $tmp_arr = explode('/',$module_path); + $module = $tmp_arr[count($tmp_arr)-1]; - for($i=0;$i<$file_cnt;$i++) { - $file = trim($schema_files[$i]); - if(!$file || substr($file,-4)!='.xml') continue; - $output = $oDB->createTableByXmlFile($file); - if($oDB->isError()) return $oDB->getError(); - } + // module이 install이면 패스~ + if($module == 'install') continue; + + $this->installModule($module, $module_path); } return new Object(); } + /** + * @brief 개별 모듈의 설치 + **/ + function installModule($module, $module_path) { + // db instance생성 + $oDB = &DB::getInstance(); + + // 해당 모듈의 schemas 디렉토리를 검사하여 schema xml파일이 있으면 생성 + $schema_dir = sprintf('%s/schemas/', $module_path); + $schema_files = FileHandler::readDir($schema_dir, NULL, false, true); + + $file_cnt = count($schema_files); + for($i=0;$i<$file_cnt;$i++) { + $file = trim($schema_files[$i]); + if(!$file || substr($file,-4)!='.xml') continue; + $output = $oDB->createTableByXmlFile($file); + } + + // 테이블 설치후 module instance를 만들고 install() method를 실행 + unset($oModule); + $oModule = &getClass($module); + if(method_exists($oModule, 'moduleInstall')) $oModule->moduleInstall(); + + return new Object(); + } + /** * @brief config 파일을 생성 * 모든 설정이 이상없이 끝난 후에 config파일 생성 diff --git a/modules/krzip/krzip.class.php b/modules/krzip/krzip.class.php index f815fc64e..df3129f87 100644 --- a/modules/krzip/krzip.class.php +++ b/modules/krzip/krzip.class.php @@ -11,5 +11,26 @@ var $port = 80; var $query = '/server.php?addr3='; + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/layout/layout.class.php b/modules/layout/layout.class.php index 06107c3ee..91a3e50eb 100644 --- a/modules/layout/layout.class.php +++ b/modules/layout/layout.class.php @@ -7,5 +7,37 @@ class layout extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + // layout 에서 사용할 cache디렉토리 생성 + $directory_list = array( + './files', + './files/cache', + './files/cache/layout', + ); + + foreach($directory_list as $dir) { + if(is_dir($dir)) continue; + @mkdir($dir, 0707); + @chmod($dir, 0707); + } + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } } ?> diff --git a/modules/member/member.class.php b/modules/member/member.class.php index 5b001601e..03c682ab1 100644 --- a/modules/member/member.class.php +++ b/modules/member/member.class.php @@ -7,5 +7,60 @@ class member extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + // 멤버 컨트롤러 객체 생성 + $oMemberController = &getController('member'); + + // 그룹을 입력 + $group_args->title = Context::getLang('default_group_1'); + $group_args->is_default = 'Y'; + $output = $oMemberController->insertGroup($group_args); + + $group_args->title = Context::getLang('default_group_2'); + $group_args->is_default = 'N'; + $oMemberController->insertGroup($group_args); + + // 관리자 정보 세팅 + $admin_info = Context::gets('user_id','password','nick_name','user_name', 'email_address'); + + // 관리자 정보 입력 + $oMemberController->insertAdmin($admin_info); + + // 금지 아이디 등록 (기본 + 모듈명) + $oModuleModel = &getModel('module'); + $module_list = $oModuleModel->getModuleList(); + foreach($module_list as $key => $val) { + $oMemberController->insertDeniedID($val->module,''); + } + $oMemberController->insertDeniedID('www',''); + $oMemberController->insertDeniedID('root',''); + $oMemberController->insertDeniedID('administrator',''); + $oMemberController->insertDeniedID('telnet',''); + $oMemberController->insertDeniedID('ftp',''); + $oMemberController->insertDeniedID('http',''); + + // 로그인 처리시킴 + $output = $oMemberController->procLogin($admin_info->user_id, $admin_info->password); + if(!$output) return $output; + + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } } ?> diff --git a/modules/message/message.class.php b/modules/message/message.class.php index 5802c9799..5daff494c 100644 --- a/modules/message/message.class.php +++ b/modules/message/message.class.php @@ -7,5 +7,26 @@ class message extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/module/lang/ko.lang.php b/modules/module/lang/ko.lang.php index 1fe5f3c77..dd98589d1 100644 --- a/modules/module/lang/ko.lang.php +++ b/modules/module/lang/ko.lang.php @@ -8,7 +8,9 @@ $lang->module_list = "모듈 목록"; $lang->module_index = "초기화면"; $lang->module_category = "모듈 카테고리"; + $lang->add_shortcut = "관리자 메뉴에 추가"; $lang->category_title = "카테고리 이름"; + $lang->cmd_add_shortcut = "바로가기 추가"; ?> diff --git a/modules/module/module.class.php b/modules/module/module.class.php index 7dbafc147..e290b8235 100644 --- a/modules/module/module.class.php +++ b/modules/module/module.class.php @@ -7,5 +7,42 @@ class module extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + // module 모듈에서 사용할 디렉토리 생성 + $directory_list = array( + './files', + './files/cache', + './files/cache/module_info', + ); + + foreach($directory_list as $dir) { + if(is_dir($dir)) continue; + @mkdir($dir, 0707); + @chmod($dir, 0707); + } + + // 기본 모듈을 생성 + $oModule = &getController('module'); + $oModule->makeDefaultModule(); + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/module/tpl.admin/filter/insert_shortcut.xml b/modules/module/tpl.admin/filter/insert_shortcut.xml new file mode 100644 index 000000000..04a4c8885 --- /dev/null +++ b/modules/module/tpl.admin/filter/insert_shortcut.xml @@ -0,0 +1,9 @@ + +
+ + + + + + +
diff --git a/modules/module/tpl.admin/js/admin.js b/modules/module/tpl.admin/js/admin.js index 04ad74d53..585e695ce 100644 --- a/modules/module/tpl.admin/js/admin.js +++ b/modules/module/tpl.admin/js/admin.js @@ -24,3 +24,10 @@ function completeUpdateCategory(ret_obj) { var url = "./?module=admin&mo=module&act=dispCategory"; location.href = url; } + +/* 선택된 모듈을 관리자 메뉴의 바로가기에 등록 */ +function doAddShortCut(module) { + var fo_obj = xGetElementById("fo_shortcut"); + fo_obj.selected_module.value = module; + procFilter(fo_obj, insert_shortcut); +} diff --git a/modules/module/tpl.admin/module_list.html b/modules/module/tpl.admin/module_list.html index ede2ff9be..cb4d85943 100644 --- a/modules/module/tpl.admin/module_list.html +++ b/modules/module/tpl.admin/module_list.html @@ -1,4 +1,13 @@ + + + + + +
+ +
+ @@ -7,6 +16,7 @@ + @@ -31,6 +41,7 @@ +
{$lang->module_name}{$lang->date} {$lang->table_count} {$lang->installed_path}{$lang->add_shortcut}
{$val->path}{$lang->cmd_add_shortcut}
diff --git a/modules/rss/rss.class.php b/modules/rss/rss.class.php index 2e46c7758..37c5371b8 100644 --- a/modules/rss/rss.class.php +++ b/modules/rss/rss.class.php @@ -13,5 +13,26 @@ "rss10" => "rss 1.0", ); + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/spamfilter/spamfilter.class.php b/modules/spamfilter/spamfilter.class.php index a830998fd..a6f68172b 100644 --- a/modules/spamfilter/spamfilter.class.php +++ b/modules/spamfilter/spamfilter.class.php @@ -7,5 +7,26 @@ class spamfilter extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/tag/tag.class.php b/modules/tag/tag.class.php index 96aa4772b..68461405a 100644 --- a/modules/tag/tag.class.php +++ b/modules/tag/tag.class.php @@ -7,5 +7,26 @@ class tag extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?> diff --git a/modules/trackback/trackback.class.php b/modules/trackback/trackback.class.php index bef3aad27..bc69dc9d1 100644 --- a/modules/trackback/trackback.class.php +++ b/modules/trackback/trackback.class.php @@ -7,5 +7,26 @@ class trackback extends ModuleObject { + /** + * @brief 설치시 추가 작업이 필요할시 구현 + **/ + function moduleInstall() { + return new Object(); + } + + /** + * @brief 설치가 이상이 없는지 체크하는 method + **/ + function moduleIsInstalled() { + return new Object(); + } + + /** + * @brief 업데이트 실행 + **/ + function moduleUpdate() { + return new Object(); + } + } ?>