Use the time_format default setting on more pages (#7663)

* Use the time_format default setting on more pages

* Update call_recordings.php

* Update devices.php

* Update email_queue.php

* Update emergency.php

* Update time formatting based on settings

* Update fax_logs.php

* Update fax_queue.php

* Update time_condition_edit.php

* Update xml_cdr_details.php

* Update xml_cdr_search.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_statistics.php

* Update xml_cdr.php

* Update contact_edit.php

* Update contact_notes_view.php

* Update contact_notes.php

* Update contact_timer.php

* Update contact_times.php

* Update user_logs.php

* Update footer.php

* Update template.php

* Update fax_files.php

* Update recent_calls.php

* Update missed_calls.php

* Update recordings.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_inc.php

* Update recordings.php

* Update missed_calls.php

* Update call_block.php

* Update user_logs.php

* Update xml_cdr_inc.php

* Update xml_cdr_details.php

* Update recordings.php

* Update fax_queue.php

* Update fax_logs.php

* Update fax_files.php

* Update event_guard_logs.php

* Update emergency.php

* Update email_queue.php

* Update devices.php

* Update call_recordings.php

* Update time_condition_edit.php

* Update time_condition_edit.php

* Update call_block.php

* Update call_recordings.php

* Update devices.php

* Update email_queue.php

* Update emergency.php

* Update event_guard_logs.php

* Update fax_files.php

* Update fax_logs.php

* Update fax_queue.php

* Update recordings.php

* Update xml_cdr_inc.php

* Update user_logs.php

* Update destination_summary.php

* Update xml_cdr_extension_summary.php

* Update music_on_hold.php

* Update fax_send.php

* Update voicemail_greetings.php

* Update voicemail_greetings.php

* Update xml_cdr_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_extension_summary.php

* Update destination_summary.php

* Update xml_cdr_statistics_inc.php

* Update xml_cdr_inc.php

* Update xml_cdr_statistics_inc.php

* Update contact_edit.php

* Update css.php

* Update template.php

* Update fax_send.php
This commit is contained in:
Alex
2025-12-18 09:52:49 -07:00
committed by GitHub
parent 5ee6b1b0e9
commit 72dafd903d
33 changed files with 430 additions and 184 deletions

View File

@@ -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-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -92,10 +92,7 @@
$search = strtolower($_GET["search"]);
}
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
//prepare to page the results
//get the count
$sql = "select count(*) from view_call_block ";
$sql .= "where true ";
if ($show == "all" && permission_exists('call_block_all')) {
@@ -147,21 +144,26 @@
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//set the time zone
$time_zone = $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 = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
}
//get the list
$sql = "select domain_uuid, call_block_uuid, call_block_direction, extension_uuid, call_block_name, ";
$sql .= " call_block_country_code, call_block_number, extension, number_alias, call_block_count, ";
$sql .= " call_block_app, call_block_data, ";
$sql .= " to_char(timezone(:time_zone, insert_date), 'DD Mon YYYY') as date_formatted, \n";
if (date(!empty($settings->get('domain', 'time_format')) == '12h')) {
$sql .= " to_char(timezone(:time_zone, insert_date), 'HH12:MI:SS am') as time_formatted, \n";
}
else {
$sql .= " to_char(timezone(:time_zone, insert_date), 'HH24:MI:SS am') as time_formatted, \n";
}
$sql .= " to_char(timezone(:time_zone, insert_date), '".$time_format."') as time_formatted, \n";
$sql .= " cast(call_block_enabled as text), call_block_description, insert_date, insert_user, update_date, update_user ";
$sql .= "from view_call_block ";
$sql .= "where true ";
$parameters['time_zone'] = $time_zone;
if ($show == "all" && permission_exists('call_block_all')) {
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
@@ -199,6 +201,7 @@
}
$sql .= order_by($order_by, $order, ['domain_uuid','call_block_country_code','call_block_number']);
$sql .= limit_offset($rows_per_page, $offset);
$parameters['time_zone'] = $time_zone;
$result = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);

View File

@@ -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.
Contributor(s):
@@ -93,22 +93,29 @@
$search = strtolower($_GET["search"]);
}
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
$parameters['time_zone'] = $time_zone;
//prepare some of the paging values
$rows_per_page = $settings->get('domain', 'paging', 50);
$page = $_GET['page'] ?? '';
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
$offset = $rows_per_page * $page;
//set the time zone
$time_zone = $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 = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
}
//get the list
$sql = "select r.domain_uuid, d.domain_name, r.call_recording_uuid, r.call_direction, ";
$sql .= "r.call_recording_name, r.call_recording_path, r.call_recording_transcription, r.call_recording_length, ";
$sql .= "r.caller_id_name, r.caller_id_number, r.caller_destination, r.destination_number, ";
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'DD Mon YYYY') as call_recording_date_formatted, \n";
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), 'HH12:MI:SS am') as call_recording_time_formatted \n";
$sql .= "to_char(timezone(:time_zone, r.call_recording_date), '".$time_format."') as call_recording_time_formatted \n";
$sql .= "from view_call_recordings as r, v_domains as d ";
//$sql .= "from v_call_recordings as r, v_domains as d ";
$sql .= "where true ";
@@ -131,6 +138,7 @@
}
$sql .= order_by($order_by, $order, 'r.call_recording_date', 'desc');
$sql .= limit_offset($rows_per_page, $offset);
$parameters['time_zone'] = $time_zone;
$call_recordings = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);

View File

