Divide page into general and ftp configuration

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9449 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
chschy 2011-09-30 06:37:26 +00:00
parent f2e6ec8496
commit 7183d77707
7 changed files with 99 additions and 61 deletions

View file

@ -334,7 +334,7 @@
* @brief Display Configuration(settings) page
* @return none
**/
function dispAdminConfig() {
function dispAdminConfigGeneral() {
Context::loadLang('modules/install/lang');
$db_info = Context::getDBInfo();
@ -357,9 +357,6 @@
Context::set('favicon_url', $favicon_url);
Context::set('mobicon_url', $mobicon_url);
$ftp_info = Context::getFTPInfo();
Context::set('ftp_info', $ftp_info);
$oDocumentModel = &getModel('document');
$config = $oDocumentModel->getDocumentConfig();
Context::set('thumbnail_type',$config->thumbnail_type);
@ -376,11 +373,28 @@
Context::set('start_module', $start_module);
Context::set('pwd',$pwd);
$this->setTemplateFile('config');
$this->setTemplateFile('config_general');
$security = new Security();
$security->encodeHTML('news..', 'released_version', 'download_link', 'selected_lang', 'module_list..', 'module_list..author..', 'addon_list..', 'addon_list..author..', 'start_module.');
}
/**
* @brief Display Configuration(settings) page
* @return none
**/
function dispAdminConfigFtp() {
Context::loadLang('modules/install/lang');
$ftp_info = Context::getFTPInfo();
Context::set('ftp_info', $ftp_info);
$this->setTemplateFile('config_ftp');
// $security = new Security();
// $security->encodeHTML('ftp_info..');
}
/**

View file

@ -157,7 +157,7 @@
),
19=>array(
'module'=>'admin',
'subMenu'=>array('adminConfiguration', 'adminMenuSetup'),
'subMenu'=>array('adminConfigurationGeneral', 'adminConfigurationFtp', 'adminMenuSetup'),
),
20=>array(
'module'=>'file',
@ -242,7 +242,8 @@
case 'spamFilter':
return 'extensions';
break;
case 'adminConfiguration':
case 'adminConfigurationGeneral':
case 'adminConfigurationFtp':
case 'adminMenuSetup':
case 'fileUpload':
case 'filebox':

View file

@ -4,7 +4,8 @@
<permissions />
<actions>
<action name="dispAdminIndex" type="view" standalone="true" index="true" />
<action name="dispAdminConfig" type="view" standalone="true" menu_name="adminConfiguration" menu_index="true" />
<action name="dispAdminConfigGeneral" type="view" standalone="true" menu_name="adminConfigurationGeneral" menu_index="true" />
<action name="dispAdminConfigFtp" type="view" standalone="true" menu_name="adminConfigurationFtp" menu_index="true" />
<action name="dispAdminTheme" type="view" standalone="true" menu_name="theme" menu_index="true" />
<action name="dispAdminSetup" type="view" standalone="true" menu_name="adminMenuSetup" menu_index="true" />
@ -22,7 +23,7 @@
<action name="getSiteAllList" type="model" standalone="true" />
</actions>
<menus>
<menu name="adminConfiguration" type="all">
<menu name="adminConfigurationGeneral" type="all">
<title xml:lang="en">General</title>
<title xml:lang="ko">일반</title>
<title xml:lang="zh-CN">General</title>
@ -48,6 +49,19 @@
<title xml:lang="mn">Admin Setup</title>
<title xml:lang="tr">Admin Setup</title>
</menu>
<menu name="adminConfigurationFtp" type="all">
<title xml:lang="en">General</title>
<title xml:lang="ko">FTP 설정</title>
<title xml:lang="zh-CN">FTP Configuration</title>
<title xml:lang="jp">FTP Configuration</title>
<title xml:lang="es">FTP Configuration</title>
<title xml:lang="ru">FTP Configuration</title>
<title xml:lang="fr">FTP Configuration</title>
<title xml:lang="zh-TW">FTP Configuration</title>
<title xml:lang="vi">FTP Configuration</title>
<title xml:lang="mn">FTP Configuration</title>
<title xml:lang="tr">FTP Configuration</title>
</menu>
<menu name="theme" type="site">
<title xml:lang="en">Theme</title>
<title xml:lang="ko">테마</title>

View file

@ -1,9 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<lang>
<item name="title_genaral">
<value xml:lang="ko"><![CDATA[일반]]></value>
<value xml:lang="en"><![CDATA[Genaral]]></value>
</item>
<item name="subtitle_primary">
<value xml:lang="ko"><![CDATA[기본]]></value>
<value xml:lang="en"><![CDATA[Primary]]></value>

View file

@ -0,0 +1,58 @@
<load target="./js/config.js" usecdn="true" />
<load target="../install/lang/lang.xml" usecdn="true" />
<load target="../../session/tpl/js/session.js" usecdn="true" />
<form action="" method="post" id="ftp_form" class="form" enctype="multipart/form-data">
<input type="hidden" name="act" value="procInstallAdminSaveFTPInfo" />
<fieldset class="section">
<h1 class="h1">{$lang->menu_gnb_sub['adminConfigurationFtp']}</h1>
<ul>
<li>
<p class="q"><label for="ftp_host">{$lang->ftp_host}</label> [<a href="#helpFTP" class="tgAnchor">?</a>]</p>
<div class="tgContent layer" id="helpFTP">
<p>{$lang->detail_about_ftp_info}</p>
</div>
<p class="a"><input type="text" name="ftp_host" id="ftp_host" value="{$ftp_info->ftp_host}" /></p>
</li>
<li>
<p class="q"><label for="ftp_user">{$lang->user_id}</label></p>
<p class="a"><input type="text" name="ftp_user" id="ftp_user" value="{$ftp_info->ftp_user}" /></p>
<li>
<p class="q"><label for="ftp_password">{$lang->password}</label></p>
<p class="a"><input type="password" name="ftp_password" id="ftp_password" value="" /> <span class="desc">{$lang->about_ftp_password}</span></p>
</li>
<li>
<p class="q"><label for="ftp_port">{$lang->ftp_port}</label></p>
<p class="a"><input type="text" name="ftp_port" id="ftp_port" value="{$ftp_info->ftp_port}" /></p>
</li>
<li>
<p class="q"><label for="ftp_passive">{$lang->about_use_ftp_passive_mode}</label></p>
<p class="a">
<input type="radio" name="ftp_pasv" id="ftp_passive_y" value="Y" <!--@if($ftp_info->ftp_pasv == 'Y')-->checked="checked" <!--@end-->/> <label for="ftp_passive_y">{$lang->cmd_yes}</label>
<input type="radio" name="ftp_pasv" id="ftp_passive_n" value="N" <!--@if($ftp_info->ftp_pasv != 'Y')-->checked="checked" <!--@end-->/> <label for="ftp_passive_n">{$lang->cmd_no}</label>
</p>
</li>
<li>
<p class="q"><label for="sftp">{$lang->about_use_sftp_support}</label></p>
<p class="a">
<input type="radio" name="sftp" id="sftp_y" value="Y" <!--@if($ftp_info->sftp == 'Y')-->checked="checked" <!--@end-->/> <label for="sftp_y">{$lang->cmd_yes}</label>
<input type="radio" name="sftp" id="sftp_n" value="N" <!--@if($ftp_info->sftp != 'Y')-->checked="checked" <!--@end-->/> <label for="sftp_n">{$lang->cmd_no}</label>
</p>
</li>
<li>
<p class="q"><label for="ftp_path">{$lang->msg_ftp_installed_ftp_realpath}</label></p>
<p class="a">
<input type="text" name="ftp_root_path" id="ftp_root_path" value="{$ftp_info->ftp_root_path}" />
<a href="#ftpSuggestion" onclick="getFTPList(); return false;" class="tgAnchor">{$lang->ftp_get_list}</a>
</p>
<div id="ftpSuggestion">
</div>
<p class="desc">{$lang->msg_ftp_installed_realpath} : {_XE_PATH_} </p>
</li>
</ul>
</fieldset>
<div class="btnArea">
<span class="btn medium"><input type="submit" value="{$lang->cmd_save}" /></span>
</div>
</form>

View file

@ -22,7 +22,7 @@ jQuery(function($){
<form action="" method="post" id="ftp_form" class="form" enctype="multipart/form-data">
<input type="hidden" name="act" value="procInstallAdminConfig" />
<h1 class="h1">{$lang->title_genaral}</h1>
<h1 class="h1">{$lang->menu_gnb_sub['adminConfigurationGeneral']}</h1>
<fieldset class="section">
<h2 class="h2">{$lang->subtitle_primary}</h2>
<ul>
@ -107,49 +107,6 @@ jQuery(function($){
<textarea name="htmlFooter" id="htmlFooter" rows="4" cols="42">{$htmlFooter}</textarea>
</p>
</li>
<li>
<p class="q"><label for="ftp_host">{$lang->ftp_host}</label> [<a href="#helpFTP" class="tgAnchor">?</a>]</p>
<div class="tgContent layer" id="helpFTP">
<p>{$lang->detail_about_ftp_info}</p>
</div>
<p class="a"><input type="text" name="ftp_host" id="ftp_host" value="{$ftp_info->ftp_host}" /></p>
</li>
<li>
<p class="q"><label for="ftp_user">{$lang->user_id}</label></p>
<p class="a"><input type="text" name="ftp_user" id="ftp_user" value="{$ftp_info->ftp_user}" /></p>
<li>
<p class="q"><label for="ftp_password">{$lang->password}</label></p>
<p class="a"><input type="password" name="ftp_password" id="ftp_password" value="" /> <span class="desc">{$lang->about_ftp_password}</span></p>
</li>
<li>
<p class="q"><label for="ftp_port">{$lang->ftp_port}</label></p>
<p class="a"><input type="text" name="ftp_port" id="ftp_port" value="{$ftp_info->ftp_port}" /></p>
</li>
<li>
<p class="q"><label for="ftp_passive">{$lang->about_use_ftp_passive_mode}</label></p>
<p class="a">
<input type="radio" name="ftp_pasv" id="ftp_passive_y" value="Y" <!--@if($ftp_info->ftp_pasv == 'Y')-->checked="checked" <!--@end-->/> <label for="ftp_passive_y">{$lang->cmd_yes}</label>
<input type="radio" name="ftp_pasv" id="ftp_passive_n" value="N" <!--@if($ftp_info->ftp_pasv != 'Y')-->checked="checked" <!--@end-->/> <label for="ftp_passive_n">{$lang->cmd_no}</label>
</p>
</li>
<li>
<p class="q"><label for="sftp">{$lang->about_use_sftp_support}</label></p>
<p class="a">
<input type="radio" name="sftp" id="sftp_y" value="Y" <!--@if($ftp_info->sftp == 'Y')-->checked="checked" <!--@end-->/> <label for="sftp_y">{$lang->cmd_yes}</label>
<input type="radio" name="sftp" id="sftp_n" value="N" <!--@if($ftp_info->sftp != 'Y')-->checked="checked" <!--@end-->/> <label for="sftp_n">{$lang->cmd_no}</label>
</p>
</li>
<li>
<p class="q"><label for="ftp_path">{$lang->msg_ftp_installed_ftp_realpath}</label></p>
<p class="a">
<input type="text" name="ftp_root_path" id="ftp_root_path" value="{$ftp_info->ftp_root_path}" />
<a href="#ftpSuggestion" onclick="getFTPList(); return false;" class="tgAnchor">{$lang->ftp_get_list}</a>
</p>
<div id="ftpSuggestion">
</div>
<p class="desc">{$lang->msg_ftp_installed_realpath} : {_XE_PATH_} </p>
</li>
<li>
<p class="q">{$lang->allow_use_favicon}</p>
<p class="a faviconPreview">

View file

@ -153,14 +153,12 @@
FileHandler::WriteFile($config_file, $buff);
if($_SESSION['ftp_password']) unset($_SESSION['ftp_password']);
$this->setMessage('success_updated');
}
$this->setRedirectUrl(Context::get('error_return_url'));
}
function procInstallAdminConfig(){
$this->procInstallAdminSaveTimeZone();
//FTP 정보
$this->procInstallAdminSaveFTPInfo();
//언어 선택
$selected_lang = Context::get('selected_lang');
$this->saveLangSelected($selected_lang);