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

This commit is contained in:
zero 2007-02-20 04:13:48 +00:00
parent 756ecc1423
commit fb0ad9dd4b
23 changed files with 161 additions and 198 deletions

View file

@ -93,7 +93,7 @@
function close() { function close() {
// DB close // DB close
$oDB = &DB::getInstance(); $oDB = &DB::getInstance();
if($oDB) $oDB->close(); if(is_object($oDB)&&method_exists($oDB, 'close')) $oDB->close();
} }
/** /**

View file

@ -32,7 +32,7 @@
<!--@end--> <!--@end-->
<!-- 글쓰기 폼 --> <!-- 글쓰기 폼 -->
<form action="./" method="get" onsubmit="return procFormFilter(this, insert_comment, procInsertComment)"> <form action="./" method="get" onsubmit="return procFilter(this, insert_comment)">
<input type="hidden" name="mid" value="{$mid}" /> <input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="procInsertComment" /> <input type="hidden" name="act" value="procInsertComment" />
<input type="hidden" name="document_srl" value="{$document_srl}" /> <input type="hidden" name="document_srl" value="{$document_srl}" />

View file

@ -1,7 +1,7 @@
<!--%import("filter/filter.delete_comment.xml")--> <!--%import("filter/filter.delete_comment.xml")-->
<!--#include("header.html")--> <!--#include("header.html")-->
<form action="./" method="get" onsubmit="return procFormFilter(this, delete_comment, procDeleteComment)"> <form action="./" method="get" onsubmit="return procFilter(this, delete_comment)">
<input type="hidden" name="mid" value="{$mid}" /> <input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="procDeleteComment" /> <input type="hidden" name="act" value="procDeleteComment" />
<input type="hidden" name="page" value="{$page}" /> <input type="hidden" name="page" value="{$page}" />

View file

@ -1,7 +1,7 @@
<!--%import("filter/filter.delete_document.xml")--> <!--%import("filter/filter.delete_document.xml")-->
<!--#include("header.html")--> <!--#include("header.html")-->
<form action="./" method="get" onsubmit="return procFormFilter(this, delete_document, procDeleteDocument)"> <form action="./" method="get" onsubmit="return procFilter(this, delete_document)">
<input type="hidden" name="mid" value="{$mid}" /> <input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="procDeleteDocument" /> <input type="hidden" name="act" value="procDeleteDocument" />
<input type="hidden" name="page" value="{$page}" /> <input type="hidden" name="page" value="{$page}" />

View file

@ -1,7 +1,7 @@
<!--%import("filter/filter.delete_trackback.xml")--> <!--%import("filter/filter.delete_trackback.xml")-->
<!--#include("header.html")--> <!--#include("header.html")-->
<form action="./" method="get" onsubmit="return procFormFilter(this, delete_trackback, procDeleteTrackback)"> <form action="./" method="get" onsubmit="return procFormFilter(this, delete_trackback)">
<input type="hidden" name="mid" value="{$mid}" /> <input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="procDeleteTrackback" /> <input type="hidden" name="act" value="procDeleteTrackback" />
<input type="hidden" name="page" value="{$page}" /> <input type="hidden" name="page" value="{$page}" />

View file

@ -1,19 +1,19 @@
<filter id="delete_comment"> <filter name="delete_comment" module="board" act="procDeleteComment">
<field> <form>
<item target="comment_srl" required="true" /> <node target="comment_srl" required="true" />
</field> </form>
<parameter> <parameter>
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="act" target="act" /> <param name="act" target="act" />
<item param="page" target="page" /> <param name="page" target="page" />
<item param="document_srl" target="document_srl" /> <param name="document_srl" target="document_srl" />
<item param="comment_srl" target="comment_srl" /> <param name="comment_srl" target="comment_srl" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
<item name="mid" /> <tag name="mid" />
<item name="document_srl" /> <tag name="document_srl" />
<item name="page" /> <tag name="page" />
</response> </response>
</filter> </filter>

View file

@ -1,17 +1,17 @@
<filter id="delete_document"> <filter name="delete_document" module="board" act="procDeleteDocument">
<field> <form>
<item target="document_srl" required="true" /> <node target="document_srl" required="true" />
</field> </form>
<parameter> <parameter>
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="act" target="act" /> <param name="act" target="act" />
<item param="page" target="page" /> <param name="page" target="page" />
<item param="document_srl" target="document_srl" /> <param name="document_srl" target="document_srl" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
<item name="mid" /> <tag name="mid" />
<item name="page" /> <tag name="page" />
</response> </response>
</filter> </filter>

View file

@ -1,19 +1,19 @@
<filter id="delete_trackback"> <filter name="delete_trackback" module="board" act="procDeleteTrackback">
<field> <form>
<item target="trackback_srl" required="true" /> <node target="trackback_srl" required="true" />
</field> </form>
<parameter> <parameter>
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="act" target="act" /> <param name="act" target="act" />
<item param="page" target="page" /> <param name="page" target="page" />
<item param="document_srl" target="document_srl" /> <param name="document_srl" target="document_srl" />
<item param="trackback_srl" target="trackback_srl" /> <param name="trackback_srl" target="trackback_srl" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
<item name="mid" /> <tag name="mid" />
<item name="document_srl" /> <tag name="document_srl" />
<item name="page" /> <tag name="page" />
</response> </response>
</filter> </filter>

View file

@ -1,17 +1,17 @@
<filter id="input_password"> <filter name="input_password" module="board" act="procVerificationPassword" >
<field> <form>
<item target="document_srl" required="true" /> <node target="document_srl" required="true" />
<item target="password" required="true" /> <node target="password" required="true" />
</field> </form>
<parameter> <parameter>
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="act" target="act" /> <param name="act" target="act" />
<item param="document_srl" target="document_srl" /> <param name="document_srl" target="document_srl" />
<item param="comment_srl" target="comment_srl" /> <param name="comment_srl" target="comment_srl" />
<item param="password" target="password" /> <param name="password" target="password" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
</response> </response>
</filter> </filter>

View file

@ -1,18 +1,18 @@
<filter id="insert" confirm_msg_code="confirm_submit"> <filter name="insert" module="board" act="procInsert" confirm_msg_code="confirm_submit">
<field> <form>
<item target="document_srl" required="true" /> <node target="document_srl" required="true" />
<item target="user_name" required="true" /> <node target="user_name" required="true" />
<item target="password" required="true" /> <node target="password" required="true" />
<item target="email_address" maxlength="250" /> <node target="email_address" maxlength="250" />
<item target="homepage" maxlength="250"/> <node target="homepage" maxlength="250"/>
<item target="title" required="true" minlength="1" maxlength="250" /> <node target="title" required="true" minlength="1" maxlength="250" />
<item target="content" required="true" /> <node target="content" required="true" />
</field> </form>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
<item name="mid" /> <tag name="mid" />
<item name="document_srl" /> <tag name="document_srl" />
<item name="category_srl" /> <tag name="category_srl" />
</response> </response>
</filter> </filter>

View file

@ -1,29 +1,29 @@
<filter id="insert_comment" confirm_msg_code="confirm_submit"> <filter name="insert_comment" module="board" action="procInsertComment" confirm_msg_code="confirm_submit">
<field> <form>
<item target="document_srl" required="true" /> <node target="document_srl" required="true" />
<item target="user_name" required="true" /> <node target="user_name" required="true" />
<item target="password" required="true" /> <node target="password" required="true" />
<item target="email_address" maxlength="250" /> <node target="email_address" maxlength="250" />
<item target="homepage" maxlength="250"/> <node target="homepage" maxlength="250"/>
<item target="content" required="true" minlength="1" /> <node target="content" required="true" minlength="1" />
</field> </form>
<parameter> <parameter>
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="act" target="act" /> <param name="act" target="act" />
<item param="document_srl" target="document_srl" /> <param name="document_srl" target="document_srl" />
<item param="comment_srl" target="comment_srl" /> <param name="comment_srl" target="comment_srl" />
<item param="parent_srl" target="parent_srl" /> <param name="parent_srl" target="parent_srl" />
<item param="user_name" target="user_name" /> <param name="user_name" target="user_name" />
<item param="password" target="password" /> <param name="password" target="password" />
<item param="email_address" target="email_address" /> <param name="email_address" target="email_address" />
<item param="homepage" target="homepage" /> <param name="homepage" target="homepage" />
<item param="content" target="content" /> <param name="content" target="content" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
<item name="mid" /> <tag name="mid" />
<item name="document_srl" /> <tag name="document_srl" />
<item name="comment_srl" /> <tag name="comment_srl" />
</response> </response>
</filter> </filter>

View file

@ -1,16 +1,16 @@
<filter id="login"> <filter name="login" module="board" act="procLogin">
<field> <form>
<item target="user_id" required="true" filter="user_id"/> <node target="user_id" required="true" filter="user_id"/>
<item target="password" required="true" /> <node target="password" required="true" />
</field> </form>
<parameter> <parameter>
<item param="user_id" target="user_id" /> <param name="user_id" target="user_id" />
<item param="password" target="password" /> <param name="password" target="password" />
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="act" target="act" /> <param name="act" target="act" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
</response> </response>
</filter> </filter>

View file

@ -1,14 +1,14 @@
<filter id="logout"> <filter name="logout" module="board" act="procLogout">
<field> <form>
<item target="mid" required="true" /> <node target="mid" required="true" />
<item target="act" required="true" /> <node target="act" required="true" />
</field> </form>
<parameter> <parameter>
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="act" target="act" /> <param name="act" target="act" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
</response> </response>
</filter> </filter>

View file

@ -1,15 +1,15 @@
<filter id="search"> <filter name="search" module="board" act="procSearch">
<field> <form>
<item target="search_target" required="true" /> <node target="search_target" required="true" />
<item target="keyword" minlegnth="2" maxlength="40" required="true" /> <node target="keyword" minlegnth="2" maxlength="40" required="true" />
</field> </form>
<parameter> <parameter>
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="search_target" target="search_target" /> <param name="search_target" target="search_target" />
<item param="keyword" target="keyword" /> <param name="keyword" target="keyword" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
</response> </response>
</filter> </filter>

View file

@ -1,14 +1,14 @@
<filter id="vote" confirm_msg_code="confirm_vote"> <filter name="vote" module="board" act="procVote" confirm_msg_code="confirm_vote">
<field> <form>
<item target="document_srl" required="true" /> <node target="document_srl" required="true" />
</field> </form>
<parameter> <parameter>
<item param="mid" target="mid" /> <param name="mid" target="mid" />
<item param="act" target="act" /> <param name="act" target="act" />
<item param="document_srl" target="document_srl" /> <param name="document_srl" target="document_srl" />
</parameter> </parameter>
<response> <response>
<item name="error" /> <tag name="error" />
<item name="message" /> <tag name="message" />
</response> </response>
</filter> </filter>

View file

@ -1,7 +1,7 @@
<!--%import("filter/filter.input_password.xml")--> <!--%import("filter/filter.input_password.xml")-->
<!--#include("header.html")--> <!--#include("header.html")-->
<form action="./" method="get" onsubmit="return procFormFilter(this, input_password, procReload)"> <form action="./" method="get" onsubmit="return procFilter(this, input_password)">
<input type="hidden" name="mid" value="{$mid}" /> <input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="procVerificationPassword" /> <input type="hidden" name="act" value="procVerificationPassword" />
<input type="hidden" name="page" value="{$page}" /> <input type="hidden" name="page" value="{$page}" />

View file

@ -1,39 +0,0 @@
/**
* @file : modules/board/js/admin.js
* @author : zero <zero@nzeo.com>
* @desc : board 모듈의 관리자용 javascript
**/
/* 모듈 생성 후 */
function procInsertModule(ret_obj, response_tags) {
var error = ret_obj['error'];
var message = ret_obj['message'];
var sid = ret_obj['sid'];
var act = ret_obj['act'];
var page = ret_obj['page'];
var module_srl = ret_obj['module_srl'];
alert(message);
url = "./admin.php?sid="+sid+"&module_srl="+module_srl+"&page="+page+"&act="+act;
location.href = url;
}
/* 카테고리 관련 작업들 */
function doUpdateCategory(category_srl, mode, message) {
if(typeof(message)!='undefined'&&!confirm(message)) return;
var fo_obj = xGetElementById('fo_module_category_info');
fo_obj.category_srl.value = category_srl;
fo_obj.mode.value = mode;
procFormFilter(fo_obj, update_category_info, procReload);
}
/* 메세지 출력후 현페이지 리로드 */
function procReload(ret_obj, response_tags) {
var error = ret_obj['error'];
var message = ret_obj['message'];
if(message) alert(message);
location.href = location.href;
}