@@ -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) 2023-2024
Portions created by the Initial Developer are Copyright (C) 2023-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -52,6 +52,14 @@
$quick_select = 3; //set default
}
//convert time format to 24 hour
if (!empty($start_stamp_begin)) {
$start_stamp_begin_formatted = ($settings->get('domain', 'time_format') == '24h' ? $start_stamp_begin : DateTime::createFromFormat('Y-m-d h:i a', $start_stamp_begin)->format('Y-m-d H:i'));
}
if (!empty($start_stamp_end)) {
$start_stamp_end_formatted = ($settings->get('domain', 'time_format') == '24h' ? $start_stamp_end : DateTime::createFromFormat('Y-m-d h:i a', $start_stamp_end)->format('Y-m-d H:i'));
}
//get the summary
$destination = new destinations;
$destination->domain_uuid = $_SESSION['domain_uuid'];
@@ -59,8 +67,8 @@
$destination->quick_select = $quick_select;
}
else {
$destination->start_stamp_begin = $start_stamp_begin ?? '';
$destination->start_stamp_end = $start_stamp_end ?? '';
$destination->start_stamp_begin = $start_stamp_begin_formatted ?? '';
$destination->start_stamp_end = $start_stamp_end_formatted ?? '';
}
//$destination->include_internal = $include_internal ?? null;
$summary = $destination->destination_summary();
@@ -174,7 +182,7 @@
echo " ".$text['label-start_date_time']."\n";
echo " </div>\n";
echo " <div class='field'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin ?? '')."'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin ?? '')."'>\n";
echo " </div>\n";
echo " </div>\n";
@@ -183,7 +191,7 @@
echo " ".$text['label-end_date_time']."\n";
echo " </div>\n";
echo " <div class='field'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end ?? '')."'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end ?? '')."'>\n";
echo " </div>\n";
echo " </div>\n";

View File

@@ -54,10 +54,6 @@
$devices = $_POST['devices'];
}
//get the search
$search = strtolower($_REQUEST["search"] ?? '');
$fields = strtolower($_REQUEST["fields"] ?? '');
//process the http post data by action
if (!empty($action) && !empty($devices) && is_array($devices) && @sizeof($devices) != 0) {
switch ($action) {
@@ -83,8 +79,9 @@
$order_by = $_GET["order_by"] ?? '';
$order = $_GET["order"] ?? '';
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
//get the search
$search = strtolower($_REQUEST["search"] ?? '');
$fields = strtolower($_REQUEST["fields"] ?? '');
//get total devices count from the database
$sql = "select count(*) from v_devices ";
@@ -108,7 +105,7 @@
$device_profiles = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//prepare to page the results
//get the count
$sql = "select count(*) from v_devices as d ";
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
if (!empty($search)) {
@@ -180,6 +177,17 @@
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param ?? '', $rows_per_page, true);
$offset = $rows_per_page * $page;
//set the time zone
$time_zone = $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 = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
}
//get the list
$sql = "select ";
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
@@ -208,7 +216,7 @@
$sql .= "d.device_enabled, ";
$sql .= "d2.device_label as alternate_label, ";
$sql .= "to_char(timezone(:time_zone, d.device_provisioned_date), 'DD Mon YYYY') as provisioned_date_formatted, \n";
$sql .= "to_char(timezone(:time_zone, d.device_provisioned_date), 'HH12:MI:SS am') as provisioned_time_formatted \n";
$sql .= "to_char(timezone(:time_zone, d.device_provisioned_date), '".$time_format."') as provisioned_time_formatted \n";
$sql .= "from v_devices as d, v_devices as d2 ";
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
$sql .= ", v_domains as d3 ";

View File

@@ -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) 2022-2023
Portions created by the Initial Developer are Copyright (C) 2022-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -91,9 +91,6 @@
exit;
}
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
//get order and order by
$order_by = $_GET["order_by"] ?? null;
$order = $_GET["order"] ?? null;
@@ -138,11 +135,22 @@
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//set the time zone
$time_zone = $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 = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
}
//get the list
$sql = "select ";
$sql .= "email_date, ";
$sql .= "to_char(timezone(:time_zone, email_date), 'DD Mon YYYY') as email_date_formatted, \n";
$sql .= "to_char(timezone(:time_zone, email_date), 'HH12:MI:SS am') as email_time_formatted, \n";
$sql .= "to_char(timezone(:time_zone, email_date), '".$time_format."') as email_time_formatted, \n";
$sql .= "email_queue_uuid, ";
$sql .= "hostname, ";
$sql .= "email_from, ";

View File

@@ -109,13 +109,21 @@ $offset = $rows_per_page * $page;
//set the time zone
$time_zone = $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 = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
}
//get the list
$sql = "select e.emergency_log_uuid, ";
$sql .= "e.domain_uuid, ";
$sql .= "e.extension, ";
$sql .= "e.event, ";
$sql .= "to_char(timezone(:time_zone, e.insert_date), 'DD Mon YYYY') as date_formatted, ";
$sql .= "to_char(timezone(:time_zone, e.insert_date), 'HH12:MI:SS am') as time_formatted, ";
$sql .= "to_char(timezone(:time_zone, e.insert_date), '".$time_format."') as time_formatted, ";
$sql .= "e.insert_date, ";
$sql .= "c.status as status, ";
$sql .= "concat(c.record_path, '/', c.record_name) as recording, "; //temp

View File

@@ -115,7 +115,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 ";
@@ -123,7 +130,7 @@
$sql .= "hostname, ";
$sql .= "log_date, ";
$sql .= "to_char(timezone(:time_zone, log_date), 'DD Mon YYYY') as log_date_formatted, \n";
$sql .= "to_char(timezone(:time_zone, log_date), 'HH12:MI:SS am') as log_time_formatted, \n";
$sql .= "to_char(timezone(:time_zone, log_date), '".$time_format."') as log_time_formatted, \n";
$sql .= "filter, ";
$sql .= "ip_address, ";
$sql .= "extension, ";
@@ -148,6 +155,7 @@
}
$sql .= order_by($order_by, $order, 'log_date', 'desc');
$sql .= limit_offset($rows_per_page, $offset);
$parameters['time_zone'] = $time_zone;
$event_guard_logs = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);

View File

@@ -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.
Contributor(s):
@@ -244,16 +244,10 @@
//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 (!empty($settings->get('domain', 'time_format'))) {
if ($settings->get('domain', 'time_format') == '12h') {
$time_format = 'HH12:MI:SS am';
}
elseif ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'HH24:MI:SS';
}
if ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
@@ -279,6 +273,7 @@
$parameters['domain_uuid'] = $domain_uuid;
$sql .= order_by($order_by, $order, 'fax_date', 'desc');
$sql .= limit_offset($rows_per_page, $offset);
$parameters['time_zone'] = $time_zone;
$fax_files = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);

View File

