* finish task #5279.
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
$timezoneList = array(
|
||||
'Pacific/Midway' => '(UTC-11:00) Midway Island',
|
||||
'Pacific/Samoa' => '(UTC-11:00) Samoa',
|
||||
'Pacific/Honolulu' => '(UTC-10:00) Hawaii',
|
||||
'US/Alaska' => '(UTC-09:00) Alaska',
|
||||
'America/Los_Angeles' => '(UTC-08:00) Pacific Time (US & Canada)',
|
||||
'America/Tijuana' => '(UTC-08:00) Tijuana',
|
||||
'US/Arizona' => '(UTC-07:00) Arizona',
|
||||
'America/Chihuahua' => '(UTC-07:00) Chihuahua',
|
||||
'America/Mazatlan' => '(UTC-07:00) Mazatlan',
|
||||
'US/Mountain' => '(UTC-07:00) Mountain Time (US & Canada)',
|
||||
'America/Managua' => '(UTC-06:00) Central America',
|
||||
'US/Central' => '(UTC-06:00) Central Time (US & Canada)',
|
||||
'America/Mexico_City' => '(UTC-06:00) Mexico City',
|
||||
'America/Monterrey' => '(UTC-06:00) Monterrey',
|
||||
'Canada/Saskatchewan' => '(UTC-06:00) Saskatchewan',
|
||||
'America/Bogota' => '(UTC-05:00) Bogota',
|
||||
'US/Eastern' => '(UTC-05:00) Eastern Time (US & Canada)',
|
||||
'US/East-Indiana' => '(UTC-05:00) Indiana (East)',
|
||||
'America/Lima' => '(UTC-05:00) Lima',
|
||||
'Canada/Atlantic' => '(UTC-04:00) Atlantic Time (Canada)',
|
||||
'America/Caracas' => '(UTC-04:30) Caracas',
|
||||
'America/La_Paz' => '(UTC-04:00) La Paz',
|
||||
'America/Santiago' => '(UTC-04:00) Santiago',
|
||||
'Canada/Newfoundland' => '(UTC-03:30) Newfoundland',
|
||||
'America/Sao_Paulo' => '(UTC-03:00) Brasilia',
|
||||
'America/Argentina/Buenos_Aires' => '(UTC-03:00) Buenos Aires',
|
||||
'America/Godthab' => '(UTC-03:00) Greenland',
|
||||
'America/Noronha' => '(UTC-02:00) Mid-Atlantic',
|
||||
'Atlantic/Azores' => '(UTC-01:00) Azores',
|
||||
'Atlantic/Cape_Verde' => '(UTC-01:00) Cape Verde Is.',
|
||||
'Africa/Casablanca' => '(UTC+00:00) Casablanca',
|
||||
'Etc/Greenwich' => '(UTC+00:00) Greenwich Mean Time : Dublin',
|
||||
'Europe/Lisbon' => '(UTC+00:00) Lisbon',
|
||||
'Europe/London' => '(UTC+00:00) London',
|
||||
'Africa/Monrovia' => '(UTC+00:00) Monrovia',
|
||||
'UTC' => '(UTC+00:00) UTC',
|
||||
'Europe/Amsterdam' => '(UTC+01:00) Amsterdam',
|
||||
'Europe/Belgrade' => '(UTC+01:00) Belgrade',
|
||||
'Europe/Berlin' => '(UTC+01:00) Berlin',
|
||||
'Europe/Bratislava' => '(UTC+01:00) Bratislava',
|
||||
'Europe/Brussels' => '(UTC+01:00) Brussels',
|
||||
'Europe/Budapest' => '(UTC+01:00) Budapest',
|
||||
'Europe/Copenhagen' => '(UTC+01:00) Copenhagen',
|
||||
'Europe/Ljubljana' => '(UTC+01:00) Ljubljana',
|
||||
'Europe/Madrid' => '(UTC+01:00) Madrid',
|
||||
'Europe/Paris' => '(UTC+01:00) Paris',
|
||||
'Europe/Prague' => '(UTC+01:00) Prague',
|
||||
'Europe/Rome' => '(UTC+01:00) Rome',
|
||||
'Europe/Sarajevo' => '(UTC+01:00) Sarajevo',
|
||||
'Europe/Skopje' => '(UTC+01:00) Skopje',
|
||||
'Europe/Stockholm' => '(UTC+01:00) Stockholm',
|
||||
'Europe/Vienna' => '(UTC+01:00) Vienna',
|
||||
'Europe/Warsaw' => '(UTC+01:00) Warsaw',
|
||||
'Africa/Lagos' => '(UTC+01:00) West Central Africa',
|
||||
'Europe/Zagreb' => '(UTC+01:00) Zagreb',
|
||||
'Europe/Athens' => '(UTC+02:00) Athens',
|
||||
'Europe/Bucharest' => '(UTC+02:00) Bucharest',
|
||||
'Africa/Cairo' => '(UTC+02:00) Cairo',
|
||||
'Africa/Harare' => '(UTC+02:00) Harare',
|
||||
'Europe/Helsinki' => '(UTC+02:00) Helsinki',
|
||||
'Europe/Istanbul' => '(UTC+02:00) Istanbul',
|
||||
'Asia/Jerusalem' => '(UTC+02:00) Jerusalem',
|
||||
'Africa/Johannesburg' => '(UTC+02:00) Pretoria',
|
||||
'Europe/Riga' => '(UTC+02:00) Riga',
|
||||
'Europe/Sofia' => '(UTC+02:00) Sofia',
|
||||
'Europe/Tallinn' => '(UTC+02:00) Tallinn',
|
||||
'Europe/Vilnius' => '(UTC+02:00) Vilnius',
|
||||
'Asia/Baghdad' => '(UTC+03:00) Baghdad',
|
||||
'Asia/Kuwait' => '(UTC+03:00) Kuwait',
|
||||
'Europe/Minsk' => '(UTC+03:00) Minsk',
|
||||
'Africa/Nairobi' => '(UTC+03:00) Nairobi',
|
||||
'Asia/Riyadh' => '(UTC+03:00) Riyadh',
|
||||
'Europe/Volgograd' => '(UTC+03:00) Volgograd',
|
||||
'Asia/Tehran' => '(UTC+03:30) Tehran',
|
||||
'Asia/Baku' => '(UTC+04:00) Baku',
|
||||
'Europe/Moscow' => '(UTC+04:00) Moscow',
|
||||
'Asia/Muscat' => '(UTC+04:00) Muscat',
|
||||
'Asia/Tbilisi' => '(UTC+04:00) Tbilisi',
|
||||
'Asia/Yerevan' => '(UTC+04:00) Yerevan',
|
||||
'Asia/Kabul' => '(UTC+04:30) Kabul',
|
||||
'Asia/Karachi' => '(UTC+05:00) Karachi',
|
||||
'Asia/Tashkent' => '(UTC+05:00) Tashkent',
|
||||
'Asia/Calcutta' => '(UTC+05:30) Chennai',
|
||||
'Asia/Kolkata' => '(UTC+05:30) Kolkata',
|
||||
'Asia/Katmandu' => '(UTC+05:45) Kathmandu',
|
||||
'Asia/Almaty' => '(UTC+06:00) Almaty',
|
||||
'Asia/Dhaka' => '(UTC+06:00) Dhaka',
|
||||
'Asia/Yekaterinburg' => '(UTC+06:00) Ekaterinburg',
|
||||
'Asia/Rangoon' => '(UTC+06:30) Rangoon',
|
||||
'Asia/Bangkok' => '(UTC+07:00) Bangkok',
|
||||
'Asia/Jakarta' => '(UTC+07:00) Jakarta',
|
||||
'Asia/Novosibirsk' => '(UTC+07:00) Novosibirsk',
|
||||
'Asia/Chongqing' => '(UTC+08:00) Chongqing',
|
||||
'Asia/Shanghai' => '(UTC+08:00) Shanghai',
|
||||
'Asia/Hong_Kong' => '(UTC+08:00) Hong Kong',
|
||||
'Asia/Krasnoyarsk' => '(UTC+08:00) Krasnoyarsk',
|
||||
'Asia/Kuala_Lumpur' => '(UTC+08:00) Kuala Lumpur',
|
||||
'Australia/Perth' => '(UTC+08:00) Perth',
|
||||
'Asia/Singapore' => '(UTC+08:00) Singapore',
|
||||
'Asia/Taipei' => '(UTC+08:00) Taipei',
|
||||
'Asia/Ulan_Bator' => '(UTC+08:00) Ulaan Bataar',
|
||||
'Asia/Urumqi' => '(UTC+08:00) Urumqi',
|
||||
'Asia/Irkutsk' => '(UTC+09:00) Irkutsk',
|
||||
'Asia/Seoul' => '(UTC+09:00) Seoul',
|
||||
'Asia/Tokyo' => '(UTC+09:00) Tokyo',
|
||||
'Australia/Adelaide' => '(UTC+09:30) Adelaide',
|
||||
'Australia/Darwin' => '(UTC+09:30) Darwin',
|
||||
'Australia/Brisbane' => '(UTC+10:00) Brisbane',
|
||||
'Australia/Canberra' => '(UTC+10:00) Canberra',
|
||||
'Pacific/Guam' => '(UTC+10:00) Guam',
|
||||
'Australia/Hobart' => '(UTC+10:00) Hobart',
|
||||
'Australia/Melbourne' => '(UTC+10:00) Melbourne',
|
||||
'Pacific/Port_Moresby' => '(UTC+10:00) Port Moresby',
|
||||
'Australia/Sydney' => '(UTC+10:00) Sydney',
|
||||
'Asia/Yakutsk' => '(UTC+10:00) Yakutsk',
|
||||
'Asia/Vladivostok' => '(UTC+11:00) Vladivostok',
|
||||
'Pacific/Auckland' => '(UTC+12:00) Auckland',
|
||||
'Pacific/Fiji' => '(UTC+12:00) Fiji',
|
||||
'Pacific/Kwajalein' => '(UTC+12:00) International Date Line West',
|
||||
'Asia/Kamchatka' => '(UTC+12:00) Kamchatka',
|
||||
'Asia/Magadan' => '(UTC+12:00) Magadan',
|
||||
'Pacific/Tongatapu' => '(UTC+13:00) Nuku\'alofa'
|
||||
);
|
||||
@@ -27,6 +27,7 @@ class commonModel extends model
|
||||
$this->setCompany();
|
||||
$this->setUser();
|
||||
$this->loadConfigFromDB();
|
||||
$this->app->setTimezone();
|
||||
if((strpos($this->config->global->version, 'pro') !== false && version_compare($this->config->global->version, 'pro2.3.beta', '>'))
|
||||
|| (strpos($this->config->global->version, 'biz') !== false)
|
||||
|| version_compare($this->config->global->version, '4.3.beta', '>'))
|
||||
|
||||
@@ -318,6 +318,25 @@ class custom extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Timezone.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function timezone()
|
||||
{
|
||||
if(strtolower($_SERVER['REQUEST_METHOD']) == "post")
|
||||
{
|
||||
$this->loadModel('setting')->setItems('system.common', fixer::input('post')->get());
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->custom->timezone;
|
||||
$this->view->position[] = $this->lang->custom->timezone;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax save custom fields.
|
||||
*
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->custom->lang = 'Language';
|
||||
$lang->custom->setPublic = 'Set Public';
|
||||
$lang->custom->required = 'Required';
|
||||
$lang->custom->score = 'Point';
|
||||
$lang->custom->timezone = 'Timezone';
|
||||
$lang->custom->scoreReset = 'Reset Point';
|
||||
|
||||
$lang->custom->object['story'] = 'Story';
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->custom->lang = '所属语言';
|
||||
$lang->custom->setPublic = '设为公共';
|
||||
$lang->custom->required = '必填项';
|
||||
$lang->custom->score = '积分';
|
||||
$lang->custom->timezone = '时区';
|
||||
$lang->custom->scoreReset = '重置积分';
|
||||
|
||||
$lang->custom->object['story'] = '需求';
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
{
|
||||
common::printLink('custom', 'set', "module=$object", "<span class='text'>{$name}</span>", '', "class='btn btn-link' id='{$object}Tab'");
|
||||
}
|
||||
common::printLink('custom', 'timezone', "", "<span class='text'>{$lang->custom->timezone}</span>", '', "class='btn btn-link' id='timezoneTab'");
|
||||
common::printLink('custom', 'flow', "", "<span class='text'>{$lang->custom->flow}</span>", '', "class='btn btn-link' id='flowTab'");
|
||||
common::printLink('custom', 'working', '', "<span class='text'>{$lang->custom->working}</span>", '', "class='btn btn-link' id='workingTab'");
|
||||
common::printLink('custom', 'required', '', "<span class='text'>{$lang->custom->required}</span>", '', "class='btn btn-link' id='requiredTab'");
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* The timezone view file of custom module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package custom
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include 'header.html.php';?>
|
||||
<?php include $this->app->getConfigRoot() . 'timezones.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form class="load-indicator main-form form-ajax" method='post'>
|
||||
<div class='main-header'>
|
||||
<div class='heading'>
|
||||
<strong><?php echo $lang->custom->timezone?></strong>
|
||||
</div>
|
||||
</div>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-200px'><?php echo $lang->custom->timezone;?></th>
|
||||
<td><?php echo html::select('timezone', $timezoneList, $config->timezone, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='form-actions'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#mainMenu #timezoneTab').addClass('btn-active-text');
|
||||
})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -88,6 +88,7 @@ $lang->install->chmodWin = ' "%s" privilege has to be changed.';
|
||||
$lang->install->mkdirLinux = '<p>%s directory has to be created.<br /> Run <code>mkdir -p %s</code> to create it.</p>';
|
||||
$lang->install->chmodLinux = ' "%s" privilege has to be changed.<br /> Run <code>chmod o=rwx -R %s</code> to change it.';
|
||||
|
||||
$lang->install->timezone = 'Set Timezone';
|
||||
$lang->install->defaultLang = 'Default Language';
|
||||
$lang->install->dbHost = 'Database Host';
|
||||
$lang->install->dbHostNote = 'If 127.0.0.1 is not accessible, try localhost.';
|
||||
|
||||
@@ -88,6 +88,7 @@ $lang->install->chmodWin = '需要修改目录 "%s" 的权限。';
|
||||
$lang->install->mkdirLinux = '<p>需要创建目录%s。<br /> 命令为:<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmodLinux = '需要修改目录 "%s" 的权限。<br />命令为:<br />chmod o=rwx -R %s';
|
||||
|
||||
$lang->install->timezone = '时区设置';
|
||||
$lang->install->defaultLang = '默认语言';
|
||||
$lang->install->dbHost = '数据库服务器';
|
||||
$lang->install->dbHostNote = '如果127.0.0.1无法访问,尝试使用localhost';
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
<th colspan='2'><?php echo $lang->install->value?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<?php include $this->app->getConfigRoot() . 'timezones.php';?>
|
||||
<th><?php echo $lang->install->timezone;?></th>
|
||||
<td><?php echo html::select('timezone', $timezoneList, $config->timezone, "class='form-control'");?></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->install->defaultLang;?></th>
|
||||
<td><?php echo html::select('defaultLang', $config->langs, $app->getClientLang(), "class='form-control'");?></td><td></td>
|
||||
|
||||
@@ -18,6 +18,7 @@ if(!isset($error))
|
||||
\$config->installed = true;
|
||||
\$config->debug = false;
|
||||
\$config->requestType = '$requestType';
|
||||
\$config->timezone = '$timezone';
|
||||
\$config->db->host = '$dbHost';
|
||||
\$config->db->port = '$dbPort';
|
||||
\$config->db->name = '$dbName';
|
||||
|
||||
Reference in New Issue
Block a user