git-svn-id: http://xe-core.googlecode.com/svn/trunk@367 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-12 00:08:16 +00:00
parent 1818b37865
commit 44959c3a23
10 changed files with 89 additions and 0 deletions

View file

@ -183,5 +183,35 @@
return $output;
}
/**
* @brief 모듈 카테고리 추가
**/
function procInsertModuleCategory() {
$oDB = &DB::getInstance();
$args->title = Context::get('title');
return $oDB->executeQuery('module.insertModuleCategory', $args);
}
/**
* @brief 모듈 카테고리의 제목 변경
**/
function procUpdateModuleCategory() {
$oDB = &DB::getInstance();
$args->title = Context::get('title');
$args->module_category_srl = Context::get('module_category_srl');
return $oDB->executeQuery('module.updateModuleCategory', $args);
}
/**
* @brief 모듈 카테고리 삭제
**/
function procUpdateModuleCategory() {
$oDB = &DB::getInstance();
$args->module_category_srl = Context::get('module_category_srl');
return $oDB->executeQuery('module.deleteModuleCategory', $args);
}
}
?>

View file

@ -376,5 +376,21 @@
return $list;
}
/**
* @brief 모듈 카테고리의 목록을 구함
**/
function getModuleCategories() {
// DB 객체 생성
$oDB = &DB::getInstance();
// 데이터를 DB에서 가져옴
$args->document_srl = $document_srl;
$output = $oDB->executeQuery('module.getModuleCategories', $args);
if(!$output->toBool()) return $output;
if(!is_array($output->data)) return array($output->data);
return $output->data;
}
}
?>

View file

@ -0,0 +1,8 @@
<query id="deleteModuleCategory" action="insert">
<tables>
<table name="module_categories" />
</tables>
<conditions>
<condition operation="equal" column="module_category_srl" var="module_category_srl" filter="number" notnull="notnull"/>
</conditions>
</query>

View file

@ -0,0 +1,6 @@
<query id="getModuleCategories" action="select">
<tables>
<table name="module_categories" />
</tables>
<columns />
</query>

View file

@ -4,6 +4,7 @@
</tables>
<columns>
<column name="module_srl" default="module_srl" notnull="notnull" />
<column name="module_category_srl" default="module_category_srl" />
<column name="mid" var="mid" notnull="notnull" minlength="1" maxlength="40" />
<column name="skin" var="skin" notnull="notnull" minlength="1" maxlength="250" />
<column name="browser_title" var="browser_title" notnull="notnull" minlength="1" maxlength="250" />

View file

@ -0,0 +1,10 @@
<query id="insertModuleCategory" action="insert">
<tables>
<table name="module_categories" />
</tables>
<columns>
<column name="module_category_srl" default="sequence()" />
<column name="title" var="title" notnull="notnull"/>
<column name="regdate" default="curdate()" />
</columns>
</query>

View file

@ -4,6 +4,7 @@
</tables>
<columns>
<column name="mid" var="mid" notnull="notnull" minlength="1" maxlength="40"/>
<column name="module_category_srl" var="module_category_srl" />
<column name="skin" var="skin" notnull="notnull" minlength="1" maxlength="250" />
<column name="browser_title" var="browser_title" notnull="notnull" minlength="1" maxlength="250" />
<column name="description" var="description" />

View file

@ -0,0 +1,11 @@
<query id="updateModuleCategory" action="insert">
<tables>
<table name="module_categories" />
</tables>
<columns>
<column name="title" var="title" notnull="notnull"/>
</columns>
<conditions>
<condition operation="equal" column="module_category_srl" var="module_category_srl" filter="number" notnull="notnull"/>
</conditions>
</query>

View file

@ -0,0 +1,5 @@
<table name="module_categories">
<column name="module_category_srl" type="number" size="11" default="0" notnull="notnull" primary_key="primary_key" />
<column name="title" type="varchar" size="250" />
<column name="regdate" type="date" index="idx_regdate" />
</table>

View file

@ -1,5 +1,6 @@
<table name="modules">
<column name="module_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" />
<column name="module_category_srl" type="number" size="11" notnull="notnull" default="0" />
<column name="layout_srl" type="number" size="11" notnull="notnull" default="0" />
<column name="mid" type="varchar" size="40" notnull="notnull" unique="unique_mid"/>
<column name="skin" type="varchar" size="250" notnull="notnull" />