@@ -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-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -81,7 +81,7 @@
$parameters['search'] = '%'.$search.'%';
}
//prepare to page the results
//get the count
$sql = "select count(fax_log_uuid) from v_fax_logs ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and fax_uuid = :fax_uuid ";
@@ -104,14 +104,19 @@
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
//set time format
$time_format = $settings->get('domain', 'time_format');
//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 ";
$sql .= " fax_epoch, ";
$sql .= " to_char(timezone(:time_zone, to_timestamp(fax_epoch)), 'DD Mon YYYY') as fax_date_formatted, \n";
$sql .= " to_char(timezone(:time_zone, to_timestamp(fax_epoch)), 'HH12:MI:SS am') as fax_time_formatted, \n";
$sql .= " to_char(timezone(:time_zone, to_timestamp(fax_epoch)), '".$time_format."') as fax_time_formatted, \n";
$sql .= " fax_success, ";
$sql .= " fax_result_code, ";
$sql .= " fax_result_text, ";

View File

@@ -518,7 +518,13 @@ if (!function_exists('fax_split_dtmf')) {
$pdf->SetXY($x + 2.0, $y + 1.65);
if (defined('STDIN') || (!empty($_REQUEST['submit']) && $_REQUEST['submit'] != 'preview')) {
$date = new DateTime('now', new DateTimeZone( $settings->get('domain','time_zone', date_default_timezone_get() ) ));
$pdf->Write(0.3, $date->format('d M Y @ h:i:s A'));
if ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'H:i:s';
}
else {
$time_format = 'h:i:s A';
}
$pdf->Write(0.3, $date->format('d M Y @ '.$time_format));
}
$pdf->SetXY($x + 2.0, $y + 1.95);
if (!empty($fax_recipient)) {

View File

@@ -93,9 +93,6 @@
exit;
}
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
//get order and order by
$order_by = $_GET["order_by"] ?? null;
$order = $_GET["order"] ?? null;
@@ -152,6 +149,17 @@
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//set the time zone
$time_zone = $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 = 'HH24:MI:SS';
}
else {
$time_format = 'HH12:MI:SS am';
}
//get the list
$sql = "SELECT ";
$sql .= "d.domain_name, ";
@@ -160,7 +168,7 @@
$sql .= "q.fax_uuid, ";
$sql .= "q.fax_date, ";
$sql .= "to_char(timezone(:time_zone, q.fax_date), 'DD Mon YYYY') as fax_date_formatted, ";
$sql .= "to_char(timezone(:time_zone, q.fax_date), 'HH12:MI:SS am') as fax_time_formatted, ";
$sql .= "to_char(timezone(:time_zone, q.fax_date), '".$time_format."') as fax_time_formatted, ";
$sql .= "q.hostname, ";
$sql .= "q.fax_caller_id_name, ";
$sql .= "q.fax_caller_id_number, ";
@@ -172,10 +180,10 @@
$sql .= "q.fax_status, ";
$sql .= "q.fax_retry_date, ";
$sql .= "to_char(timezone(:time_zone, q.fax_retry_date), 'DD Mon YYYY') as fax_retry_date_formatted, ";
$sql .= "to_char(timezone(:time_zone, q.fax_retry_date), 'HH12:MI:SS am') as fax_retry_time_formatted, ";
$sql .= "to_char(timezone(:time_zone, q.fax_retry_date), '".$time_format."') as fax_retry_time_formatted, ";
$sql .= "q.fax_notify_date, ";
$sql .= "to_char(timezone(:time_zone, q.fax_notify_date), 'DD Mon YYYY') as fax_notify_date_formatted, ";
$sql .= "to_char(timezone(:time_zone, q.fax_notify_date), 'HH12:MI:SS am') as fax_notify_time_formatted, ";
$sql .= "to_char(timezone(:time_zone, q.fax_notify_date), '".$time_format."') as fax_notify_time_formatted, ";
$sql .= "q.fax_retry_count, ";
$sql .= "q.fax_accountcode, ";
$sql .= "q.fax_command ";

View File