View file

@ -1,7 +1,7 @@
<!--%import("filter/filter.login.xml")--> <!--%import("filter/filter.login.xml")-->
<!--#include("header.html")--> <!--#include("header.html")-->
<form action="./" method="get" onsubmit="return procFormFilter(this, login, procReload)"> <form action="./" method="get" onsubmit="return procFilter(this, login)">
<input type="hidden" name="mid" value="{$mid}" /> <input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="procLogin" /> <input type="hidden" name="act" value="procLogin" />
<table> <table>

View file

@ -1,7 +1,7 @@
<!--%import("filter/filter.logout.xml")--> <!--%import("filter/filter.logout.xml")-->
<!--#include("header.html")--> <!--#include("header.html")-->
<form action="./" method="get" onsubmit="return procFormFilter(this, logout, procReload)"> <form action="./" method="get" onsubmit="return procFilter(this, logout)">
<input type="hidden" name="mid" value="{$mid}" /> <input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="procLogout" /> <input type="hidden" name="act" value="procLogout" />
<table> <table>

View file

@ -1,7 +1,7 @@
<!--%import("filter/filter.insert.xml")--> <!--%import("filter/filter.insert.xml")-->
<!--#include("header.html")--> <!--#include("header.html")-->
<form action="./" method="post" onsubmit="return procFormFilter(this, insert, procInsert)" <!--@if($grant->fileupload)-->enctype="multipart/form-data"<!--@end-->> <form action="./" method="post" onsubmit="return procFilter(this, insert)" <!--@if($grant->fileupload)-->enctype="multipart/form-data"<!--@end-->>
<input type="hidden" name="mid" value="{$mid}" /> <input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="procInsertDocument" /> <input type="hidden" name="act" value="procInsertDocument" />
<input type="hidden" name="content" value="{htmlspecialchars($document->content)}" /> <input type="hidden" name="content" value="{htmlspecialchars($document->content)}" />

