mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
@@ -594,6 +594,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
//set the time zone
|
||||
date_default_timezone_set($settings->get('domain', 'time_zone', date_default_timezone_get()));
|
||||
|
||||
//set the time format options: 12h, 24h
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
$time_format = 'H:i:s';
|
||||
}
|
||||
else {
|
||||
$time_format = 'h:i:s a';
|
||||
}
|
||||
|
||||
//pre-populate the form
|
||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||
$sql = "select * from v_contacts ";
|
||||
@@ -2635,14 +2646,14 @@ if (permission_exists('contact_time_view')) {
|
||||
echo " ".$text['label-time_start']."\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='field no-wrap'>\n";
|
||||
echo " <input class='formfld datetimesecpicker' data-toggle='datetimepicker' data-target='#time_start' type='text' name='contact_times[$x][time_start]' id='time_start' style='min-width: 135px; width: 135px;' value='".escape($row["time_start"])."' onblur=\"$(this).datetimepicker('hide');\">\n";
|
||||
echo " <input class='formfld datetimesecpicker' data-toggle='datetimepicker' data-target='#time_start_$x' type='text' name='contact_times[$x][time_start]' id='time_start_$x' style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 125px; width: 125px;' : 'min-width: 145px; width: 145px;')."' value='".escape($row["time_start"])."' onblur=\"$(this).datetimepicker('hide');\">\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='label'>\n";
|
||||
echo " ".$text['label-time_stop']."\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='field no-wrap'>\n";
|
||||
echo " <input class='formfld datetimesecpicker' data-toggle='datetimepicker' data-target='#time_stop' type='text' name='contact_times[$x][time_stop]' id='time_stop' style='min-width: 135px; width: 135px;' value='".escape($row["time_stop"])."' onblur=\"$(this).datetimepicker('hide');\">\n";
|
||||
echo " <input class='formfld datetimesecpicker' data-toggle='datetimepicker' data-target='#time_stop_$x' type='text' name='contact_times[$x][time_stop]' id='time_stop_$x' style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 125px; width: 125px;' : 'min-width: 145px; width: 145px;')."' value='".escape($row["time_stop"])."' onblur=\"$(this).datetimepicker('hide');\">\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='label'>\n";
|
||||
@@ -2701,7 +2712,7 @@ if (permission_exists('contact_note_view')) {
|
||||
echo " ".$text['label-note_user']."\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='field no-wrap' style='margin-top: 2px;'>\n";
|
||||
echo " <div class='description'><strong>".escape($row['last_mod_user'])."</strong>: ".date("j M Y @ H:i:s", strtotime($row['last_mod_date']))."</div>\n";
|
||||
echo " <div class='description'><strong>".escape($row['last_mod_user'])."</strong>: ".date("j M Y @ ".$time_format, strtotime($row['last_mod_date']))."</div>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='label empty_row' style='grid-row: 4 / span 99;'>\n";
|
||||
|
||||
@@ -39,6 +39,17 @@
|
||||
$contact_uuid = $_GET['id'];
|
||||
}
|
||||
|
||||
//set the time zone
|
||||
date_default_timezone_set($settings->get('domain', 'time_zone', date_default_timezone_get()));
|
||||
|
||||
//set the time format options: 12h, 24h
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
$time_format = 'H:i:s';
|
||||
}
|
||||
else {
|
||||
$time_format = 'h:i:s a';
|
||||
}
|
||||
|
||||
//get the contact list
|
||||
$sql = "select * from v_contact_notes ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
@@ -93,7 +104,7 @@
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td class='overflow'>".$contact_note."</td>\n";
|
||||
echo " <td class='description no-wrap'><strong>".escape($row['last_mod_user'])."</strong>: ".date("j M Y @ H:i:s", strtotime($row['last_mod_date']))."</td>\n";
|
||||
echo " <td class='description no-wrap'><strong>".escape($row['last_mod_user'])."</strong>: ".date("j M Y @ ".$time_format, strtotime($row['last_mod_date']))."</td>\n";
|
||||
if (permission_exists('contact_note_edit') && $list_row_edit_button == 'true') {
|
||||
echo " <td class='action-button'>\n";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$settings->get('theme', 'button_icon_edit'),'link'=>$list_row_url]);
|
||||
@@ -112,4 +123,3 @@
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -34,6 +34,17 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
//set the time zone
|
||||
date_default_timezone_set($settings->get('domain', 'time_zone', date_default_timezone_get()));
|
||||
|
||||
//set the time format options: 12h, 24h
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
$time_format = 'H:i:s';
|
||||
}
|
||||
else {
|
||||
$time_format = 'h:i:s a';
|
||||
}
|
||||
|
||||
//get the contact list
|
||||
$sql = "select * from v_contact_notes ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
@@ -53,7 +64,7 @@
|
||||
foreach ($contact_notes as $row) {
|
||||
$contact_note = str_replace("\n","<br />",escape($row['contact_note']));
|
||||
echo "<div class='box' style='padding-bottom: 15px;'>".$contact_note."</div>\n";
|
||||
echo "<div class='box contact-details-label' style='padding-bottom: 15px; text-align: right;'><strong>".escape($row['last_mod_user'])."</strong>: ".date("j M Y @ H:i:s", strtotime($row['last_mod_date']))."</div>\n";
|
||||
echo "<div class='box contact-details-label' style='padding-bottom: 15px; text-align: right;'><strong>".escape($row['last_mod_user'])."</strong>: ".date("j M Y @ ".$time_format, strtotime($row['last_mod_date']))."</div>\n";
|
||||
$x++;
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -28,6 +28,10 @@
|
||||
require_once "resources/check_auth.php";
|
||||
if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
||||
|
||||
//set the defaults
|
||||
$contact_time_uuid = '';
|
||||
$time_description = '';
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
@@ -36,6 +40,9 @@
|
||||
$domain_uuid = $_REQUEST['domain_uuid'];
|
||||
$contact_uuid = $_REQUEST['contact_uuid'];
|
||||
|
||||
//set the time zone
|
||||
date_default_timezone_set($settings->get('domain', 'time_zone', date_default_timezone_get()));
|
||||
|
||||
//get posted variables & set time status
|
||||
if (!empty($_POST)) {
|
||||
$contact_time_uuid = $_POST['contact_time_uuid'];
|
||||
|
||||
@@ -42,6 +42,17 @@
|
||||
$contact_uuid = $_GET['id'];
|
||||
}
|
||||
|
||||
//set the time zone
|
||||
date_default_timezone_set($settings->get('domain', 'time_zone', date_default_timezone_get()));
|
||||
|
||||
//set the time format options: 12h, 24h
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
$time_format = 'H:i:s';
|
||||
}
|
||||
else {
|
||||
$time_format = 'h:i:s a';
|
||||
}
|
||||
|
||||
//get the contact list
|
||||
$sql = "select ct.*, u.username, u.domain_uuid as user_domain_uuid ";
|
||||
$sql .= "from v_contact_times as ct, v_users as u ";
|
||||
@@ -86,7 +97,7 @@
|
||||
if (!empty($row["time_start"]) && !empty($row['time_stop'])) {
|
||||
$time_start = strtotime($row["time_start"]);
|
||||
$time_stop = strtotime($row['time_stop']);
|
||||
$time = gmdate("H:i:s", ($time_stop - $time_start));
|
||||
$time = gmdate($time_zone, ($time_stop - $time_start));
|
||||
}
|
||||
else {
|
||||
unset($time);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2018-2024
|
||||
Portions created by the Initial Developer are Copyright (C) 2018-2025
|
||||
the Initial Developer. All Rights Reserved.
|
||||
*/
|
||||
|
||||
@@ -146,7 +146,14 @@
|
||||
|
||||
//set the time zone
|
||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
||||
$parameters['time_zone'] = $time_zone;
|
||||
|
||||
//set the time format options: 12h, 24h
|
||||
if ($settings->get('domain', 'time_format') == '24h') {
|
||||
$time_format = 'HH24:MI:SS';
|
||||
}
|
||||
else {
|
||||
$time_format = 'HH12:MI:SS am';
|
||||
}
|
||||
|
||||
//get the list
|
||||
$sql = "select ";
|
||||
@@ -155,7 +162,7 @@
|
||||
$sql .= "u.domain_uuid, ";
|
||||
$sql .= "d.domain_name, ";
|
||||
$sql .= "to_char(timezone(:time_zone, timestamp), 'DD Mon YYYY') as date_formatted, ";
|
||||
$sql .= "to_char(timezone(:time_zone, timestamp), 'HH12:MI:SS am') as time_formatted, ";
|
||||
$sql .= "to_char(timezone(:time_zone, timestamp), '".$time_format."') as time_formatted, ";
|
||||
$sql .= "user_uuid, ";
|
||||
$sql .= "username, ";
|
||||
$sql .= "type, ";
|
||||
@@ -187,6 +194,7 @@
|
||||
$sql .= "and u.domain_uuid = d.domain_uuid ";
|
||||
$sql .= order_by($order_by, $order, 'timestamp', 'desc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$parameters['time_zone'] = $time_zone;
|
||||
$user_logs = $database->select($sql, $parameters ?? null, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user