@@ -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-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -547,13 +547,24 @@
echo " </tr>";
unset($stream_icons, $icons);
//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';
}
//list the stream files
if (!empty($stream_files)) {
foreach ($stream_files as $stream_file_path) {
$row_uuid = uuid();
$stream_file = pathinfo($stream_file_path, PATHINFO_BASENAME);
$stream_file_size = byte_convert(filesize($stream_file_path));
$stream_file_date = date("M d, Y H:i:s", filemtime($stream_file_path));
$stream_file_date = date("M d, Y ".$time_format, filemtime($stream_file_path));
$stream_file_ext = pathinfo($stream_file, PATHINFO_EXTENSION);
switch ($stream_file_ext) {
case "wav" : $stream_file_type = "audio/wav"; break;

View File

@@ -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-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -302,7 +302,6 @@
//add the search term
$search = $_REQUEST["search"] ?? '';
//get total recordings from the database
$sql = "select count(*) from v_recordings ";
$sql .= "where true ";
@@ -332,16 +331,6 @@
[$paging_controls_mini, $rows_per_page] = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
$parameters['time_zone'] = $time_zone;
//set the sql time format
$sql_time_format = 'HH12:MI am';
if (!empty($settings->get('domain', 'time_format'))) {
$sql_time_format = $settings->get('domain', 'time_format') == '12h' ? "HH12:MI am" : "HH24:MI";
}
//get the file size
if ($recording_storage_type == 'base64') {
switch ($db_type) {
@@ -350,12 +339,19 @@
}
}
//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 recordings from the database
$sql = "select recording_uuid, domain_uuid, ";
if (!empty($sql_file_size)) { $sql .= $sql_file_size; }
$sql .= "to_char(timezone(:time_zone, COALESCE(update_date, insert_date)), 'DD Mon YYYY') as date_formatted, \n";
$sql .= "to_char(timezone(:time_zone, COALESCE(update_date, insert_date)), '".$sql_time_format."') as time_formatted, \n";
$sql .= "to_char(timezone(:time_zone, COALESCE(update_date, insert_date)), '".$time_format."') as time_formatted, \n";
$sql .= "recording_name, recording_filename, recording_description ";
$sql .= "from v_recordings ";
$sql .= "where true ";

View File

@@ -657,6 +657,14 @@
$document['title'] = $text['title-time_condition'];
require_once "resources/header.php";
//set the time format options: 12h, 24h
if ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'HH:mm';
}
else {
$time_format = 'hh:mm a';
}
//debug
// echo "<div style='overflow: auto; font-family: courier; width: 100%; height: 200px; border: 1px solid #ccc; padding: 20px;'>\n";
// echo "<b>".'$dialplan_details'."</b>\n"; view_array($dialplan_details, false);
@@ -807,8 +815,7 @@
case 'hour': //hours of day
<?php
if ( $settings->get('domain', 'time_format') == "24h") {
if ($time_format == '24h') {
for ($h = 0; $h <= 23; $h++) {
echo "sel_start.options[sel_start.options.length] = new Option(".$h.", ".$h.");\n";
echo "sel_stop.options[sel_stop.options.length] = new Option(".$h.", ".$h.");\n";
@@ -826,8 +833,7 @@
case 'time-of-day': //time of day
<?php
if ( $settings->get('domain', 'time_format') == "24h") {
if ($time_format == '24h') {
for ($h = 0; $h <= 23; $h++) {
for ($m = 0; $m <= 59; $m++) {
echo "sel_start.options[sel_start.options.length] = new Option(('0'+'".$h."').slice(-2)+':'+('0'+'".$m."').slice(-2),pad('".$h."', 2) + ':' + pad(".$m.", 2));\n";
@@ -841,7 +847,7 @@
echo "sel_start.options[sel_start.options.length] = new Option(((".$h." != 0) ? ((".$h." >= 12) ? ((".$h." == 12) ? ".$h." : (".$h." - 12)) + ':' + pad(".$m.", 2) + ' PM' : ".$h." + ':' + pad(".$m.", 2) + ' AM') : '12:' + pad(".$m.", 2) + ' AM'), pad(".$h.", 2) + ':' + pad(".$m.", 2));\n";
echo "sel_stop.options[sel_stop.options.length] = new Option(((".$h." != 0) ? ((".$h." >= 12) ? ((".$h." == 12) ? ".$h." : (".$h." - 12)) + ':' + pad(".$m.", 2) + ' PM' : ".$h." + ':' + pad(".$m.", 2) + ' AM') : '12:' + pad(".$m.", 2) + ' AM'), pad(".$h.", 2) + ':' + pad(".$m.", 2));\n";
}
}
}
}
//h = 23;
//m = 59;
@@ -876,14 +882,14 @@
tb.id = obj.id;
tb_id = obj.id;
tb.className = 'formfld datetimepicker';
tb.setAttribute('style', 'position: relative; width: 120px; min-width: 120px; max-width: 120px; text-align: center;');
tb.setAttribute('style', 'position: relative; width: 130px; min-width: 130px; max-width: 130px; text-align: center;');
tb.setAttribute('data-toggle', 'datetimepicker');
tb.setAttribute('data-target', '#' + tb.id);
tb.setAttribute('onblur', "$(this).datetimepicker('hide');");
obj.parentNode.insertBefore(tb, obj);
obj.parentNode.removeChild(obj);
$('#'+tb_id).wrap("<div style='position: relative; display: inline;'></div>"); //add parent div
$('#'+tb_id).datetimepicker({ format: 'YYYY-MM-DD HH:mm', });
$('#'+tb_id).datetimepicker({ format: 'YYYY-MM-DD <?php echo $time_format; ?>', });
}
function change_to_select(obj) {

View File

@@ -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-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -482,8 +482,15 @@
}
else {
if (file_exists($greeting_dir.'/'.$row['greeting_filename'])) {
date_default_timezone_set($settings->get('domain', 'time_zone', date_default_timezone_get()));
if ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'H:i:s';
}
else {
$time_format = 'h:i:s a';
}
$file_size = byte_convert(filesize($greeting_dir.'/'.$row['greeting_filename']));
$file_date = date("M d, Y H:i:s", filemtime($greeting_dir.'/'.$row['greeting_filename']));
$file_date = date("M d, Y ".$time_format, filemtime($greeting_dir.'/'.$row['greeting_filename']));
} else {
$file_size = 0;
$file_date = '';

View File

@@ -34,17 +34,22 @@
//if also viewing system status, show more recent calls (more room avaialble)
$missed_limit = !empty($selected_blocks) && (is_array($selected_blocks) && in_array('counts', $selected_blocks)) ? 10 : 5;
//set the sql time format
$sql_time_format = 'DD Mon HH12:MI am';
if (!empty($settings->get('domain', 'time_format'))) {
$sql_time_format = $settings->get('domain', 'time_format') == '12h' ? "DD Mon HH12:MI am" : "DD Mon HH24:MI";
//set the time zone
$time_zone = $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 = 'DD Mon HH24:MI';
}
else {
$time_format = 'DD Mon HH12:MI am';
}
//get the missed calls from call detail records
$sql = "select \n";
$sql .= " status, \n";
$sql .= " direction, \n";
$sql .= " to_char(timezone(:time_zone, start_stamp), '".$sql_time_format."') as start_date_time, \n";
$sql .= " to_char(timezone(:time_zone, start_stamp), '".$time_format."') as start_date_time, \n";
$sql .= " caller_id_name, \n";
$sql .= " caller_id_number, \n";
$sql .= " answer_stamp \n";
@@ -82,7 +87,7 @@
$sql .= "start_epoch desc \n";
$sql .= "limit :missed_limit \n";
$parameters['missed_limit'] = $missed_limit;
$parameters['time_zone'] = $settings->get('domain', 'time_zone', date_default_timezone_get());
$parameters['time_zone'] = $time_zone;
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$result = $database->select($sql, $parameters, 'all');
$num_rows = !empty($result) ? sizeof($result) : 0;

View File

@@ -34,10 +34,15 @@
//if also viewing system status, show more recent calls (more room avaialble)
$recent_limit = isset($selected_blocks) && is_array($selected_blocks) && in_array('counts', $selected_blocks) ? 10 : 5;
//set the sql time format
$sql_time_format = 'DD Mon HH12:MI am';
if (!empty($settings->get('domain', 'time_format'))) {
$sql_time_format = $settings->get('domain', 'time_format') == '12h' ? "DD Mon HH12:MI am" : "DD Mon HH24:MI";
//set the time zone
$time_zone = $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 = 'DD Mon HH24:MI';
}
else {
$time_format = 'DD Mon HH12:MI am';
}
//get the recent calls from call detail records
@@ -46,7 +51,7 @@
status,
direction,
start_stamp,
to_char(timezone(:time_zone, start_stamp), '".$sql_time_format."') as start_date_time,
to_char(timezone(:time_zone, start_stamp), '".$time_format."') as start_date_time,
caller_id_name,
caller_id_number,
destination_number,
@@ -79,7 +84,7 @@
$sql .= "order by start_epoch desc ";
$sql .= "limit :recent_limit ";
$parameters['recent_limit'] = $recent_limit;
$parameters['time_zone'] = $settings->get('domain', 'time_zone', date_default_timezone_get());
$parameters['time_zone'] = $time_zone;
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$result = $database->select($sql, $parameters, 'all');
$num_rows = !empty($result) ? sizeof($result) : 0;

View File

@@ -425,8 +425,8 @@
echo " ".$text['label-start_range']."\n";
echo " </div>\n";
echo " <div class='field no-wrap'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."' autocomplete='off'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."' autocomplete='off'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."' autocomplete='off'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."' autocomplete='off'>\n";
echo " </div>\n";
echo " </div>\n";
}

View File

@@ -272,9 +272,6 @@
$outbound_caller_id_name = urldecode($array["variables"]["outbound_caller_id_name"] ?? '');
$outbound_caller_id_number = urldecode($array["variables"]["outbound_caller_id_number"] ?? '');
//set the time zone
date_default_timezone_set($settings->get('domain', 'time_zone', 'GMT'));
//create the destinations object
$destinations = new destinations();
@@ -308,6 +305,19 @@
}
}
//set the time zone
date_default_timezone_set($settings->get('domain', 'time_zone', date_default_timezone_get()));
//format the date and time
if ($settings->get('domain', 'time_format') == '24h') {
$start_time = date("Y-m-d H:i:s", (int) $start_epoch);
$end_time= date("Y-m-d H:i:s", (int) $end_epoch);
}
else {
$start_time = date("Y-m-d g:i:s a", (int) $start_epoch);
$end_time = date("Y-m-d g:i:s a", (int) $end_epoch);
}
//set the year, month and date
$tmp_year = date("Y", strtotime($start_stamp));
$tmp_month = date("M", strtotime($start_stamp));
@@ -520,8 +530,8 @@
}
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($destination_number)."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape(date("Y-m-d H:i:s", (int) $start_epoch))."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape(date("Y-m-d H:i:s", (int) $end_epoch))."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($start_time)."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($end_time)."</td>\n";
if (permission_exists('xml_cdr_hangup_cause')) {
echo " <td valign='top' class='".$row_style[$c]."'>".escape($hangup_cause)."</td>\n";
}

View File

@@ -53,12 +53,20 @@
$quick_select = 3; //set default
}
//convert time format to 24 hour
if (!empty($start_stamp_begin)) {
$start_stamp_begin_formatted = ($settings->get('domain', 'time_format') == '24h' ? $start_stamp_begin : DateTime::createFromFormat('Y-m-d h:i a', $start_stamp_begin)->format('Y-m-d H:i'));
}
if (!empty($start_stamp_end)) {
$start_stamp_end_formatted = ($settings->get('domain', 'time_format') == '24h' ? $start_stamp_end : DateTime::createFromFormat('Y-m-d h:i a', $start_stamp_end)->format('Y-m-d H:i'));
}
//get the summary
$cdr = new xml_cdr;
$cdr->domain_uuid = $_SESSION['domain_uuid'];
$cdr->quick_select = $quick_select;
$cdr->start_stamp_begin = $start_stamp_begin ?? null;
$cdr->start_stamp_end = $start_stamp_end ?? null;
$cdr->start_stamp_begin = $start_stamp_begin_formatted ?? null;
$cdr->start_stamp_end = $start_stamp_end_formatted ?? null;
$cdr->include_internal = $include_internal ?? null;
$summary = $cdr->user_summary();
@@ -174,14 +182,14 @@
echo " ".$text['label-start_date_time']."\n";
echo " </div>\n";
echo " <div class='field'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin ?? '')."'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin ?? '')."'>\n";
echo " </div>\n";
echo " <div class='label'>\n";
echo " ".$text['label-end_date_time']."\n";
echo " </div>\n";
echo " <div class='field'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end ?? '')."'>\n";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end ?? '')."'>\n";
echo " </div>\n";
echo " </div>\n";

