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@393 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4e044cbbfd
commit
3890c0c97c
40 changed files with 682 additions and 82 deletions
|
|
@ -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");
|
$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);
|
$output = $this->_query($schema);
|
||||||
if(!$output) return false;
|
if(!$output) return false;
|
||||||
}
|
}
|
||||||
|
|
@ -369,6 +370,8 @@
|
||||||
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
* 그닥 좋지는 않은 구조이지만 편리하다.. -_-;
|
||||||
**/
|
**/
|
||||||
function _getNavigationData($table, $columns, $condition, $navigation) {
|
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);
|
$count_query = sprintf("select count(*) as count from %s %s", $table, $condition);
|
||||||
$result = $this->_query($count_query);
|
$result = $this->_query($count_query);
|
||||||
|
|
@ -390,7 +393,16 @@
|
||||||
$index = implode(',',$index_list);
|
$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);
|
$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);
|
$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;
|
$virtual_no = $total_count - ($page-1)*$navigation->list_count;
|
||||||
while($tmp = mysql_fetch_object($result)) {
|
while($tmp = mysql_fetch_object($result)) {
|
||||||
|
|
@ -403,7 +415,6 @@
|
||||||
$buff->page = $page;
|
$buff->page = $page;
|
||||||
$buff->data = $data;
|
$buff->data = $data;
|
||||||
|
|
||||||
require_once('./classes/page/PageHandler.class.php');
|
|
||||||
$buff->page_navigation = new PageHandler($total_count, $total_page, $page, $navigation->page_count);
|
$buff->page_navigation = new PageHandler($total_count, $total_page, $page, $navigation->page_count);
|
||||||
return $buff;
|
return $buff;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,10 @@
|
||||||
$instance_name = sprintf("%s%s",$module,"Model");
|
$instance_name = sprintf("%s%s",$module,"Model");
|
||||||
$class_file = sprintf('%s%s.%s.php', $class_path, $module, $type);
|
$class_file = sprintf('%s%s.%s.php', $class_path, $module, $type);
|
||||||
break;
|
break;
|
||||||
|
case 'class' :
|
||||||
|
$instance_name = $module;
|
||||||
|
$class_file = sprintf('%s%s.class.php', $class_path, $module);
|
||||||
|
break;
|
||||||
default :
|
default :
|
||||||
$type = 'view';
|
$type = 'view';
|
||||||
$instance_name = sprintf("%s%s",$module,"View");
|
$instance_name = sprintf("%s%s",$module,"View");
|
||||||
|
|
@ -274,7 +278,10 @@
|
||||||
// 생성된 객체에 자신이 호출된 위치를 세팅해줌
|
// 생성된 객체에 자신이 호출된 위치를 세팅해줌
|
||||||
$oModule->setModule($module);
|
$oModule->setModule($module);
|
||||||
$oModule->setModulePath($class_path);
|
$oModule->setModulePath($class_path);
|
||||||
|
if(method_exists($oModule, 'init') && !$GLOBALS['_inited_module'][$module][$type]) {
|
||||||
|
$GLOBALS['_inited_module'][$module][$type] = true;
|
||||||
$oModule->init();
|
$oModule->init();
|
||||||
|
}
|
||||||
|
|
||||||
// GLOBALS 변수에 생성된 객체 저장
|
// GLOBALS 변수에 생성된 객체 저장
|
||||||
$GLOBALS['_loaded_module'][$module][$type] = $oModule;
|
$GLOBALS['_loaded_module'][$module][$type] = $oModule;
|
||||||
|
|
|
||||||
|
|
@ -135,9 +135,6 @@
|
||||||
// 권한변수 설정
|
// 권한변수 설정
|
||||||
$this->grant = $grant;
|
$this->grant = $grant;
|
||||||
Context::set('grant', $grant);
|
Context::set('grant', $grant);
|
||||||
|
|
||||||
// 모듈의 init method 실행
|
|
||||||
$this->init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ function filterAlertMessage(ret_obj) {
|
||||||
var message = ret_obj["message"];
|
var message = ret_obj["message"];
|
||||||
var redirect_url = ret_obj["redirect_url"];
|
var redirect_url = ret_obj["redirect_url"];
|
||||||
var url = location.href;
|
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(message)!='undefined'&&message&&message!='success') alert(message);
|
||||||
if(typeof(redirect_url)!='undefined'&&redirect_url) url = redirect_url;
|
if(typeof(redirect_url)!='undefined'&&redirect_url) url = redirect_url;
|
||||||
location.href = url;
|
location.href = url;
|
||||||
|
|
|
||||||
|
|
@ -29,24 +29,31 @@
|
||||||
/**
|
/**
|
||||||
* @brief module의 controller 객체 생성용
|
* @brief module의 controller 객체 생성용
|
||||||
**/
|
**/
|
||||||
function getController($module_name) {
|
function &getController($module_name) {
|
||||||
return getModule($module_name, 'controller');
|
return getModule($module_name, 'controller');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief module의 view 객체 생성용
|
* @brief module의 view 객체 생성용
|
||||||
**/
|
**/
|
||||||
function getView($module_name) {
|
function &getView($module_name) {
|
||||||
return getModule($module_name, 'view');
|
return getModule($module_name, 'view');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief module의 model 객체 생성용
|
* @brief module의 model 객체 생성용
|
||||||
**/
|
**/
|
||||||
function getModel($module_name) {
|
function &getModel($module_name) {
|
||||||
return getModule($module_name, 'model');
|
return getModule($module_name, 'model');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief module의 상위 class 객체 생성용
|
||||||
|
**/
|
||||||
|
function &getClass($module_name) {
|
||||||
|
return getModule($module_name, 'class');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Context::getUrl($args_list)를 쓰기 쉽게 함수로 선언
|
* @brief Context::getUrl($args_list)를 쓰기 쉽게 함수로 선언
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,26 @@
|
||||||
|
|
||||||
var $cache_file = "./files/cache/activated_addons.cache.php";
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -24,5 +24,33 @@
|
||||||
|
|
||||||
Context::set('menu_item', $menu_item);
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -45,5 +45,50 @@
|
||||||
|
|
||||||
$this->setRedirectUrl('./?module=admin');
|
$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');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,17 @@
|
||||||
function init() {
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,11 @@
|
||||||
$this->setLayoutPath($this->getTemplatePath());
|
$this->setLayoutPath($this->getTemplatePath());
|
||||||
$this->setLayoutFile('layout.html');
|
$this->setLayoutFile('layout.html');
|
||||||
|
|
||||||
|
// shortcut 가져오기
|
||||||
|
$oAdminModel = &getModel('admin');
|
||||||
|
$shortcut_list = $oAdminModel->getShortCuts();
|
||||||
|
Context::set('shortcut_list', $shortcut_list);
|
||||||
|
|
||||||
// admin class의 init
|
// admin class의 init
|
||||||
parent::init();
|
parent::init();
|
||||||
}
|
}
|
||||||
|
|
@ -62,6 +67,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 관리자 메뉴 숏컷 출력
|
||||||
|
**/
|
||||||
|
function dispShortCut() {
|
||||||
|
|
||||||
|
$this->setTemplateFile('shortcut_list');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 모듈의 목록을 보여줌
|
* @brief 모듈의 목록을 보여줌
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,14 @@
|
||||||
<action name="dispModuleList" type="view" standalone="true" />
|
<action name="dispModuleList" type="view" standalone="true" />
|
||||||
<action name="dispAddonList" type="view" standalone="true" />
|
<action name="dispAddonList" type="view" standalone="true" />
|
||||||
<action name="dispLayoutList" type="view" standalone="true" />
|
<action name="dispLayoutList" type="view" standalone="true" />
|
||||||
|
<action name="dispShortCut" type="view" standalone="true" />
|
||||||
|
|
||||||
<action name="dispLogin" type="view" standalone="true" />
|
<action name="dispLogin" type="view" standalone="true" />
|
||||||
<action name="dispLogout" type="view" standalone="true" />
|
<action name="dispLogout" type="view" standalone="true" />
|
||||||
|
|
||||||
<action name="procLogin" type="controller" standalone="true" />
|
<action name="procLogin" type="controller" standalone="true" />
|
||||||
<action name="procLogout" type="controller" standalone="true" />
|
<action name="procLogout" type="controller" standalone="true" />
|
||||||
|
<action name="procInsertShortCut" type="controller" standalone="true" />
|
||||||
|
<action name="procDeleteShortCut" type="controller" standalone="true" />
|
||||||
</actions>
|
</actions>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,5 @@
|
||||||
$lang->installed_path = "설치경로";
|
$lang->installed_path = "설치경로";
|
||||||
|
|
||||||
$lang->msg_is_not_administrator = '관리자만 접속이 가능합니다';
|
$lang->msg_is_not_administrator = '관리자만 접속이 가능합니다';
|
||||||
|
$lang->msg_default_act_is_null = '기본 관리자 Action이 지정되어 있지 않아 바로가기 등록을 할 수가 없습니다';
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
8
modules/admin/queries/deleteShortCut.xml
Normal file
8
modules/admin/queries/deleteShortCut.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<query id="deleteShortCut" action="delete">
|
||||||
|
<tables>
|
||||||
|
<table name="admin_shortcut" />
|
||||||
|
</tables>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="equal" column="shortcut_srl" var="shortcut_srl" filter="number" notnull="notnull" />
|
||||||
|
</conditions>
|
||||||
|
</query>
|
||||||
8
modules/admin/queries/getShortCutList.xml
Normal file
8
modules/admin/queries/getShortCutList.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<query id="getShortCutList" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="admin_shortcut" />
|
||||||
|
</tables>
|
||||||
|
<navigation>
|
||||||
|
<index var="sort_index" default="list_order" order="asc" />
|
||||||
|
</navigation>
|
||||||
|
</query>
|
||||||
13
modules/admin/queries/insertShortCut.xml
Normal file
13
modules/admin/queries/insertShortCut.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<query id="insertShortCut" action="insert">
|
||||||
|
<tables>
|
||||||
|
<table name="admin_shortcut" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="shortcut_srl" var="shortcut_srl" default="sequence()" filter="number" notnull="notnull" />
|
||||||
|
<column name="title" var="title" notnull="notnull" minlength="2" maxlength="250" />
|
||||||
|
<column name="module" var="module" notnull="notnull" minlength="2" maxlength="250" />
|
||||||
|
<column name="default_act" var="default_act" notnull="notnull" minlength="2" maxlength="250" />
|
||||||
|
<column name="regdate" var="regdate" default="curdate()" />
|
||||||
|
<column name="list_order" var="list_order" default="sequence()" />
|
||||||
|
</columns>
|
||||||
|
</query>
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<table name="admin_shortcut">
|
<table name="admin_shortcut">
|
||||||
<column name="shortcut_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
<column name="shortcut_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
|
||||||
<column name="module" type="varchar" size="250" notnull="notnull" />
|
<column name="module" type="varchar" size="250" notnull="notnull" unique="uni_module" />
|
||||||
|
<column name="title" type="varchar" size="250" notnull="notnull" />
|
||||||
<column name="default_act" type="varchar" size="250" notnull="notnull" />
|
<column name="default_act" type="varchar" size="250" notnull="notnull" />
|
||||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||||
<column name="regdate" type="date" />
|
<column name="regdate" type="date" />
|
||||||
|
|
|
||||||
9
modules/admin/tpl/filter/delete_shortcut.xml
Normal file
9
modules/admin/tpl/filter/delete_shortcut.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<filter name="delete_shortcut" module="admin" act="procDeleteShortCut" confirm_msg_code="confirm_delete">
|
||||||
|
<form>
|
||||||
|
<node target="shortcut_srl" required="true" />
|
||||||
|
</form>
|
||||||
|
<response>
|
||||||
|
<tag name="error" />
|
||||||
|
<tag name="message" />
|
||||||
|
</response>
|
||||||
|
</filter>
|
||||||
|
|
@ -17,3 +17,10 @@ function doAdminLoginFocus() {
|
||||||
var fo = xGetElementById('user_id');
|
var fo = xGetElementById('user_id');
|
||||||
if(fo) fo.focus();
|
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);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,22 +14,19 @@
|
||||||
<div id="admin_main_menu">
|
<div id="admin_main_menu">
|
||||||
<!-- 자주 쓰이는 모듈의 경우 별도 등록을 함 -->
|
<!-- 자주 쓰이는 모듈의 경우 별도 등록을 함 -->
|
||||||
<div>
|
<div>
|
||||||
<span <!--@if($mo=='board')-->class="selected"<!--@end-->>
|
<!--@foreach($shortcut_list as $key => $val)-->
|
||||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act','dispAdminContent','mo','board','module_srl','')}'">{$lang->board_manager}</a>
|
<span <!--@if($mo==$val->module)-->class="selected"<!--@end-->>
|
||||||
</span>
|
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act',$val->default_act,'mo',$val->module)}';return false;">{$val->title}</a>
|
||||||
<span <!--@if($mo=='member')-->class="selected"<!--@end-->>
|
|
||||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act','dispAdminContent','mo','member','module_srl','')}'">{$lang->member_manager}</a>
|
|
||||||
</span>
|
|
||||||
<span <!--@if($mo=='layout')-->class="selected"<!--@end-->>
|
|
||||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act','dispContent','mo','layout','module_srl','')}'">{$lang->layout_manager}</a>
|
|
||||||
</span>
|
</span>
|
||||||
|
<!--@end-->
|
||||||
|
[<a href="#" onclick="location.href='{getUrl('','module','admin','act','dispShortCut')}';return false;">{$lang->cmd_management}</a>]
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 애드온,플러그인,레이아웃,에디터컴포넌트등의 목록을 보여줄 메뉴 -->
|
<!-- 애드온,플러그인,레이아웃,에디터컴포넌트등의 목록을 보여줄 메뉴 -->
|
||||||
<div>
|
<div>
|
||||||
<!--@foreach($menu_item as $key => $val)-->
|
<!--@foreach($menu_item as $key => $val)-->
|
||||||
<span <!--@if($act==$val->act)-->class="selected"<!--@end-->>
|
<span <!--@if($act==$val->act)-->class="selected"<!--@end-->>
|
||||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act',$val->act,'mo','','module_srl','')}'">{$val->title}</a>
|
<a href="#" onclick="location.href='{getUrl('','module', $module, 'act',$val->act,'mo','','module_srl','')}';return false;">{$val->title}</a>
|
||||||
</span>
|
</span>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -37,7 +34,7 @@
|
||||||
|
|
||||||
<!--@if($selected_module_info)-->
|
<!--@if($selected_module_info)-->
|
||||||
<div id="admin_module_info">
|
<div id="admin_module_info">
|
||||||
<a href="#" onclick="location.href='{getUrl('','module', $module, 'mo', $mo, 'act', $selected_module_info->admin_index_act)}'">{$selected_module_info->title}</a> (ver {$selected_module_info->version})
|
<a href="#" onclick="location.href='{getUrl('','module', $module, 'mo', $mo, 'act', $selected_module_info->admin_index_act)}';return false;">{$selected_module_info->title}</a> (ver {$selected_module_info->version})
|
||||||
</div>
|
</div>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
|
|
|
||||||
35
modules/admin/tpl/shortcut_list.html
Normal file
35
modules/admin/tpl/shortcut_list.html
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<!--%import("filter/delete_shortcut.xml")-->
|
||||||
|
<!--%import("js/admin.js")-->
|
||||||
|
|
||||||
|
<!--#include("./header.html")-->
|
||||||
|
|
||||||
|
<!-- 숏컷의 위/아래, 삭제와 관련된 form -->
|
||||||
|
<form id="fo_shortcut_info" action="./" method="get">
|
||||||
|
<input type="hidden" name="shortcut_srl" value="" />
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>{$lang->title}</th>
|
||||||
|
<th>{$lang->module}</th>
|
||||||
|
<th>{$lang->regdate}</th>
|
||||||
|
<th>{$lang->cmd_delete}</th>
|
||||||
|
</tr>
|
||||||
|
<!--@if(!count($shortcut_list))-->
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">{$lang->msg_shortcut_is_null}</td>
|
||||||
|
</tr>
|
||||||
|
<!--@end-->
|
||||||
|
<!--@foreach($shortcut_list as $shortcut_info)-->
|
||||||
|
<tr>
|
||||||
|
<td>{$shortcut_info->title}</td>
|
||||||
|
<td>{$shortcut_info->module}</td>
|
||||||
|
<td>{zdate($shortcut_info->last_update,"Y-m-d H:i:s")}</td>
|
||||||
|
<td><a href="#" onclick="doDeleteShortCut('{$shortcut_info->shortcut_srl}');return false;">{$lang->cmd_delete}</a></td>
|
||||||
|
</tr>
|
||||||
|
<!--@end-->
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
@ -16,5 +16,26 @@
|
||||||
|
|
||||||
var $editor = 'default'; ///< 에디터 종류
|
var $editor = 'default'; ///< 에디터 종류
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,26 @@
|
||||||
|
|
||||||
class comment extends ModuleObject {
|
class comment extends ModuleObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,26 @@
|
||||||
// 관리자페이지에서 사용할 검색 옵션
|
// 관리자페이지에서 사용할 검색 옵션
|
||||||
var $search_option = array('title','content','title_content','user_name',); ///< 검색 옵션
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
<column name="email_address" type="varchar" size="250" notnull="notnull" />
|
<column name="email_address" type="varchar" size="250" notnull="notnull" />
|
||||||
<column name="homepage" type="varchar" size="250" notnull="notnull" />
|
<column name="homepage" type="varchar" size="250" notnull="notnull" />
|
||||||
<column name="tags" type="text" />
|
<column name="tags" type="text" />
|
||||||
<column name="regdate" type="date" index="idx_regdate" index="idx_regdate " />
|
<column name="regdate" type="date" index="idx_regdate " />
|
||||||
<column name="last_update" type="date" index="idx_last_update" />
|
<column name="last_update" type="date" index="idx_last_update" />
|
||||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress"/>
|
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress"/>
|
||||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,38 @@
|
||||||
|
|
||||||
class file extends ModuleObject {
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,26 @@
|
||||||
|
|
||||||
class install extends ModuleObject {
|
class install extends ModuleObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -77,49 +77,10 @@
|
||||||
// DB접속이 가능한지 체크
|
// DB접속이 가능한지 체크
|
||||||
if(!$oDB->isConnected()) return new Object(-1, 'msg_dbconnect_failed');
|
if(!$oDB->isConnected()) return new Object(-1, 'msg_dbconnect_failed');
|
||||||
|
|
||||||
// 모든 모듈의 테이블 생성
|
// 모든 모듈의 설치
|
||||||
$output = $this->makeTable();
|
$output = $this->installDownloadedModule();
|
||||||
if(!$output->toBool()) return $output;
|
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 파일 생성
|
// config 파일 생성
|
||||||
if(!$this->makeConfigFile()) return new Object(-1, 'msg_install_failed');
|
if(!$this->makeConfigFile()) return new Object(-1, 'msg_install_failed');
|
||||||
|
|
||||||
|
|
@ -144,11 +105,6 @@
|
||||||
'./files/cache/queries',
|
'./files/cache/queries',
|
||||||
'./files/cache/js_filter_compiled',
|
'./files/cache/js_filter_compiled',
|
||||||
'./files/cache/template_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) {
|
foreach($directory_list as $dir) {
|
||||||
|
|
@ -159,31 +115,55 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DB Table 생성
|
* @brief 모든 모듈의 설치
|
||||||
*
|
*
|
||||||
* 모든 module의 schemas 디렉토리를 확인하여 schema xml을 이용, 테이블 생성
|
* 모든 module의 schemas 디렉토리를 확인하여 schema xml을 이용, 테이블 생성
|
||||||
**/
|
**/
|
||||||
function makeTable() {
|
function installDownloadedModule() {
|
||||||
// db instance생성
|
|
||||||
$oDB = &DB::getInstance();
|
// install 모듈은 미리 설치
|
||||||
|
$this->installModule('install', './modules/install/');
|
||||||
|
|
||||||
// 각 모듈의 schemas/*.xml 파일을 모두 찾아서 table 생성
|
// 각 모듈의 schemas/*.xml 파일을 모두 찾아서 table 생성
|
||||||
$module_list_1 = FileHandler::readDir('./modules/', NULL, false, true);
|
$module_list_1 = FileHandler::readDir('./modules/', NULL, false, true);
|
||||||
$module_list_2 = FileHandler::readDir('./files/modules/', NULL, false, true);
|
$module_list_2 = FileHandler::readDir('./files/modules/', NULL, false, true);
|
||||||
$module_list = array_merge($module_list_1, $module_list_2);
|
$module_list = array_merge($module_list_1, $module_list_2);
|
||||||
foreach($module_list as $module_path) {
|
foreach($module_list as $module_path) {
|
||||||
|
// 모듈 이름을 구함
|
||||||
|
$tmp_arr = explode('/',$module_path);
|
||||||
|
$module = $tmp_arr[count($tmp_arr)-1];
|
||||||
|
|
||||||
|
// 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_dir = sprintf('%s/schemas/', $module_path);
|
||||||
$schema_files = FileHandler::readDir($schema_dir, NULL, false, true);
|
$schema_files = FileHandler::readDir($schema_dir, NULL, false, true);
|
||||||
$file_cnt = count($schema_files);
|
|
||||||
if(!$file_cnt) continue;
|
|
||||||
|
|
||||||
|
$file_cnt = count($schema_files);
|
||||||
for($i=0;$i<$file_cnt;$i++) {
|
for($i=0;$i<$file_cnt;$i++) {
|
||||||
$file = trim($schema_files[$i]);
|
$file = trim($schema_files[$i]);
|
||||||
if(!$file || substr($file,-4)!='.xml') continue;
|
if(!$file || substr($file,-4)!='.xml') continue;
|
||||||
$output = $oDB->createTableByXmlFile($file);
|
$output = $oDB->createTableByXmlFile($file);
|
||||||
if($oDB->isError()) return $oDB->getError();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 테이블 설치후 module instance를 만들고 install() method를 실행
|
||||||
|
unset($oModule);
|
||||||
|
$oModule = &getClass($module);
|
||||||
|
if(method_exists($oModule, 'moduleInstall')) $oModule->moduleInstall();
|
||||||
|
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,26 @@
|
||||||
var $port = 80;
|
var $port = 80;
|
||||||
var $query = '/server.php?addr3=';
|
var $query = '/server.php?addr3=';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,37 @@
|
||||||
|
|
||||||
class layout extends ModuleObject {
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,60 @@
|
||||||
|
|
||||||
class member extends ModuleObject {
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,26 @@
|
||||||
|
|
||||||
class message extends ModuleObject {
|
class message extends ModuleObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,9 @@
|
||||||
$lang->module_list = "모듈 목록";
|
$lang->module_list = "모듈 목록";
|
||||||
$lang->module_index = "초기화면";
|
$lang->module_index = "초기화면";
|
||||||
$lang->module_category = "모듈 카테고리";
|
$lang->module_category = "모듈 카테고리";
|
||||||
|
$lang->add_shortcut = "관리자 메뉴에 추가";
|
||||||
|
|
||||||
$lang->category_title = "카테고리 이름";
|
$lang->category_title = "카테고리 이름";
|
||||||
|
$lang->cmd_add_shortcut = "바로가기 추가";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,42 @@
|
||||||
|
|
||||||
class module extends ModuleObject {
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
9
modules/module/tpl.admin/filter/insert_shortcut.xml
Normal file
9
modules/module/tpl.admin/filter/insert_shortcut.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<filter name="insert_shortcut" module="admin" act="procInsertShortCut" confirm_msg_code="confirm_submit">
|
||||||
|
<form>
|
||||||
|
<node target="module" required="true" />
|
||||||
|
</form>
|
||||||
|
<response>
|
||||||
|
<tag name="error" />
|
||||||
|
<tag name="message" />
|
||||||
|
</response>
|
||||||
|
</filter>
|
||||||
|
|
@ -24,3 +24,10 @@ function completeUpdateCategory(ret_obj) {
|
||||||
var url = "./?module=admin&mo=module&act=dispCategory";
|
var url = "./?module=admin&mo=module&act=dispCategory";
|
||||||
location.href = url;
|
location.href = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 선택된 모듈을 관리자 메뉴의 바로가기에 등록 */
|
||||||
|
function doAddShortCut(module) {
|
||||||
|
var fo_obj = xGetElementById("fo_shortcut");
|
||||||
|
fo_obj.selected_module.value = module;
|
||||||
|
procFilter(fo_obj, insert_shortcut);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,13 @@
|
||||||
|
<!--%import("filter/insert_shortcut.xml")-->
|
||||||
|
<!--%import("js/admin.js")-->
|
||||||
|
|
||||||
<!--#include("header.html")-->
|
<!--#include("header.html")-->
|
||||||
|
|
||||||
|
<!-- 관리자 메뉴 바로가기 추가를 위한 임시 form -->
|
||||||
|
<form id="fo_shortcut" action="./" method="get">
|
||||||
|
<input type="hidden" name="selected_module" value="" />
|
||||||
|
</form>
|
||||||
|
|
||||||
<table border="1" width="100%">
|
<table border="1" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$lang->module_name}</td>
|
<td>{$lang->module_name}</td>
|
||||||
|
|
@ -7,6 +16,7 @@
|
||||||
<td>{$lang->date}</td>
|
<td>{$lang->date}</td>
|
||||||
<td>{$lang->table_count}</td>
|
<td>{$lang->table_count}</td>
|
||||||
<td>{$lang->installed_path}</td>
|
<td>{$lang->installed_path}</td>
|
||||||
|
<td>{$lang->add_shortcut}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--@foreach($module_list as $key => $val)-->
|
<!--@foreach($module_list as $key => $val)-->
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -31,6 +41,7 @@
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>{$val->path}</td>
|
<td>{$val->path}</td>
|
||||||
|
<td rowspan="2"><a href="#" onclick="doAddShortCut('{$val->module}');return false;">{$lang->cmd_add_shortcut}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,26 @@
|
||||||
"rss10" => "rss 1.0",
|
"rss10" => "rss 1.0",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,26 @@
|
||||||
|
|
||||||
class spamfilter extends ModuleObject {
|
class spamfilter extends ModuleObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,26 @@
|
||||||
|
|
||||||
class tag extends ModuleObject {
|
class tag extends ModuleObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,26 @@
|
||||||
|
|
||||||
class trackback extends ModuleObject {
|
class trackback extends ModuleObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치시 추가 작업이 필요할시 구현
|
||||||
|
**/
|
||||||
|
function moduleInstall() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 설치가 이상이 없는지 체크하는 method
|
||||||
|
**/
|
||||||
|
function moduleIsInstalled() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 업데이트 실행
|
||||||
|
**/
|
||||||
|
function moduleUpdate() {
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue