mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Replace DEFAULT_TIME_ZONE in config file with administrative configuration
This commit is contained in:
@@ -9,6 +9,8 @@ CREATE TABLE `questionnaire_timeslot` (
|
||||
PRIMARY KEY ( `questionnaire_id` , `availability_group_id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci;
|
||||
|
||||
INSERT INTO `setting` (`setting_id`,`field`,`value`)
|
||||
VALUES (NULL , 'DEFAULT_TIME_ZONE', 's:18:"Australia/Victoria";');
|
||||
|
||||
|
||||
queXS 1.10.4 - Changes since 1.10.3
|
||||
|
||||
@@ -111,7 +111,7 @@ if ($a)
|
||||
<?php } ?>
|
||||
<p><?php echo T_("Enter the first name of a client to add:"); ?> <input name="firstname" type="text"/></p>
|
||||
<p><?php echo T_("Enter the surname of a client to add:"); ?> <input name="lastname" type="text"/></p>
|
||||
<p><a href='timezonetemplate.php'><?php echo T_("Enter the Time Zone of a client to add:"); echo "</a>"; display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value",DEFAULT_TIME_ZONE)); ?> </p>
|
||||
<p><a href='timezonetemplate.php'><?php echo T_("Enter the Time Zone of a client to add:"); echo "</a>"; display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value",get_setting("DEFAULT_TIME_ZONE"))); ?> </p>
|
||||
<p><input type="submit" value="<?php echo T_("Add user"); ?>" /></p>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ $ers = $db->GetAll($sql);
|
||||
<?php } ?>
|
||||
<p><?php echo T_("Enter the first name of an operator to add:"); ?> <input name="firstname" type="text"/></p>
|
||||
<p><?php echo T_("Enter the surname of an operator to add:"); ?> <input name="lastname" type="text"/></p>
|
||||
<p><a href='timezonetemplate.php'><?php echo T_("Enter the Time Zone of an operator to add:"); echo "</a>"; display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value",DEFAULT_TIME_ZONE)); ?> </p>
|
||||
<p><a href='timezonetemplate.php'><?php echo T_("Enter the Time Zone of an operator to add:"); echo "</a>"; display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value",get_setting("DEFAULT_TIME_ZONE"))); ?> </p>
|
||||
<?php if (FREEPBX_PATH == false) { ?>
|
||||
<p><a href='extensionstatus.php'><?php echo T_("Select an extension for this operator:"); echo "</a>"; display_chooser($ers,"extension_id","extension_id",true,false,false,false); ?> </p>
|
||||
<?php } ?>
|
||||
|
||||
@@ -58,6 +58,11 @@ include("../functions/functions.input.php");
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_POST['dtime_zone']))
|
||||
{
|
||||
set_setting('DEFAULT_TIME_ZONE', $_POST['dtime_zone']);
|
||||
}
|
||||
|
||||
if (isset($_GET['time_zone']))
|
||||
{
|
||||
//need to add sample to questionnaire
|
||||
@@ -86,8 +91,10 @@ if (isset($_GET['tz']))
|
||||
|
||||
xhtml_head(T_("Add/Remove Timezones"),true,array("../css/shifts.css"),array("../js/window.js"));
|
||||
|
||||
$dtz = get_setting("DEFAULT_TIME_ZONE");
|
||||
|
||||
$sql = "SELECT name as value, name as description,
|
||||
CASE WHEN name LIKE '" . DEFAULT_TIME_ZONE . "' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
CASE WHEN name LIKE '$dtz' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM mysql.time_zone_name";
|
||||
|
||||
$tzl = $db->GetAll($sql);
|
||||
@@ -97,6 +104,13 @@ if (empty($tzl) || !$tzl)
|
||||
print "<div class='warning'><a href='http://dev.mysql.com/doc/mysql/en/time-zone-support.html'>" . T_("Your database does not have timezones installed, please see here for details") . "</a></div>";
|
||||
}
|
||||
|
||||
print "<h1>" . T_("Set default timezone") . ": </h1>";
|
||||
?>
|
||||
<form action="" method="post"><p>
|
||||
<label for="dtime_zone"><?php echo T_("Default Timezone: "); ?></label><?php display_chooser($tzl, 'dtime_zone', 'dtime_zone', false, false, false, false, false); ?>
|
||||
<input type="submit" name="set_dtimezone" value="<?php echo T_("Set default timezone"); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
print "<h1>" . T_("Click to remove a Timezone from the default list") . "</h1>";
|
||||
|
||||
|
||||
@@ -40,12 +40,6 @@
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* The default time zone
|
||||
*/
|
||||
if (!defined('DEFAULT_TIME_ZONE')) define('DEFAULT_TIME_ZONE', 'Australia/Victoria');
|
||||
|
||||
|
||||
/**
|
||||
* Date time format for displaying
|
||||
*
|
||||
|
||||
@@ -38,11 +38,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* The default time zone
|
||||
*/
|
||||
define('DEFAULT_TIME_ZONE', 'Australia/Victoria');
|
||||
|
||||
/**
|
||||
* Flag for VoIP with Asterisk to be enabled or not
|
||||
*/
|
||||
|
||||
@@ -1787,6 +1787,10 @@ CREATE TABLE `setting` (
|
||||
-- Dumping data for table `setting`
|
||||
--
|
||||
|
||||
INSERT INTO `setting` (`setting_id`, `field`, `value`) VALUES
|
||||
(1, 'DEFAULT_TIME_ZONE', 's:18:"Australia/Victoria";'),
|
||||
(2, 'systemsort', 'b:0;');
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ function display_respondent_form($respondent_id = false,$case_id = false)
|
||||
/**
|
||||
* Use the default time zone if none other to work with
|
||||
*/
|
||||
$rzone = DEFAULT_TIME_ZONE;
|
||||
$rzone = get_setting("DEFAULT_TIME_ZONE");
|
||||
$fn = "";
|
||||
$ln = "";
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ function import_file($file, $description, $fields, $firstrow = 2)
|
||||
|
||||
//first find the timezone
|
||||
|
||||
$tzone = DEFAULT_TIME_ZONE; //set this to default
|
||||
$tzone = get_setting("DEFAULT_TIME_ZONE"); //set this to default
|
||||
|
||||
/**
|
||||
* Determine time zone from all possible sources in sample_var_type table
|
||||
|
||||
@@ -101,7 +101,7 @@ if (isset($_POST['submit']))
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$tzone = DEFAULT_TIME_ZONE; //set this to default
|
||||
$tzone = get_setting("DEFAULT_TIME_ZONE"); //set this to default
|
||||
|
||||
//Get the timezone
|
||||
foreach($rs as $r)
|
||||
|
||||
Reference in New Issue
Block a user