View File

@@ -296,12 +296,13 @@
//set the time zone
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
$parameters['time_zone'] = $time_zone;
//set the sql time format
$sql_time_format = 'HH12:MI am';
if (!empty($settings->get('domain', 'time_format'))) {
$sql_time_format = $settings->get('domain', 'time_format') == '12h' ? "HH12:MI am" : "HH24:MI";
//set the time format options: 12h, 24h
if ($settings->get('domain', 'time_format') == '24h') {
$time_format = 'HH24:MI';
}
else {
$time_format = 'HH12:MI am';
}
//get the results from the db
@@ -313,7 +314,7 @@
$sql .= "c.start_stamp, \n";
$sql .= "c.end_stamp, \n";
$sql .= "to_char(timezone(:time_zone, start_stamp), 'DD Mon YYYY') as start_date_formatted, \n";
$sql .= "to_char(timezone(:time_zone, start_stamp), '".$sql_time_format."') as start_time_formatted, \n";
$sql .= "to_char(timezone(:time_zone, start_stamp), '".$time_format."') as start_time_formatted, \n";
$sql .= "c.start_epoch, \n";
$sql .= "c.hangup_cause, \n";
$sql .= "c.billsec as duration, \n";
@@ -471,50 +472,67 @@
}
}
}
if (!empty($start_stamp_begin) && !empty($start_stamp_end)) {
if (!empty($start_stamp_begin)) {
$start_stamp_begin_formatted = ($settings->get('domain', 'time_format') == '24h' ? $start_stamp_begin : DateTime::createFromFormat('Y-m-d h:i a', $start_stamp_begin)->format('Y-m-d H:i'));
}
if (!empty($start_stamp_end)) {
$start_stamp_end_formatted = ($settings->get('domain', 'time_format') == '24h' ? $start_stamp_end : DateTime::createFromFormat('Y-m-d h:i a', $start_stamp_end)->format('Y-m-d H:i'));
}
if (!empty($start_stamp_begin_formatted) && !empty($start_stamp_end_formatted)) {
$sql .= "and start_stamp between :start_stamp_begin::timestamptz and :start_stamp_end::timestamptz \n";
$parameters['start_stamp_begin'] = $start_stamp_begin.':00.000 '.$time_zone;
$parameters['start_stamp_end'] = $start_stamp_end.':59.999 '.$time_zone;
$parameters['start_stamp_begin'] = $start_stamp_begin_formatted.':00.000 '.$time_zone;
$parameters['start_stamp_end'] = $start_stamp_end_formatted.':59.999 '.$time_zone;
}
else {
if (!empty($start_stamp_begin)) {
if (!empty($start_stamp_begin_formatted)) {
$sql .= "and start_stamp >= :start_stamp_begin \n";
$parameters['start_stamp_begin'] = $start_stamp_begin.':00.000 '.$time_zone;
$parameters['start_stamp_begin'] = $start_stamp_begin_formatted.':00.000 '.$time_zone;
}
if (!empty($start_stamp_end)) {
if (!empty($start_stamp_end_formatted)) {
$sql .= "and start_stamp <= :start_stamp_end \n";
$parameters['start_stamp_end'] = $start_stamp_end.':59.999 '.$time_zone;
$parameters['start_stamp_end'] = $start_stamp_end_formatted.':59.999 '.$time_zone;
}
}
if (!empty($answer_stamp_begin) && !empty($answer_stamp_end)) {
if (!empty($answer_stamp_begin)) {
$answer_stamp_begin_formatted = ($settings->get('domain', 'time_format') == '24h' ? $answer_stamp_begin : DateTime::createFromFormat('Y-m-d h:i a', $answer_stamp_begin)->format('Y-m-d H:i'));
}
if (!empty($answer_stamp_end)) {
$answer_stamp_end_formatted = ($settings->get('domain', 'time_format') == '24h' ? $answer_stamp_end : DateTime::createFromFormat('Y-m-d h:i a', $answer_stamp_end)->format('Y-m-d H:i'));
}
if (!empty($answer_stamp_begin_formatted) && !empty($answer_stamp_end_formatted)) {
$sql .= "and answer_stamp between :answer_stamp_begin::timestamptz and :answer_stamp_end::timestamptz \n";
$parameters['answer_stamp_begin'] = $answer_stamp_begin.':00.000 '.$time_zone;
$parameters['answer_stamp_end'] = $answer_stamp_end.':59.999 '.$time_zone;
$parameters['answer_stamp_begin'] = $answer_stamp_begin_formatted.':00.000 '.$time_zone;
$parameters['answer_stamp_end'] = $answer_stamp_end_formatted.':59.999 '.$time_zone;
}
else {
if (!empty($answer_stamp_begin)) {
if (!empty($answer_stamp_begin_formatted)) {
$sql .= "and answer_stamp >= :answer_stamp_begin \n";
$parameters['answer_stamp_begin'] = $answer_stamp_begin.':00.000 '.$time_zone;;
$parameters['answer_stamp_begin'] = $answer_stamp_begin_formatted.':00.000 '.$time_zone;;
}
if (!empty($answer_stamp_end)) {
if (!empty($answer_stamp_end_formatted)) {
$sql .= "and answer_stamp <= :answer_stamp_end \n";
$parameters['answer_stamp_end'] = $answer_stamp_end.':59.999 '.$time_zone;
$parameters['answer_stamp_end'] = $answer_stamp_end_formatted.':59.999 '.$time_zone;
}
}
if (!empty($end_stamp_begin) && !empty($end_stamp_end)) {
if (!empty($end_stamp_begin)) {
$end_stamp_begin_formatted = ($settings->get('domain', 'time_format') == '24h' ? $end_stamp_begin : DateTime::createFromFormat('Y-m-d h:i a', $end_stamp_begin)->format('Y-m-d H:i'));
}
if (!empty($end_stamp_end)) {
$end_stamp_end_formatted = ($settings->get('domain', 'time_format') == '24h' ? $end_stamp_end : DateTime::createFromFormat('Y-m-d h:i a', $end_stamp_end)->format('Y-m-d H:i'));
}
if (!empty($end_stamp_begin_formatted) && !empty($end_stamp_end_formatted)) {
$sql .= "and end_stamp between :end_stamp_begin::timestamptz and :end_stamp_end::timestamptz \n";
$parameters['end_stamp_begin'] = $end_stamp_begin.':00.000 '.$time_zone;
$parameters['end_stamp_end'] = $end_stamp_end.':59.999 '.$time_zone;
$parameters['end_stamp_begin'] = $end_stamp_begin_formatted.':00.000 '.$time_zone;
$parameters['end_stamp_end'] = $end_stamp_end_formatted.':59.999 '.$time_zone;
}
else {
if (!empty($end_stamp_begin)) {
if (!empty($end_stamp_begin_formatted)) {
$sql .= "and end_stamp >= :end_stamp_begin \n";
$parameters['end_stamp_begin'] = $end_stamp_begin.':00.000 '.$time_zone;
$parameters['end_stamp_begin'] = $end_stamp_begin_formatted.':00.000 '.$time_zone;
}
if (!empty($end_stamp_end)) {
if (!empty($end_stamp_end_formatted)) {
$sql .= "and end_stamp <= :end_stamp_end \n";
$parameters['end_stamp'] = $end_stamp_end.':59.999 '.$time_zone;
$parameters['end_stamp'] = $end_stamp_end_formatted.':59.999 '.$time_zone;
}
}
if (is_numeric($duration_min)) {
@@ -652,6 +670,7 @@
$database->username = $settings->get('cdr', 'archive_database_username');
$database->password = $settings->get('cdr', 'archive_database_password');
}
$parameters['time_zone'] = $time_zone;
$result = $database->select($sql, $parameters, 'all');
$result_count = is_array($result) ? sizeof($result) : 0;
unset($sql, $parameters);

View File

@@ -214,8 +214,8 @@
echo " <td class='vtable'>";
echo " <div class='row'>\n";
echo " <div class='col-sm-12'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>";
echo " </div>\n";
echo " </div>\n";
echo " </td>";
@@ -225,8 +225,8 @@
echo " <td class='vtable'>";
echo " <div class='row'>\n";
echo " <div class='col-sm-12'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#answer_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='answer_stamp_begin' id='answer_stamp_begin' placeholder='".$text['label-from']."' value='".escape($answer_stamp_begin)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#answer_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='answer_stamp_end' id='answer_stamp_end' placeholder='".$text['label-to']."' value='".escape($answer_stamp_end)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#answer_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='answer_stamp_begin' id='answer_stamp_begin' placeholder='".$text['label-from']."' value='".escape($answer_stamp_begin)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#answer_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='answer_stamp_end' id='answer_stamp_end' placeholder='".$text['label-to']."' value='".escape($answer_stamp_end)."'>";
echo " </div>\n";
echo " </div>\n";
echo " </td>";
@@ -236,8 +236,8 @@
echo " <td class='vtable'>";
echo " <div class='row'>\n";
echo " <div class='col-sm-12'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#end_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='end_stamp_begin' id='end_stamp_begin' placeholder='".$text['label-from']."' value='".escape($end_stamp_begin)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#end_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='end_stamp_end' id='end_stamp_end' placeholder='".$text['label-to']."' value='".escape($end_stamp_end)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#end_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='end_stamp_begin' id='end_stamp_begin' placeholder='".$text['label-from']."' value='".escape($end_stamp_begin)."'>";
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#end_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='".($settings->get('domain', 'time_format') == '24h' ? 'min-width: 115px; width: 115px;' : 'min-width: 130px; width: 130px;')."' name='end_stamp_end' id='end_stamp_end' placeholder='".$text['label-to']."' value='".escape($end_stamp_end)."'>";
echo " </div>\n";
echo " </div>\n";
echo " </td>";

View File

@@ -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-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -131,6 +131,14 @@
$search_url .= '&mos_score='.urlencode($_GET['mos_score']);
}
//set the chart time format
if ($settings->get('domain', 'time_format') == '24h') {
$chart_time_format = 'H:mm';
}
else {
$chart_time_format = 'h a';
}
//show the content
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-call-statistics']."</b></div>\n";
@@ -234,6 +242,11 @@
scales: {
x: {
type: "time",
time: {
displayFormats: {
hour: '<?php echo $chart_time_format; ?>',
}
},
},
y: {
min: 0

View File

@@ -200,45 +200,63 @@
$parameters['context'] = '%'.$context.'%';
}
/*
if (!empty($start_stamp_begin) && !empty($start_stamp_end)) {
if (!empty($start_stamp_begin)) {
$start_stamp_begin_formatted = ($settings->get('domain', 'time_format') == '24h' ? $start_stamp_begin : DateTime::createFromFormat('Y-m-d h:i a', $start_stamp_begin)->format('Y-m-d H:i'));
}
if (!empty($start_stamp_end)) {
$start_stamp_end_formatted = ($settings->get('domain', 'time_format') == '24h' ? $start_stamp_end : DateTime::createFromFormat('Y-m-d h:i a', $start_stamp_end)->format('Y-m-d H:i'));
}
if (!empty($start_stamp_begin_formatted) && !empty($start_stamp_end_formatted)) {
$sql_where_ands[] = "start_stamp between :start_stamp_begin and :start_stamp_end";
$parameters['start_stamp_begin'] = $start_stamp_begin.':00.000';
$parameters['start_stamp_end'] = $start_stamp_end.':59.999';
$parameters['start_stamp_begin'] = $start_stamp_begin_formatted.':00.000';
$parameters['start_stamp_end'] = $start_stamp_end_formatted.':59.999';
}
else if (!empty($start_stamp_begin)) {
else if (!empty($start_stamp_begin_formatted)) {
$sql_where_ands[] = "start_stamp >= :start_stamp_begin";
$parameters['start_stamp_begin'] = $start_stamp_begin.':00.000';
$parameters['start_stamp_begin'] = $start_stamp_begin_formatted.':00.000';
}
else if (!empty($start_stamp_end)) {
else if (!empty($start_stamp_end_formatted)) {
$sql_where_ands[] = "start_stamp <= :start_stamp_end";
$parameters['start_stamp_end'] = $start_stamp_end.':59.999';
$parameters['start_stamp_end'] = $start_stamp_end_formatted.':59.999';
}
*/
if (!empty($answer_stamp_begin) && !empty($answer_stamp_end)) {
if (!empty($answer_stamp_begin)) {
$answer_stamp_begin_formatted = ($settings->get('domain', 'time_format') == '24h' ? $answer_stamp_begin : DateTime::createFromFormat('Y-m-d h:i a', $answer_stamp_begin)->format('Y-m-d H:i'));
}
if (!empty($answer_stamp_end)) {
$answer_stamp_end_formatted = ($settings->get('domain', 'time_format') == '24h' ? $answer_stamp_end : DateTime::createFromFormat('Y-m-d h:i a', $answer_stamp_end)->format('Y-m-d H:i'));
}
if (!empty($answer_stamp_begin_formatted) && !empty($answer_stamp_end_formatted)) {
$sql_where_ands[] = "c.answer_stamp between :answer_stamp_begin and :answer_stamp_end";
$parameters['answer_stamp_begin'] = $answer_stamp_begin.':00.000';
$parameters['answer_stamp_end'] = $answer_stamp_end.':59.999';
$parameters['answer_stamp_begin'] = $answer_stamp_begin_formatted.':00.000';
$parameters['answer_stamp_end'] = $answer_stamp_end_formatted.':59.999';
}
else if (!empty($answer_stamp_begin)) {
else if (!empty($answer_stamp_begin_formatted)) {
$sql_where_ands[] = "c.answer_stamp >= :answer_stamp_begin";
$parameters['answer_stamp_begin'] = $answer_stamp_begin.':00.000';
$parameters['answer_stamp_begin'] = $answer_stamp_begin_formatted.':00.000';
}
else if (!empty($answer_stamp_end)) {
else if (!empty($answer_stamp_end_formatted)) {
$sql_where_ands[] = "c.answer_stamp <= :answer_stamp_end";
$parameters['answer_stamp_end'] = $answer_stamp_end.':59.999';
$parameters['answer_stamp_end'] = $answer_stamp_end_formatted.':59.999';
}
if (!empty($end_stamp_begin) && !empty($end_stamp_end)) {
if (!empty($end_stamp_begin)) {
$end_stamp_begin_formatted = ($settings->get('domain', 'time_format') == '24h' ? $end_stamp_begin : DateTime::createFromFormat('Y-m-d h:i a', $end_stamp_begin)->format('Y-m-d H:i'));
}
if (!empty($end_stamp_end)) {
$end_stamp_end_formatted = ($settings->get('domain', 'time_format') == '24h' ? $end_stamp_end : DateTime::createFromFormat('Y-m-d h:i a', $end_stamp_end)->format('Y-m-d H:i'));
}
if (!empty($end_stamp_begin_formatted) && !empty($end_stamp_end_formatted)) {
$sql_where_ands[] = "c.end_stamp between :end_stamp_begin and :end_stamp_end";
$parameters['end_stamp_begin'] = $end_stamp_begin.':00.000';
$parameters['end_stamp_end'] = $end_stamp_end.':59.999';
$parameters['end_stamp_begin'] = $end_stamp_begin_formatted.':00.000';
$parameters['end_stamp_end'] = $end_stamp_end_formatted.':59.999';
}
else if (!empty($end_stamp_begin)) {
else if (!empty($end_stamp_begin_formatted)) {
$sql_where_ands[] = "c.end_stamp >= :end_stamp_begin";
$parameters['end_stamp_begin'] = $end_stamp_begin.':00.000';
$parameters['end_stamp_begin'] = $end_stamp_begin_formatted.':00.000';
}
else if (!empty($end_stamp_end)) {
else if (!empty($end_stamp_end_formatted)) {
$sql_where_ands[] = "c.end_stamp <= :end_stamp_end";
$parameters['end_stamp_end'] = $end_stamp_end.':59.999';
$parameters['end_stamp_end'] = $end_stamp_end_formatted.':59.999';
}
if (!empty($duration)) {
$sql_where_ands[] = "c.duration like :duration";
@@ -355,13 +373,20 @@
//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';
}
else {
$time_format = 'HH12:MI am';
}
//build the sql query for xml cdr statistics
$sql = "select ";
$sql .= "row_number() over() as hours, ";
$sql .= "to_char(start_date at time zone :time_zone, 'DD Mon') as date, \n";
$sql .= "to_char(start_date at time zone :time_zone, 'HH12:MI am') || ' - ' || to_char(end_date at time zone :time_zone, 'HH12:MI am') as time, \n";
$sql .= "to_char(start_date at time zone :time_zone, '".$time_format."') || ' - ' || to_char(end_date at time zone :time_zone, '".$time_format."') as time, \n";
$sql .= "extract(epoch from start_date) as start_epoch, ";
$sql .= "extract(epoch from end_date) as end_epoch, ";
$sql .= "s_hour, start_date, end_date, volume, answered, (round(d.seconds / 60, 1)) as minutes, \n";
@@ -575,6 +600,7 @@
$sql .= " group by s.s_id, s.start_date, s.end_date, s.s_hour \n";
$sql .= " order by s.s_id asc \n";
$sql .= ") as d; \n";
$parameters['time_zone'] = $time_zone;
$stats = $database->select($sql, $parameters, 'all');
//set the hours
@@ -624,4 +650,4 @@
$x++;
}
?>
?>

View File

@@ -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";

View File

@@ -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 @@
}
?>

View File

@@ -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";

View File

@@ -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'];

View File

@@ -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);

View File

@@ -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);

View File

@@ -103,6 +103,8 @@
$view->assign('project_path', PROJECT_PATH);
//domain menu
$view->assign('domain_menu', escape($settings->get('domain', 'menu')));
//time format
$view->assign('time_format', escape($settings->get('domain', 'time_format')));
//domain json token
$view->assign('domain_json_token_name', $domain_json_token['name']);
$view->assign('domain_json_token_hash', $domain_json_token['hash']);

View File

@@ -2958,7 +2958,8 @@ else { //default: white
?>
}
div.card:has(.datetimepicker) {
div.card:has(.datetimepicker),
div.card:has(.datetimesecpicker) {
overflow-x: visible;
}

View File

@@ -19,7 +19,7 @@
<link rel='stylesheet' type='text/css' href='{$project_path}/resources/bootstrap/css/bootstrap-tempusdominus.min.css.php'>
<link rel='stylesheet' type='text/css' href='{$project_path}/resources/bootstrap/css/bootstrap-colorpicker.min.css.php'>
<link rel='stylesheet' type='text/css' href='{$project_path}/resources/fontawesome/css/all.min.css.php'>
<link rel='stylesheet' type='text/css' href='{$project_path}/themes/default/css.php?updated=202509221124'>
<link rel='stylesheet' type='text/css' href='{$project_path}/themes/default/css.php?updated=202512160230'>
{*//link to custom css file *}
{if !empty($settings.theme.custom_css)}
<link rel='stylesheet' type='text/css' href='{$settings.theme.custom_css}'>
@@ -567,9 +567,23 @@
});
//define formatting of individual classes
$('.datepicker').datetimepicker({ format: 'YYYY-MM-DD', });
$('.datetimepicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm', });
$('.datetimepicker-future').datetimepicker({ format: 'YYYY-MM-DD HH:mm', minDate: new Date(), });
$('.datetimesecpicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss', });
{/literal}
{if !empty($time_format) && $time_format == '24h'}
{literal}
$(".datetimepicker").datetimepicker({ format: 'YYYY-MM-DD HH:mm', });
$(".datetimepicker-future").datetimepicker({ format: 'YYYY-MM-DD HH:mm', minDate: new Date(), });
$(".datetimesecpicker").datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss', });
{/literal}
{else}
{literal}
$(".datetimepicker").datetimepicker({ format: 'YYYY-MM-DD hh:mm a', });
$(".datetimepicker-future").datetimepicker({ format: 'YYYY-MM-DD hh:mm a', minDate: new Date(), });
$(".datetimesecpicker").datetimepicker({ format: 'YYYY-MM-DD hh:mm:ss a', });
{/literal}
{/if}
{literal}
});
{/literal}