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

This commit is contained in:
zero 2007-03-30 06:10:00 +00:00
parent df75151c85
commit 91ef593ae8
18 changed files with 268 additions and 263 deletions

View file

@ -2,83 +2,85 @@
<!--#include("header.html")-->
<div>
{$lang->total_count} : {number_format($total_count)},
{$lang->page_count} : {number_format($page)} / {number_format($total_page)}
{$lang->total_count} : {number_format($total_count)},
{$lang->page_count} : {number_format($page)} / {number_format($total_page)}
</div>
<form action="./" method="get" onsubmit="return procFilter(this, delete_checked)">
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="page" value="{$page}" />
<!-- 목록 -->
<div>
<table>
<tr>
<th colspan="2">{$lang->no}</th>
<th>{$lang->module}</th>
<th>{$lang->file_name}</th>
<th>{$lang->file_size}</th>
<th>{$lang->download_count}</th>
<th>{$lang->date}</th>
<th>{$lang->ipaddress}</th>
<th>{$lang->cmd_move_to_document}</th>
<th>{$lang->cmd_download}</th>
</tr>
<!--@foreach($file_list as $no => $val)-->
<tr>
<td>{$no}</td>
<td><input type="checkbox" name="cart" value="{$val->file_srl}" /></td>
<td><a href="#" onclick="window.open('./?mid={$val->mid}');return false">{$module_list[$val->module_srl]->browser_title}</a></td>
<td>{$val->source_filename}</td>
<td>{$val->file_size}</td>
<td>{$val->download_count}</td>
<td>{zdate($val->regdate,"Y-m-d")}</td>
<td>{$val->ipaddress}</td>
<td><a href="#" onclick="window.open('./?document_srl={$val->upload_target_srl}');return false">{$lang->cmd_move}</a></td>
<td><a href="{$val->download_url}">{$lang->cmd_download}</a></td>
</tr>
<!--@end-->
</table>
</div>
<div>
<table>
<tr>
<th colspan="2">{$lang->no}</th>
<th>{$lang->module}</th>
<th>{$lang->file_name}</th>
<th>{$lang->file_size}</th>
<th>{$lang->download_count}</th>
<th>{$lang->date}</th>
<th>{$lang->ipaddress}</th>
<th>{$lang->cmd_move_to_document}</th>
<th>{$lang->cmd_download}</th>
</tr>
<!-- 버튼 -->
<div>
<input type="submit" value="{$lang->cmd_delete_checked_file}" />
</div>
<!--@foreach($file_list as $no => $val)-->
<tr>
<td>{$no}</td>
<td><input type="checkbox" name="cart" value="{$val->file_srl}" /></td>
<td><a href="#" onclick="window.open('./?mid={$val->mid}');return false">{$module_list[$val->module_srl]->browser_title}</a></td>
<td>{$val->source_filename}</td>
<td>{$val->file_size}</td>
<td>{$val->download_count}</td>
<td>{zdate($val->regdate,"Y-m-d")}</td>
<td>{$val->ipaddress}</td>
<td><a href="#" onclick="window.open('./?document_srl={$val->upload_target_srl}');return false">{$lang->cmd_move}</a></td>
<td><a href="{$val->download_url}">{$lang->cmd_download}</a></td>
</tr>
<!--@end-->
</table>
</div>
<!-- 버튼 -->
<div>
<input type="submit" value="{$lang->cmd_delete_checked_file}" />
</div>
</form>
<!-- 검색 -->
<div>
<form action="./" method="get">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="mo" value="{$mo}" />
<input type="hidden" name="act" value="{$act}" />
<form action="./" method="get">
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="mo" value="{$mo}" />
<input type="hidden" name="act" value="{$act}" />
<div>
<select name="search_target">
<option value="">{$lang->search_target}</option>
<!--@foreach($lang->search_target_list as $key => $val)-->
<option value="{$key}" <!--@if($search_target==$key)-->selected="true"<!--@end-->>{$val}</option>
<!--@end-->
</select>
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
<input type="submit" value="{$lang->cmd_search}" />
<input type="button" value="{$lang->cmd_cancel}" onclick="location.href='{getUrl('','module',$module,'mo',$mo,'act',$act)}'"/>
</div>
</form>
<div>
<select name="search_target">
<option value="">{$lang->search_target}</option>
<!--@foreach($lang->search_target_list as $key => $val)-->
<option value="{$key}" <!--@if($search_target==$key)-->selected="true"<!--@end-->>{$val}</option>
<!--@end-->
</select>
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" />
<input type="submit" value="{$lang->cmd_search}" />
<input type="button" value="{$lang->cmd_cancel}" onclick="location.href='{getUrl('','module',$module,'mo',$mo,'act',$act)}'"/>
</div>
</form>
</div>
<!-- 페이지 네비게이션 -->
<div>
<a href="{getUrl('page','','file_srl','')}">[{$lang->first_page}]</a>
<a href="{getUrl('page','','file_srl','')}">[{$lang->first_page}]</a>
<!--@while($page_no = $page_navigation->getNextPage())-->
<!--@if($page == $page_no)-->
{$page_no}
<!--@else-->
<a href="{getUrl('page',$page_no,'file_srl','')}">[{$page_no}]</a>
<!--@end-->
<!--@end-->
<!--@while($page_no = $page_navigation->getNextPage())-->
<!--@if($page == $page_no)-->
{$page_no}
<!--@else-->
<a href="{getUrl('page',$page_no,'file_srl','')}">[{$page_no}]</a>
<!--@end-->
<!--@end-->
<a href="{getUrl('page',$page_navigation->last_page,'file_srl','')}">[{$lang->last_page}]</a>
<a href="{getUrl('page',$page_navigation->last_page,'file_srl','')}">[{$lang->last_page}]</a>
</div>

