관리자 레이아웃의 메뉴편집 아래에 언어선택 메뉴 추가

git-svn-id: http://xe-core.googlecode.com/svn/trunk@1891 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-10 05:06:49 +00:00
parent 01f1c8222a
commit 2f328baecf
17 changed files with 148 additions and 138 deletions

View file

@ -26,7 +26,6 @@
var $html_header = NULL; ///< @brief display시에 사용하게 되는 <head>..</head>내의 스크립트코드
var $html_footer = NULL; ///< @brief display시에 사용하게 되는 </body> 바로 앞에 추가될 코드
var $allow_rewrite = false; ///< rewrite module 허용일 경우 true로 세팅
var $path = ''; ///< zbxe의 경로
/**
@ -112,16 +111,9 @@
$this->_set('logged_info', NULL);
}
//////////////////
//$logged_info->is_admin = 'Y';
//$_SESSION['logged_info'] = $logged_info;
//$_SESSION['is_logged'] = true;
//$this->_set('is_logged', true);
//$this->_set('logged_info', $logged_info);
//////////////////
// rewrite 모듈사용 상태 체크
if(file_exists('./.htaccess')&&(function_exists('apache_get_modules')&&in_array('mod_rewrite',apache_get_modules()))) $this->allow_rewrite = true;
if(file_exists('./.htaccess')&&$this->db_info->use_rewrite == 'Y') $this->allow_rewrite = true;
else $this->allow_rewrite = false;
// 상대 경로 설정
$this->path = $this->getRequestUri();
@ -163,6 +155,8 @@
if(file_exists($db_config_file)) @include($db_config_file);
$this->_setDBInfo($db_info);
$GLOBALS['_time_zone'] = $db_info->time_zone;
}
/**

View file

@ -16,6 +16,48 @@
');
}
$time_zone = array(
'-1200' => '[GMT +12:00] Baker Island Time',
'-1100' => '[GMT +11:00] Niue Time, Samoa Standard Time',
'-1000' => '[GMT +10:00] Hawaii-Aleutian Standard Time, Cook Island Time',
'-0930' => '[GMT +09:30] Marquesas Islands Time',
'-0900' => '[GMT +09:00] Alaska Standard Time, Gambier Island Time',
'-0800' => '[GMT +08:00] Pacific Standard Time',
'-0700' => '[GMT +07:00] Mountain Standard Time',
'-0600' => '[GMT +06:00] Central Standard Time',
'-0500' => '[GMT +05:00] Eastern Standard Time',
'-0400' => '[GMT +04:00] Atlantic Standard Time',
'-0330' => '[GMT +03:30] Newfoundland Standard Time',
'-0300' => '[GMT +03:00] Amazon Standard Time, Central Greenland Time',
'-0200' => '[GMT +02:00] Fernando de Noronha Time, South Georgia &amp; the South Sandwich Islands Time',
'-0100' => '[GMT +01:00] Azores Standard Time, Cape Verde Time, Eastern Greenland Time',
'0000' => '[GMT +00:00] Western European Time, Greenwich Mean Time',
'+0100' => '[GMT +01:00] Central European Time, West African Time',
'+0200' => '[GMT +02:00] Eastern European Time, Central African Time',
'+0300' => '[GMT +03:00] Moscow Standard Time, Eastern African Time',
'+0330' => '[GMT +03:30] Iran Standard Time',
'+0400' => '[GMT +04:00] Gulf Standard Time, Samara Standard Time',
'+0430' => '[GMT +04:30] Afghanistan Time',
'+0500' => '[GMT +05:00] Pakistan Standard Time, Yekaterinburg Standard Time',
'+0530' => '[GMT +05:30] Indian Standard Time, Sri Lanka Time',
'+0545' => '[GMT +05:45] Nepal Time',
'+0600' => '[GMT +06:00] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time',
'+0630' => '[GMT +06:30] Cocos Islands Time, Myanmar Time',
'+0700' => '[GMT +07:00] Indochina Time, Krasnoyarsk Standard Time',
'+0800' => '[GMT +08:00] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time',
'+0845' => '[GMT +08:45] Southeastern Western Australia Standard Time',
'+0900' => '[GMT +09:00] Japan Standard Time, Korea Standard Time, Chita Standard Time',
'+0930' => '[GMT +09:30] Australian Central Standard Time',
'+1000' => '[GMT +10:00] Australian Eastern Standard Time, Vladivostok Standard Time',
'+1030' => '[GMT +10:30] Lord Howe Standard Time',
'+1100' => '[GMT +11:00] Solomon Island Time, Magadan Standard Time',
'+1130' => '[GMT +11:30] Norfolk Island Time',
'+1200' => '[GMT +12:00] New Zealand Time, Fiji Time, Kamchatka Standard Time',
'+1245' => '[GMT +12:45] Chatham Islands Time',
'+1300' => '[GMT +13:00] Tonga Time, Phoenix Islands Time',
'+1400' => '[GMT +14:00] Line Island Time',
) ;
/**
* @brief ModuleHandler::getModuleObject($module_name, $type) 쓰기 쉽게 함수로 선언
* @param module_name 모듈이름
@ -160,7 +202,23 @@
$year = (int)substr($str,0,4);
$month = (int)substr($str,4,2);
$day = (int)substr($str,6,2);
return mktime($hour, $min, $sec, $month?$month:1, $day?$day:1, $year);
$time_zone = $GLOBALS['_time_zone'];
if($time_zone<0) $to = -1; else $to = 1;
$t_hour = substr($time_zone,1,2)*$to;
$t_min = substr($time_zone,3,2)*$to;
$server_time_zone = date("O");
if($server_time_zone<0) $so = -1; else $so = 1;
$c_hour = substr($server_time_zone,1,2)*$so;
$c_min = substr($server_time_zone,3,2)*$so;
$g_min = $t_min - $c_min;
$g_hour = $t_hour - $c_hour;
$gap = $g_min*60 + $g_hour*60*60;
return mktime($hour, $min, $sec, $month?$month:1, $day?$day:1, $year)+$gap;
}
/**

View file

@ -48,6 +48,7 @@ address { font-style:normal;}
#gNavigation ul li a:hover { background:url(../images/menuBgIeFix.png) no-repeat; margin-top:-2px; font-weight:bold; color:#ffffff; text-decoration:none;}
#gNavigation ul li.on a:hover { background:url(../images/menuBgIeFix.png) no-repeat; margin-top:0; font-weight:bold; color:#ffffff; text-decoration:none;}
#gNavigation .menuEdit { width:180px; height:30px; text-align:center; margin-top:1em;}
#gNavigation .selLangType { width:180px; height:30px; text-align:center; margin-top:1em;}
#content { float:left; width:100%; padding:71px 0 100px 0;}

View file

@ -20,6 +20,16 @@
<div class="menuEdit">
<a href="{getUrl('','module','admin','act','dispAdminShortCut')}" class="button"><span>{$lang->cmd_shortcut_management}</span></a>
</div>
<div class="selLangType">
Lang : <select name="lang_type" onchange="doChangeLangType(this)">
<option value="{$lang_type}">{$lang_type}</option>
<!--@foreach($lang_supported as $val)-->
<!--@if($val != $lang_type)-->
<option value="{$val}">{$val}</option>
<!--@end-->
<!--@end-->
</select>
</div>
</div>
<div id="content">{$content}</div>

View file

@ -24,7 +24,8 @@
if(Context::isInstalled()) return new Object(-1, 'msg_already_installed');
// DB와 관련된 변수를 받음
$db_info = Context::gets('db_type','db_port','db_hostname','db_userid','db_password','db_database','db_table_prefix');
$db_info = Context::gets('db_type','db_port','db_hostname','db_userid','db_password','db_database','db_table_prefix','time_zone','use_rewrite');
if($db_info->use_rewrite!='Y') $db_info->use_rewrite = 'N';
// DB의 타입과 정보를 등록
Context::setDBInfo($db_info);

View file

@ -14,7 +14,7 @@
**/
function init() {
// template 경로를 지정
$this->setTemplatePath($this->module_path."tpl");
$this->setTemplatePath($this->module_path.'tpl');
// 설치가 되어 있으면 오류
if(Context::isInstalled()) return $this->stop('msg_already_installed');
@ -62,6 +62,8 @@
// db_type이 지정되지 않았다면 다시 초기화면 출력
if(!Context::get('db_type')) return $this->dispInstallSelectDB();
Context::set('time_zone', $GLOBALS['time_zone']);
// disp_db_info_form.html 파일 출력
$tpl_filename = sprintf('form.%s', Context::get('db_type'));
$this->setTemplateFile($tpl_filename);

View file

@ -253,6 +253,12 @@ EndOfLicense;
$lang->admin_title = '관리자정보';
$lang->env_title = '환경 설정';
$lang->use_rewrite = 'rewrite mod 사용';
$lang->about_rewrite = '웹서버에서 rewrite mod를 지원하면 http://주소/?document_srl=123 같이 복잡한 주소를 http://주소/123과 같이 간단하게 줄일 수 있습니다.';
$lang->time_zone = 'time zone';
$lang->about_database_file = 'Sqlite는 파일에 데이터를 저장합니다. 데이터베이스 파일의 위치를 웹에서 접근할 수 없는 곳으로 하셔야 합니다<br/><span style="color:red">데이터 파일은 707퍼미션 설정된 곳으로 지정해주세요.</span>';
$lang->success_installed = '설치가 되었습니다';

View file

@ -50,6 +50,8 @@ div.buttonCenter { text-align:center; }
#content .tableType7 input,
#content .tableType7 textarea,
#content .tableType7 select { vertical-align:middle;}
#content .tableType7 select { width:100%; }
#content .tableType7 select option { letter-spacing:-1px; }
#content .tableType7 td .w100 { width:100%; display:block;}
#content .tableType7 td .checkbox { margin:-3px;}
#content .tableType7 td p { line-height:1.4em; margin:5px 0 0 0; padding:0;}

View file

@ -27,6 +27,8 @@
<param name="user_name" target="user_name" />
<param name="nick_name" target="nick_name" />
<param name="email_address" target="email_address" />
<param name="use_rewrite" target="use_rewrite" />
<param name="time_zone" target="time_zone" />
</parameter>
<response callback_func="completeInstalled">
<tag name="error" />

View file

@ -25,6 +25,8 @@
<param name="user_name" target="user_name" />
<param name="nick_name" target="nick_name" />
<param name="email_address" target="email_address" />
<param name="use_rewrite" target="use_rewrite" />
<param name="time_zone" target="time_zone" />
</parameter>
<response callback_func="completeInstalled">
<tag name="error" />

View file

@ -19,6 +19,8 @@
<param name="user_name" target="user_name" />
<param name="nick_name" target="nick_name" />
<param name="email_address" target="email_address" />
<param name="use_rewrite" target="use_rewrite" />
<param name="time_zone" target="time_zone" />
</parameter>
<response callback_func="completeInstalled">
<tag name="error" />

View file

@ -38,31 +38,7 @@
<td class="hr"><input type="text" name="db_table_prefix" value="xe" class="inputTypeText w100" id="textfield16" /></td>
</tr>
<tr>
<th rowspan="6" scope="row" class="borderBottomNone"><label for="radio2">{$lang->admin_title}</label></th>
<th class="second" scope="row"><label for="textfield21">{$lang->user_id}</label></th>
<td><input type="text" id="textfield21" name="user_id" value="admin" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield22">{$lang->password1}</label></th>
<td><input id="textfield22" type="password" name="password1" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield23">{$lang->password2}</label></th>
<td><input id="textfield23" type="password" name="password2" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield24">{$lang->user_name}</label></th>
<td><input id="textfield24" type="text" name="user_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield25">{$lang->nick_name}</label></th>
<td><input id="textfield25" type="text" name="nick_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield26">{$lang->email_address}</label></th>
<td><input id="textfield26" type="text" name="email_address" class="inputTypeText" /></td>
</tr>
<!--#include("form.install.html")-->
</table>
<div class="buttonCenter">

View file

@ -0,0 +1,46 @@
<!-- 관리자 정보 -->
<tr>
<th rowspan="6" scope="row" class="hr"><label for="radio2">{$lang->admin_title}</label></th>
<th class="second" scope="row"><label for="textfield21">{$lang->user_id}</label></th>
<td><input type="text" id="textfield21" name="user_id" value="admin" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield22">{$lang->password1}</label></th>
<td><input id="textfield22" type="password" name="password1" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield23">{$lang->password2}</label></th>
<td><input id="textfield23" type="password" name="password2" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield24">{$lang->user_name}</label></th>
<td><input id="textfield24" type="text" name="user_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield25">{$lang->nick_name}</label></th>
<td><input id="textfield25" type="text" name="nick_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second hr" scope="row"><label for="textfield26">{$lang->email_address}</label></th>
<td class="hr"><input id="textfield26" type="text" name="email_address" class="inputTypeText" /></td>
</tr>
<!-- 기타 정보 -->
<tr>
<th rowspan="6" scope="row" class="borderBottomNone"><label for="radio2">{$lang->env_title}</label></th>
<th class="second" scope="row"><label for="textfield27">{$lang->use_rewrite}</label></th>
<td>
<input type="checkbox" id="textfield27" name="use_rewrite" value="Y" <!--@if(function_exists('apache_get_modules')&&in_array('mod_rewrite',apache_get_modules()))-->checked="checked"<!--@end--> />
<p>{$lang->about_rewrite}</p>
</td>
</tr>
<tr>
<th class="second" scope="row">{$lang->time_zone}</th>
<td>
<select name="time_zone">
<!--@foreach($time_zone as $key => $val)-->
<option value="{$key}" <!--@if($key==date('O'))-->selected="selected"<!--@end-->>{$val}</option>
<!--@end-->
</select>
</td>
</tr>

View file

@ -38,31 +38,8 @@
<td class="hr"><input type="text" name="db_table_prefix" value="xe" class="inputTypeText w100" id="textfield16" /></td>
</tr>
<tr>
<th rowspan="6" scope="row" class="borderBottomNone"><label for="radio2">{$lang->admin_title}</label></th>
<th class="second" scope="row"><label for="textfield21">{$lang->user_id}</label></th>
<td><input type="text" id="textfield21" name="user_id" value="admin" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield22">{$lang->password1}</label></th>
<td><input id="textfield22" type="password" name="password1" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield23">{$lang->password2}</label></th>
<td><input id="textfield23" type="password" name="password2" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield24">{$lang->user_name}</label></th>
<td><input id="textfield24" type="text" name="user_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield25">{$lang->nick_name}</label></th>
<td><input id="textfield25" type="text" name="nick_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield26">{$lang->email_address}</label></th>
<td><input id="textfield26" type="text" name="email_address" class="inputTypeText" /></td>
</tr>
<!--#include("form.install.html")-->
</table>
<div class="buttonCenter">

View file

@ -38,31 +38,8 @@
<td class="hr"><input type="text" name="db_table_prefix" value="xe" class="inputTypeText w100" id="textfield16" /></td>
</tr>
<tr>
<th rowspan="6" scope="row" class="borderBottomNone"><label for="radio2">{$lang->admin_title}</label></th>
<th class="second" scope="row"><label for="textfield21">{$lang->user_id}</label></th>
<td><input type="text" id="textfield21" name="user_id" value="admin" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield22">{$lang->password1}</label></th>
<td><input id="textfield22" type="password" name="password1" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield23">{$lang->password2}</label></th>
<td><input id="textfield23" type="password" name="password2" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield24">{$lang->user_name}</label></th>
<td><input id="textfield24" type="text" name="user_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield25">{$lang->nick_name}</label></th>
<td><input id="textfield25" type="text" name="nick_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield26">{$lang->email_address}</label></th>
<td><input id="textfield26" type="text" name="email_address" class="inputTypeText" /></td>
</tr>
<!--#include("form.install.html")-->
</table>
<div class="buttonCenter">

View file

@ -25,31 +25,8 @@
<td class="hr"><input type="text" name="db_table_prefix" value="xe" class="inputTypeText w100" id="textfield16" /></td>
</tr>
<tr>
<th rowspan="6" scope="row" class="borderBottomNone"><label for="radio2">{$lang->admin_title}</label></th>
<th class="second" scope="row"><label for="textfield21">{$lang->user_id}</label></th>
<td><input type="text" id="textfield21" name="user_id" value="admin" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield22">{$lang->password1}</label></th>
<td><input id="textfield22" type="password" name="password1" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield23">{$lang->password2}</label></th>
<td><input id="textfield23" type="password" name="password2" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield24">{$lang->user_name}</label></th>
<td><input id="textfield24" type="text" name="user_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield25">{$lang->nick_name}</label></th>
<td><input id="textfield25" type="text" name="nick_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield26">{$lang->email_address}</label></th>
<td><input id="textfield26" type="text" name="email_address" class="inputTypeText" /></td>
</tr>
<!--#include("form.install.html")-->
</table>
<div class="buttonCenter">

View file

@ -25,31 +25,8 @@
<td class="hr"><input type="text" name="db_table_prefix" value="xe" class="inputTypeText w100" id="textfield16" /></td>
</tr>
<tr>
<th rowspan="6" scope="row" class="borderBottomNone"><label for="radio2">{$lang->admin_title}</label></th>
<th class="second" scope="row"><label for="textfield21">{$lang->user_id}</label></th>
<td><input type="text" id="textfield21" name="user_id" value="admin" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield22">{$lang->password1}</label></th>
<td><input id="textfield22" type="password" name="password1" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield23">{$lang->password2}</label></th>
<td><input id="textfield23" type="password" name="password2" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield24">{$lang->user_name}</label></th>
<td><input id="textfield24" type="text" name="user_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield25">{$lang->nick_name}</label></th>
<td><input id="textfield25" type="text" name="nick_name" class="inputTypeText" /></td>
</tr>
<tr>
<th class="second" scope="row"><label for="textfield26">{$lang->email_address}</label></th>
<td><input id="textfield26" type="text" name="email_address" class="inputTypeText" /></td>
</tr>
<!--#include("form.install.html")-->
</table>
<div class="buttonCenter">