View file

@ -1,4 +1,3 @@
<!--%import("js/install.js")-->
<!--%import("filter/mysql.xml")--> <!--%import("filter/mysql.xml")-->
<form action="./" method="post" onsubmit="return procFilter(this, install)"> <form action="./" method="post" onsubmit="return procFilter(this, install)">

View file

@ -1,4 +1,3 @@
<!--%import("js/install.js")-->
<table border="1"> <table border="1">
<tr> <tr>
<td colspan="2">{$lang->introduce_title}</td> <td colspan="2">{$lang->introduce_title}</td>

View file

@ -33,6 +33,7 @@
$actions = $xml_obj->module->actions->action; ///< action list (필수) $actions = $xml_obj->module->actions->action; ///< action list (필수)
// 권한 정보의 정리 // 권한 정보의 정리
if($grants) {
if(is_array($grants)) $grant_list = $grants; if(is_array($grants)) $grant_list = $grants;
else $grant_list[] = $grants; else $grant_list[] = $grants;
@ -45,8 +46,10 @@
$output->grant->{$name}->title = $title; $output->grant->{$name}->title = $title;
$output->grant->{$name}->default = $default; $output->grant->{$name}->default = $default;
} }
}
// actions 정리 // actions 정리
if($actions) {
if(is_array($actions)) $action_list = $actions; if(is_array($actions)) $action_list = $actions;
else $action_list[] = $actions; else $action_list[] = $actions;
@ -58,6 +61,7 @@
$output->action->{$name}->type = $type; $output->action->{$name}->type = $type;
$output->action->{$name}->grant = $grant; $output->action->{$name}->grant = $grant;
} }
}
return $output; return $output;
} }