View file

@ -1,12 +1,12 @@
<filter name="delete_checked" module="file" act="procDeleteChecked" confirm_msg_code="confirm_delete">
<form>
<node target="cart" required="true" />
</form>
<parameter>
<param name="cart" target="cart" />
</parameter>
<response>
<tag name="error" />
<tag name="message" />
</response>
<filter name="delete_checked" module="file" act="procEditorAdminDeleteChecked" confirm_msg_code="confirm_delete">
<form>
<node target="cart" required="true" />
</form>
<parameter>
<param name="cart" target="cart" />
</parameter>
<response>
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<module version="0.1">
<title xml:lang="ko">설치관리</title>
<title xml:lang="en">install</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">설치 관리 모듈</description>
<description xml:lang="en">install</description>
</author>
<title xml:lang="ko">설치관리</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<description xml:lang="ko">설치 관리 모듈</description>
</author>
</module>

View file

@ -2,7 +2,7 @@
<module>
<grants />
<actions>
<action name="dispIntroduce" type="view" standalone="true" index="true" />
<action name="dispInstallIntroduce" type="view" standalone="true" index="true" />
<action name="dispInstallForm" type="view" standalone="true" />
<action name="procInstall" type="controller" standalone="true" />
</actions>

View file

@ -16,6 +16,37 @@
if(Context::isInstalled()) return $this->dispMessage('msg_already_installed');
}
/**
* @brief 입력받은 정보로 설치를
**/
function procInstall() {
// 설치가 되어 있는지에 대한 체크
if(Context::isInstalled()) return new Object(-1, 'msg_already_installed');
// DB와 관련된 변수를 받음
$db_info = Context::gets('db_type','db_hostname','db_userid','db_password','db_database','db_table_prefix');
// DB의 타입과 정보를 등록
Context::setDBInfo($db_info);
// DB Instance 생성
$oDB = &DB::getInstance();
// DB접속이 가능한지 체크
if(!$oDB->isConnected()) return new Object(-1, 'msg_dbconnect_failed');
// 모든 모듈의 설치
$output = $this->installDownloadedModule();
if(!$output->toBool()) return $output;
// config 파일 생성
if(!$this->makeConfigFile()) return new Object(-1, 'msg_install_failed');
// 설치 완료 메세지 출력
$this->setMessage('msg_install_completed');
$this->setRedirectUrl('./');
}
/**
* @brief 인스톨 환경을 체크하여 결과 return
**/
@ -57,38 +88,6 @@
return $install_enable;
}
/**
* @brief 입력받은 정보로 설치를
**/
function procInstall() {
// 설치가 되어 있는지에 대한 체크
if(Context::isInstalled()) return new Object(-1, 'msg_already_installed');
// DB와 관련된 변수를 받음
$db_info = Context::gets('db_type','db_hostname','db_userid','db_password','db_database','db_table_prefix');
// DB의 타입과 정보를 등록
Context::setDBInfo($db_info);
// DB Instance 생성
$oDB = &DB::getInstance();
// DB접속이 가능한지 체크
if(!$oDB->isConnected()) return new Object(-1, 'msg_dbconnect_failed');
// 모든 모듈의 설치
$output = $this->installDownloadedModule();
if(!$output->toBool()) return $output;
// config 파일 생성
if(!$this->makeConfigFile()) return new Object(-1, 'msg_install_failed');
// 설치 완료 메세지 출력
$this->setMessage('msg_install_completed');
$this->setRedirectUrl('./');
}
/**
* @brief files 하위 디렉토리 생성
* DB 정보를 바탕으로 실제 install하기 전에 로컬 환경 설저d

View file

@ -30,7 +30,7 @@
/**
* @brief license 설치 환경에 대한 메세지 보여줌
**/
function dispIntroduce() {
function dispInstallIntroduce() {
$this->setTemplateFile('introduce');
}

View file

@ -1,3 +1,3 @@
<table name="sequence">
<column name="seq" type="number" notnull="notnull" size="64" primary_key="primary_key" auto_increment="auto_increment" />
<column name="seq" type="number" notnull="notnull" size="64" primary_key="primary_key" auto_increment="auto_increment" />
</table>

View file

@ -1,34 +1,34 @@
<filter name="install" module="install" act="procInstall">
<form>
<node target="db_type" required="true" />
<node target="db_hostname" required="true" minlength="1" maxlength="250" />
<node target="db_userid" required="true" minlength="1" maxlength="250"/>
<node target="db_password" required="true" minlength="1" maxlength="250" />
<node target="db_database" required="true" minlength="1" maxlength="250" />
<node target="db_table_prefix" required="true" minlength="2" maxlength="20" filter="alpha"/>
<node target="user_id" required="true" minlength="3" maxlength="20" filter="alpha,userid" />
<node target="password1" required="true" minlength="1" maxlength="20" />
<node target="password2" required="true" equalto="password1" minlength="1" maxlegnth="20" />
<node target="user_name" required="true" minlength="3" maxlength="20" />
<node target="nick_name" required="true" minlength="3" maxlength="20" />
<node target="email_address" required="true" minlength="1" maxlength="200" filter="email"/>
</form>
<parameter>
<param name="db_type" target="db_type" />
<param name="db_hostname" target="db_hostname" />
<param name="db_userid" target="db_userid" />
<param name="db_password" target="db_password" />
<param name="db_database" target="db_database" />
<param name="db_table_prefix" target="db_table_prefix" />
<param name="user_id" target="user_id" />
<param name="password" target="password1" />
<param name="user_name" target="user_name" />
<param name="nick_name" target="nick_name" />
<param name="email_address" target="email_address" />
</parameter>
<response>
<tag name="error" />
<tag name="message" />
<tag name="redirect_url" />
</response>
<form>
<node target="db_type" required="true" />
<node target="db_hostname" required="true" minlength="1" maxlength="250" />
<node target="db_userid" required="true" minlength="1" maxlength="250"/>
<node target="db_password" required="true" minlength="1" maxlength="250" />
<node target="db_database" required="true" minlength="1" maxlength="250" />
<node target="db_table_prefix" required="true" minlength="2" maxlength="20" filter="alpha"/>
<node target="user_id" required="true" minlength="3" maxlength="20" filter="alpha,userid" />
<node target="password1" required="true" minlength="1" maxlength="20" />
<node target="password2" required="true" equalto="password1" minlength="1" maxlegnth="20" />
<node target="user_name" required="true" minlength="3" maxlength="20" />
<node target="nick_name" required="true" minlength="3" maxlength="20" />
<node target="email_address" required="true" minlength="1" maxlength="200" filter="email"/>
</form>
<parameter>
<param name="db_type" target="db_type" />
<param name="db_hostname" target="db_hostname" />
<param name="db_userid" target="db_userid" />
<param name="db_password" target="db_password" />
<param name="db_database" target="db_database" />
<param name="db_table_prefix" target="db_table_prefix" />
<param name="user_id" target="user_id" />
<param name="password" target="password1" />
<param name="user_name" target="user_name" />
<param name="nick_name" target="nick_name" />
<param name="email_address" target="email_address" />
</parameter>
<response>
<tag name="error" />
<tag name="message" />
<tag name="redirect_url" />
</response>
</filter>

View file

@ -1,88 +1,89 @@
<!--%import("filter/mysql.xml")-->
<form action="./" method="post" onsubmit="return procFilter(this, install)">
<input type="hidden" name="db_type" value="{$db_type}" />
<table border="1">
<tr>
<td colspan="2">
{$lang->db_title}
</td>
</tr>
<tr>
<td>{$lang->db_hostname}</td>
<td>
<input type="text" name="db_hostname" value="127.0.0.1" />
</td>
</tr>
<tr>
<td>{$lang->db_userid}</td>
<td>
<input type="text" name="db_userid" value="dev" />
</td>
</tr>
<tr>
<td>{$lang->db_password}</td>
<td>
<input type="password" name="db_password" value="1234" />
</td>
</tr>
<tr>
<td>{$lang->db_database}</td>
<td>
<input type="text" name="db_database" value="dev" />
</td>
</tr>
<tr>
<td>{$lang->db_table_prefix}</td>
<td>
<input type="text" name="db_table_prefix" value="xe" />
</td>
</tr>
</table>
<input type="hidden" name="db_type" value="{$db_type}" />
<table border="1">
<tr>
<td colspan="2">
{$lang->admin_title}
</td>
</tr>
<tr>
<td>{$lang->user_id}</td>
<td>
<input type="text" name="user_id" value="zero" />
</td>
</tr>
<tr>
<td>{$lang->password1}</td>
<td>
<input type="password" name="password1" value="1234" />
</td>
</tr>
<tr>
<td>{$lang->password2}</td>
<td>
<input type="password" name="password2" value="1234" />
</td>
</tr>
<tr>
<td>{$lang->user_name}</td>
<td>
<input type="text" name="user_name" value="zero" />
</td>
</tr>
<tr>
<td>{$lang->nick_name}</td>
<td>
<input type="text" name="nick_name" value="zero" />
</td>
</tr>
<tr>
<td>{$lang->email_address}</td>
<td>
<input type="text" name="email_address" value="zero@nzeo.com" />
</td>
</tr>
</table>
<table border="1">
<tr>
<td colspan="2">
{$lang->db_title}
</td>
</tr>
<tr>
<td>{$lang->db_hostname}</td>
<td>
<input type="text" name="db_hostname" value="127.0.0.1" />
</td>
</tr>
<tr>
<td>{$lang->db_userid}</td>
<td>
<input type="text" name="db_userid" value="dev" />
</td>
</tr>
<tr>
<td>{$lang->db_password}</td>
<td>
<input type="password" name="db_password" value="1234" />
</td>
</tr>
<tr>
<td>{$lang->db_database}</td>
<td>
<input type="text" name="db_database" value="dev" />
</td>
</tr>
<tr>
<td>{$lang->db_table_prefix}</td>
<td>
<input type="text" name="db_table_prefix" value="xe" />
</td>
</tr>
</table>
<input type="submit" value="{$lang->cmd_registration}" />
<table border="1">
<tr>
<td colspan="2">
{$lang->admin_title}
</td>
</tr>
<tr>
<td>{$lang->user_id}</td>
<td>
<input type="text" name="user_id" value="zero" />
</td>
</tr>
<tr>
<td>{$lang->password1}</td>
<td>
<input type="password" name="password1" value="1234" />
</td>
</tr>
<tr>
<td>{$lang->password2}</td>
<td>
<input type="password" name="password2" value="1234" />
</td>
</tr>
<tr>
<td>{$lang->user_name}</td>
<td>
<input type="text" name="user_name" value="zero" />
</td>
</tr>
<tr>
<td>{$lang->nick_name}</td>
<td>
<input type="text" name="nick_name" value="zero" />
</td>
</tr>
<tr>
<td>{$lang->email_address}</td>
<td>
<input type="text" name="email_address" value="zero@nzeo.com" />
</td>
</tr>
</table>
<input type="submit" value="{$lang->cmd_registration}" />
</form>

View file

@ -1,46 +1,50 @@
<table border="1">
<tr>
<td colspan="2">{$lang->introduce_title}</td>
<td colspan="2">{$lang->introduce_title}</td>
</tr>
<tr>
<td>
{nl2br($lang->introduce)}
</td>
<td>
{nl2br($lang->introduce)}
</td>
</tr>
</table>
<table border="1">
<tr>
<td colspan="2">{$lang->install_condition_title}</td>
<td colspan="2">{$lang->install_condition_title}</td>
</tr>
<!--@foreach($checklist as $key => $val)-->
<tr>
<td rowspan="2">{$lang->install_checklist_title[$key]}</td>
<td><!--@if($val)-->{$lang->enable}<!--@else-->{$lang->disable}<!--@end--></td>
<td rowspan="2">{$lang->install_checklist_title[$key]}</td>
<td><!--@if($val)-->{$lang->enable}<!--@else-->{$lang->disable}<!--@end--></td>
</tr>
<tr>
<td>{$lang->install_checklist_desc[$key]}</td>
<td>{$lang->install_checklist_desc[$key]}</td>
</tr>
<!--@end-->
</table>
<!--@if($install_enable)-->
<form method="get" action="./">
<input type="hidden" name="act" value="dispInstallForm" />
<table border="1">
<tr>
<td>{$lang->db_type}</td>
<td>
<select name="db_type">
<!--@foreach(DB::getSupportedList() as $_key => $_db_name)-->
<option value="{$_db_name}">{$_db_name}</option>
<!--@end-->
</select>
</td>
<td><input type="submit" value="{$lang->cmd_install_next}" /></td>
<input type="hidden" name="act" value="dispInstallForm" />
<table border="1">
<tr>
<td>{$lang->db_type}</td>
<td>
<select name="db_type">
<!--@foreach(DB::getSupportedList() as $_key => $_db_name)-->
<option value="{$_db_name}">{$_db_name}</option>
<!--@end-->
</select>
</td>
<td><input type="submit" value="{$lang->cmd_install_next}" /></td>
</tr>
</table>
</form>
<!--@else-->
<a href="./">{$lang->cmd_install_fix_checklist}</a>
<!--@end-->

View file

@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<module version="0.1">
<title xml:lang="ko">한국 우편번호 검색</title>
<title xml:lang="en">Korea Zipcode Finder</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">한국 우편번호 검색을 담당합니다.</description>
<description xml:lang="en">Korea Zipcode Finder</description>
</author>
<title xml:lang="ko">한국 우편번호 검색</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<description xml:lang="ko">제로보드에서 운영하는 우편번호서버를 이용하여 우편번호 검색을 합니다.</description>
</author>
</module>

View file

@ -2,8 +2,8 @@
<module>
<grants />
<actions>
<action name="dispConfig" type="view" admin_index="true" standalone="true" />
<action name="procInsertConfig" type="controller" standalone="true" />
<action name="getZipCodeList" type="model" index="true" standalone="true" />
<action name="dispKrzipAdminConfig" type="view" admin_index="true" standalone="true" />
<action name="procKrzipAdminInsertConfig" type="controller" standalone="true" />
<action name="getKrzipCodeList" type="model" index="true" standalone="true" />
</actions>
</module>

View file

@ -15,6 +15,11 @@
* @brief 설치시 추가 작업이 필요할시 구현
**/
function moduleInstall() {
// action forward에 등록 (관리자 모드에서 사용하기 위함)
$oModuleController = &getController('module');
$oModuleController->insertActionFoward('krzip', 'view', 'dispKrzipAdminConfig');
$oModuleController->insertActionFoward('krzip', 'controller', 'procKrzipAdminInsertConfig');
return new Object();
}

View file

@ -16,7 +16,7 @@
/**
* @brief 설정
**/
function procInsertConfig() {
function procKrzipAdminInsertConfig() {
// 기본 정보를 받음
$args = Context::gets('krzip_server_hostname','krzip_server_port','krzip_server_query');
if(!$args->krzip_server_hostname) $args->krzip_server_hostname = $this->hostname;

View file

@ -17,7 +17,7 @@
* @brief 우편 번호 검색
* 동이름을 입력받아서 지정된 서버에 우편번호 목록을 요청한다
**/
function getZipCodeList() {
function getKrzipCodeList() {
// 설정 정보를 받아옴 (module model 객체를 이용)
$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('krzip');

View file

@ -17,7 +17,7 @@
/**
* @brief 설정
**/
function dispConfig() {
function dispKrzipAdminConfig() {
// 설정 정보를 받아옴 (module model 객체를 이용)
$oModuleModel = &getModel('module');
$config = $oModuleModel->getModuleConfig('krzip');