mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@202 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
0463fa5b58
commit
9a9f9af0bc
14 changed files with 162 additions and 1 deletions
|
|
@ -227,7 +227,6 @@
|
|||
|
||||
// 해당 위치에 속한 lang 파일을 읽음
|
||||
Context::loadLang($class_path.'lang');
|
||||
debugPrint($class_path.'lang');
|
||||
|
||||
// 생성된 객체에 자신이 호출된 위치를 세팅해줌
|
||||
$oModule->setModule($module);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<module>
|
||||
<actions>
|
||||
<action name="dispMemberList" type="view" standalone="true" index="true" admin_index="true" />
|
||||
<action name="dispModuleConfig" type="view" standalone="true" />
|
||||
<action name="dispMemberInfo" type="view" standalone="true" />
|
||||
<action name="dispMemberInsert" type="view" standalone="true" />
|
||||
<action name="dispDeleteForm" type="view" standalone="true" />
|
||||
|
|
@ -14,6 +15,7 @@
|
|||
<action name="procLogout" type="controller" standalone="true" />
|
||||
<action name="procInsert" type="controller" standalone="true" />
|
||||
<action name="procDelete" type="controller" standalone="true" />
|
||||
<action name="procInsertConfig" type="controller" standalone="true" />
|
||||
<action name="procInsertGroup" type="controller" standalone="true" />
|
||||
<action name="procUpdateGroup" type="controller" standalone="true" />
|
||||
<action name="procInsertJoinForm" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
|
||||
$lang->cmd_module_config = '기본 설정';
|
||||
$lang->cmd_member_group = '그룹 관리';
|
||||
$lang->cmd_send_mail = '메일발송';
|
||||
$lang->cmd_manage_id = '금지아이디관리';
|
||||
|
|
@ -27,6 +28,10 @@
|
|||
$lang->group_title = '그룹제목';
|
||||
$lang->group_srl = '그룹번호';
|
||||
|
||||
$lang->enable_join = '회원 가입 허가';
|
||||
$lang->redirect_url = '회원 가입후 이동할 페이지';
|
||||
$lang->agreement = '회원 가입 약관';
|
||||
|
||||
$lang->column_type = '형식';
|
||||
$lang->column_type_list['text'] = '한줄 입력칸 (text)';
|
||||
$lang->column_type_list['homepage'] = '홈페이지 형식 (url)';
|
||||
|
|
@ -69,4 +74,8 @@
|
|||
$lang->about_active = '활성 항목에 체크를 하셔야 가입시 정상적으로 노출됩니다';
|
||||
$lang->about_form_description = '설명란에 입력을 하시면 가입시 표시가 됩니다';
|
||||
$lang->about_required = '체크하시면 회원가입시 필수항목으로 입력하도록 됩니다';
|
||||
|
||||
$lang->about_enable_join = '체크를 하셔야 사용자들이 회원가입을 할 수 있습니다';
|
||||
$lang->about_redirect_url = '회원 가입후 이동할 url을 입력해 주세요. 비어 있으면 가입 이전 페이지로 돌아갑니다';
|
||||
$lang->about_agreement = '회원가입약관이 없을 경우 표시되지 않습니다';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -122,6 +122,20 @@
|
|||
$this->setMessage("success_deleted");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 관리용 기본 정보의 추가
|
||||
**/
|
||||
function procInsertSetup() {
|
||||
// 기본 정보를 받음
|
||||
$args = Context::gets('enable_join','redirect_url','agreement');
|
||||
if($args->enable_join!='Y') $args->enable_join = 'N';
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('member',$args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 사용자 그룹 추가
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -56,6 +56,19 @@
|
|||
$this->setTemplateFile('member_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 관리에 필요한 기본 설정들
|
||||
**/
|
||||
function dispModuleConfig() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
Context::set('config',$config);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('member_config');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 정보 출력
|
||||
**/
|
||||
|
|
|
|||
7
modules/member/tpl.admin/filter/insert_config.xml
Normal file
7
modules/member/tpl.admin/filter/insert_config.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<filter name="insert_config" module="member" act="procInsertConfig" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<response />
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<div style="margin-bottom:20px;">
|
||||
<span>[<a href="{getUrl('act','dispMemberList','member_srl','')}">{$lang->cmd_list}</a>]</span>
|
||||
<span <!--@if($act=='dispModuleConfig')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispModuleConfig')}">{$lang->cmd_module_config}</a>]</span>
|
||||
<span <!--@if($act=='dispGroupList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispGroupList')}">{$lang->cmd_member_group}</a>]</span>
|
||||
<span <!--@if($act=='dispJoinFormList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispJoinFormList')}">{$lang->cmd_manage_form}</a>]</span>
|
||||
<span <!--@if($act=='dispDeniedIDList')-->style="font-weight:bold"<!--@end-->>[<a href="{getUrl('act','dispDeniedIDList')}">{$lang->cmd_manage_id}</a>]</span>
|
||||
|
|
|
|||
34
modules/member/tpl.admin/member_config.html
Normal file
34
modules/member/tpl.admin/member_config.html
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<!--#include("header.html")-->
|
||||
<!--%import("filter/insert_config.xml")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->enable_join}</th>
|
||||
<td><input type="checkbox" name="enable_join" value="Y" <!--@if($config->enable_join=='Y')-->checked="true"<!--@end-->/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_enable_join}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->redirect_url}</th>
|
||||
<td><input type="text" name="redirect_url" value="{$config->redirect_url}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_redirect_url}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->agreement}</th>
|
||||
<td><textarea name="agreement">{$config->agreement}</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_agreement}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" value="{$lang->cmd_cancel}" onclick="location.href='{@getUrl('act','')}'" />
|
||||
<input type="submit" value="{$lang->cmd_registration}" accesskey="s" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
@ -37,6 +37,29 @@
|
|||
return $this->insertModule($args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 기본 정보 입력
|
||||
* 모듈의 정보를 입력받은 데이터를 serialize하여 등록한다.
|
||||
**/
|
||||
function insertModuleConfig($module, $config) {
|
||||
// 변수 정리
|
||||
$args->module = $module;
|
||||
$args->config = serialize($config);
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 일단 삭제 (캐쉬 파일도 지운다)
|
||||
$output = $oDB->executeQuery('module.deleteModuleConfig', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
@unlink( sprintf('./files/cache/module_info/%s.config.php',$module) );
|
||||
|
||||
// 변수 정리후 query 실행
|
||||
$output = $oDB->executeQuery('module.insertModuleConfig', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 입력
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -279,6 +279,31 @@
|
|||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 설정 정보 return
|
||||
* 캐시된 설정 정보가 없으면 만들 후 캐시하고 return
|
||||
**/
|
||||
function getModuleConfig($module) {
|
||||
$cache_file = sprintf('./files/cache/module_info/%s.config.php',$module);
|
||||
if(!file_exists($cache_file)) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module = $module;
|
||||
$output = $oDB->executeQuery('module.getModuleConfig', $args);
|
||||
|
||||
$config = $output->data;
|
||||
|
||||
$buff = sprintf('<?php if(!__ZB5__) exit(); $config = "%s"; ?>', $config);
|
||||
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
}
|
||||
|
||||
if(file_exists($cache_file)) @include($cache_file);
|
||||
|
||||
return unserialize($config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함
|
||||
**/
|
||||
|
|
|
|||
8
modules/module/queries/deleteModuleConfig.xml
Normal file
8
modules/module/queries/deleteModuleConfig.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<query id="deleteModuleConfig" action="delete">
|
||||
<tables>
|
||||
<table name="module_config" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module" var="module" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
11
modules/module/queries/getModuleConfig.xml
Normal file
11
modules/module/queries/getModuleConfig.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getModuleConfig" action="select">
|
||||
<tables>
|
||||
<table name="module_config" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="config" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module" var="module" />
|
||||
</conditions>
|
||||
</query>
|
||||
10
modules/module/queries/insertModuleConfig.xml
Normal file
10
modules/module/queries/insertModuleConfig.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<query id="insertModuleConfig" action="insert">
|
||||
<tables>
|
||||
<table name="module_config" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module" default="module" notnull="notnull" />
|
||||
<column name="config" var="config" />
|
||||
<column name="regdate" default="curdate()" />
|
||||
</columns>
|
||||
</query>
|
||||
5
modules/module/schemas/module_config.xml
Normal file
5
modules/module/schemas/module_config.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<table name="module_config">
|
||||
<column name="module" type="varchar" size="250" notnull="notnull" primary_key="primary_key" />
|
||||
<column name="config" type="text" />
|
||||
<column name="regdate" type="date" />
|
||||
</table>
|
||||
Loading…
Add table
Add a link
Reference in a new issue