diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 53bd71aaf..f015dd436 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -26,7 +26,6 @@ var $html_header = NULL; ///< @brief display시에 사용하게 되는 ..내의 스크립트코드 var $html_footer = NULL; ///< @brief display시에 사용하게 되는 바로 앞에 추가될 코드 - 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; } /** diff --git a/config/func.inc.php b/config/func.inc.php index 7e75cf4cf..0e07da690 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -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 & 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; } /** diff --git a/modules/admin/tpl/css/admin_layout.css b/modules/admin/tpl/css/admin_layout.css index 85b5f8cd8..93678ac3c 100644 --- a/modules/admin/tpl/css/admin_layout.css +++ b/modules/admin/tpl/css/admin_layout.css @@ -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;} diff --git a/modules/admin/tpl/layout.html b/modules/admin/tpl/layout.html index 57288c872..43fa30788 100644 --- a/modules/admin/tpl/layout.html +++ b/modules/admin/tpl/layout.html @@ -20,6 +20,16 @@ +
+ Lang : +
{$content}
diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index 056efd821..fa9ea0b57 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -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); diff --git a/modules/install/install.view.php b/modules/install/install.view.php index 956b1d93c..93359eec4 100644 --- a/modules/install/install.view.php +++ b/modules/install/install.view.php @@ -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); diff --git a/modules/install/lang/ko.lang.php b/modules/install/lang/ko.lang.php index a2031f591..cb5efb1bc 100644 --- a/modules/install/lang/ko.lang.php +++ b/modules/install/lang/ko.lang.php @@ -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는 파일에 데이터를 저장합니다. 데이터베이스 파일의 위치를 웹에서 접근할 수 없는 곳으로 하셔야 합니다
데이터 파일은 707퍼미션 설정된 곳으로 지정해주세요.'; $lang->success_installed = '설치가 되었습니다'; diff --git a/modules/install/tpl/css/install.css b/modules/install/tpl/css/install.css index 8b3136987..46529d679 100644 --- a/modules/install/tpl/css/install.css +++ b/modules/install/tpl/css/install.css @@ -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;} diff --git a/modules/install/tpl/filter/cubrid.xml b/modules/install/tpl/filter/cubrid.xml index 46f3bc8cc..5046e1402 100644 --- a/modules/install/tpl/filter/cubrid.xml +++ b/modules/install/tpl/filter/cubrid.xml @@ -27,6 +27,8 @@ + + diff --git a/modules/install/tpl/filter/mysql.xml b/modules/install/tpl/filter/mysql.xml index 923ddc4ec..8be2cdc59 100644 --- a/modules/install/tpl/filter/mysql.xml +++ b/modules/install/tpl/filter/mysql.xml @@ -25,6 +25,8 @@ + + diff --git a/modules/install/tpl/filter/sqlite2.xml b/modules/install/tpl/filter/sqlite2.xml index b9482ae0c..616994ff0 100644 --- a/modules/install/tpl/filter/sqlite2.xml +++ b/modules/install/tpl/filter/sqlite2.xml @@ -19,6 +19,8 @@ + + diff --git a/modules/install/tpl/form.cubrid.html b/modules/install/tpl/form.cubrid.html index 332406bb6..0f58da3e8 100644 --- a/modules/install/tpl/form.cubrid.html +++ b/modules/install/tpl/form.cubrid.html @@ -38,31 +38,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - +
diff --git a/modules/install/tpl/form.install.html b/modules/install/tpl/form.install.html new file mode 100644 index 000000000..4691a87e6 --- /dev/null +++ b/modules/install/tpl/form.install.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + checked="checked" /> +

{$lang->about_rewrite}

+ + + + {$lang->time_zone} + + + + diff --git a/modules/install/tpl/form.mysql.html b/modules/install/tpl/form.mysql.html index 50c68aae8..266177983 100644 --- a/modules/install/tpl/form.mysql.html +++ b/modules/install/tpl/form.mysql.html @@ -38,31 +38,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/modules/install/tpl/form.mysql_innodb.html b/modules/install/tpl/form.mysql_innodb.html index 50c68aae8..266177983 100644 --- a/modules/install/tpl/form.mysql_innodb.html +++ b/modules/install/tpl/form.mysql_innodb.html @@ -38,31 +38,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/modules/install/tpl/form.sqlite2.html b/modules/install/tpl/form.sqlite2.html index 37838793a..20cf05c53 100644 --- a/modules/install/tpl/form.sqlite2.html +++ b/modules/install/tpl/form.sqlite2.html @@ -25,31 +25,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + +
diff --git a/modules/install/tpl/form.sqlite3_pdo.html b/modules/install/tpl/form.sqlite3_pdo.html index 5c1e331c9..b905d0e20 100644 --- a/modules/install/tpl/form.sqlite3_pdo.html +++ b/modules/install/tpl/form.sqlite3_pdo.html @@ -25,31 +25,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + +