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:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -92,10 +92,7 @@
|
|||||||
$search = strtolower($_GET["search"]);
|
$search = strtolower($_GET["search"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the time zone
|
//get the count
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
|
||||||
|
|
||||||
//prepare to page the results
|
|
||||||
$sql = "select count(*) from view_call_block ";
|
$sql = "select count(*) from view_call_block ";
|
||||||
$sql .= "where true ";
|
$sql .= "where true ";
|
||||||
if ($show == "all" && permission_exists('call_block_all')) {
|
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);
|
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||||
$offset = $rows_per_page * $page;
|
$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
|
//get the list
|
||||||
$sql = "select domain_uuid, call_block_uuid, call_block_direction, extension_uuid, call_block_name, ";
|
$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_country_code, call_block_number, extension, number_alias, call_block_count, ";
|
||||||
$sql .= " call_block_app, call_block_data, ";
|
$sql .= " call_block_app, call_block_data, ";
|
||||||
$sql .= " to_char(timezone(:time_zone, insert_date), 'DD Mon YYYY') as date_formatted, \n";
|
$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), '".$time_format."') as time_formatted, \n";
|
||||||
$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 .= " cast(call_block_enabled as text), call_block_description, insert_date, insert_user, update_date, update_user ";
|
$sql .= " cast(call_block_enabled as text), call_block_description, insert_date, insert_user, update_date, update_user ";
|
||||||
$sql .= "from view_call_block ";
|
$sql .= "from view_call_block ";
|
||||||
$sql .= "where true ";
|
$sql .= "where true ";
|
||||||
$parameters['time_zone'] = $time_zone;
|
|
||||||
if ($show == "all" && permission_exists('call_block_all')) {
|
if ($show == "all" && permission_exists('call_block_all')) {
|
||||||
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
//$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 .= order_by($order_by, $order, ['domain_uuid','call_block_country_code','call_block_number']);
|
||||||
$sql .= limit_offset($rows_per_page, $offset);
|
$sql .= limit_offset($rows_per_page, $offset);
|
||||||
|
$parameters['time_zone'] = $time_zone;
|
||||||
$result = $database->select($sql, $parameters ?? null, 'all');
|
$result = $database->select($sql, $parameters ?? null, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -93,22 +93,29 @@
|
|||||||
$search = strtolower($_GET["search"]);
|
$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
|
//prepare some of the paging values
|
||||||
$rows_per_page = $settings->get('domain', 'paging', 50);
|
$rows_per_page = $settings->get('domain', 'paging', 50);
|
||||||
$page = $_GET['page'] ?? '';
|
$page = $_GET['page'] ?? '';
|
||||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||||
$offset = $rows_per_page * $page;
|
$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
|
//get the list
|
||||||
$sql = "select r.domain_uuid, d.domain_name, r.call_recording_uuid, r.call_direction, ";
|
$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.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 .= "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), '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 view_call_recordings as r, v_domains as d ";
|
||||||
//$sql .= "from v_call_recordings as r, v_domains as d ";
|
//$sql .= "from v_call_recordings as r, v_domains as d ";
|
||||||
$sql .= "where true ";
|
$sql .= "where true ";
|
||||||
@@ -131,6 +138,7 @@
|
|||||||
}
|
}
|
||||||
$sql .= order_by($order_by, $order, 'r.call_recording_date', 'desc');
|
$sql .= order_by($order_by, $order, 'r.call_recording_date', 'desc');
|
||||||
$sql .= limit_offset($rows_per_page, $offset);
|
$sql .= limit_offset($rows_per_page, $offset);
|
||||||
|
$parameters['time_zone'] = $time_zone;
|
||||||
$call_recordings = $database->select($sql, $parameters ?? null, 'all');
|
$call_recordings = $database->select($sql, $parameters ?? null, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -52,6 +52,14 @@
|
|||||||
$quick_select = 3; //set default
|
$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
|
//get the summary
|
||||||
$destination = new destinations;
|
$destination = new destinations;
|
||||||
$destination->domain_uuid = $_SESSION['domain_uuid'];
|
$destination->domain_uuid = $_SESSION['domain_uuid'];
|
||||||
@@ -59,8 +67,8 @@
|
|||||||
$destination->quick_select = $quick_select;
|
$destination->quick_select = $quick_select;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$destination->start_stamp_begin = $start_stamp_begin ?? '';
|
$destination->start_stamp_begin = $start_stamp_begin_formatted ?? '';
|
||||||
$destination->start_stamp_end = $start_stamp_end ?? '';
|
$destination->start_stamp_end = $start_stamp_end_formatted ?? '';
|
||||||
}
|
}
|
||||||
//$destination->include_internal = $include_internal ?? null;
|
//$destination->include_internal = $include_internal ?? null;
|
||||||
$summary = $destination->destination_summary();
|
$summary = $destination->destination_summary();
|
||||||
@@ -174,7 +182,7 @@
|
|||||||
echo " ".$text['label-start_date_time']."\n";
|
echo " ".$text['label-start_date_time']."\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " <div class='field'>\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";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
|
|
||||||
@@ -183,7 +191,7 @@
|
|||||||
echo " ".$text['label-end_date_time']."\n";
|
echo " ".$text['label-end_date_time']."\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " <div class='field'>\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";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,6 @@
|
|||||||
$devices = $_POST['devices'];
|
$devices = $_POST['devices'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the search
|
|
||||||
$search = strtolower($_REQUEST["search"] ?? '');
|
|
||||||
$fields = strtolower($_REQUEST["fields"] ?? '');
|
|
||||||
|
|
||||||
//process the http post data by action
|
//process the http post data by action
|
||||||
if (!empty($action) && !empty($devices) && is_array($devices) && @sizeof($devices) != 0) {
|
if (!empty($action) && !empty($devices) && is_array($devices) && @sizeof($devices) != 0) {
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
@@ -83,8 +79,9 @@
|
|||||||
$order_by = $_GET["order_by"] ?? '';
|
$order_by = $_GET["order_by"] ?? '';
|
||||||
$order = $_GET["order"] ?? '';
|
$order = $_GET["order"] ?? '';
|
||||||
|
|
||||||
//set the time zone
|
//get the search
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
$search = strtolower($_REQUEST["search"] ?? '');
|
||||||
|
$fields = strtolower($_REQUEST["fields"] ?? '');
|
||||||
|
|
||||||
//get total devices count from the database
|
//get total devices count from the database
|
||||||
$sql = "select count(*) from v_devices ";
|
$sql = "select count(*) from v_devices ";
|
||||||
@@ -108,7 +105,7 @@
|
|||||||
$device_profiles = $database->select($sql, $parameters, 'all');
|
$device_profiles = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
//prepare to page the results
|
//get the count
|
||||||
$sql = "select count(*) from v_devices as d ";
|
$sql = "select count(*) from v_devices as d ";
|
||||||
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
|
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
|
||||||
if (!empty($search)) {
|
if (!empty($search)) {
|
||||||
@@ -180,6 +177,17 @@
|
|||||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param ?? '', $rows_per_page, true);
|
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param ?? '', $rows_per_page, true);
|
||||||
$offset = $rows_per_page * $page;
|
$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
|
//get the list
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
|
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
|
||||||
@@ -208,7 +216,7 @@
|
|||||||
$sql .= "d.device_enabled, ";
|
$sql .= "d.device_enabled, ";
|
||||||
$sql .= "d2.device_label as alternate_label, ";
|
$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), '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 ";
|
$sql .= "from v_devices as d, v_devices as d2 ";
|
||||||
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
|
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
|
||||||
$sql .= ", v_domains as d3 ";
|
$sql .= ", v_domains as d3 ";
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -91,9 +91,6 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the time zone
|
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
|
||||||
|
|
||||||
//get order and order by
|
//get order and order by
|
||||||
$order_by = $_GET["order_by"] ?? null;
|
$order_by = $_GET["order_by"] ?? null;
|
||||||
$order = $_GET["order"] ?? null;
|
$order = $_GET["order"] ?? null;
|
||||||
@@ -138,11 +135,22 @@
|
|||||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||||
$offset = $rows_per_page * $page;
|
$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
|
//get the list
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
$sql .= "email_date, ";
|
$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), '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 .= "email_queue_uuid, ";
|
||||||
$sql .= "hostname, ";
|
$sql .= "hostname, ";
|
||||||
$sql .= "email_from, ";
|
$sql .= "email_from, ";
|
||||||
|
|||||||
@@ -109,13 +109,21 @@ $offset = $rows_per_page * $page;
|
|||||||
//set the time zone
|
//set the time zone
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
$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
|
//get the list
|
||||||
$sql = "select e.emergency_log_uuid, ";
|
$sql = "select e.emergency_log_uuid, ";
|
||||||
$sql .= "e.domain_uuid, ";
|
$sql .= "e.domain_uuid, ";
|
||||||
$sql .= "e.extension, ";
|
$sql .= "e.extension, ";
|
||||||
$sql .= "e.event, ";
|
$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), '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 .= "e.insert_date, ";
|
||||||
$sql .= "c.status as status, ";
|
$sql .= "c.status as status, ";
|
||||||
$sql .= "concat(c.record_path, '/', c.record_name) as recording, "; //temp
|
$sql .= "concat(c.record_path, '/', c.record_name) as recording, "; //temp
|
||||||
|
|||||||
@@ -115,7 +115,14 @@
|
|||||||
|
|
||||||
//set the time zone
|
//set the time zone
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
$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
|
//get the list
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
@@ -123,7 +130,7 @@
|
|||||||
$sql .= "hostname, ";
|
$sql .= "hostname, ";
|
||||||
$sql .= "log_date, ";
|
$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), '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 .= "filter, ";
|
||||||
$sql .= "ip_address, ";
|
$sql .= "ip_address, ";
|
||||||
$sql .= "extension, ";
|
$sql .= "extension, ";
|
||||||
@@ -148,6 +155,7 @@
|
|||||||
}
|
}
|
||||||
$sql .= order_by($order_by, $order, 'log_date', 'desc');
|
$sql .= order_by($order_by, $order, 'log_date', 'desc');
|
||||||
$sql .= limit_offset($rows_per_page, $offset);
|
$sql .= limit_offset($rows_per_page, $offset);
|
||||||
|
$parameters['time_zone'] = $time_zone;
|
||||||
$event_guard_logs = $database->select($sql, $parameters ?? null, 'all');
|
$event_guard_logs = $database->select($sql, $parameters ?? null, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -244,16 +244,10 @@
|
|||||||
|
|
||||||
//set the time zone
|
//set the time zone
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
||||||
$parameters['time_zone'] = $time_zone;
|
|
||||||
|
|
||||||
//set the time format options: 12h, 24h
|
//set the time format options: 12h, 24h
|
||||||
if (!empty($settings->get('domain', 'time_format'))) {
|
if ($settings->get('domain', 'time_format') == '24h') {
|
||||||
if ($settings->get('domain', 'time_format') == '12h') {
|
$time_format = 'HH24:MI:SS';
|
||||||
$time_format = 'HH12:MI:SS am';
|
|
||||||
}
|
|
||||||
elseif ($settings->get('domain', 'time_format') == '24h') {
|
|
||||||
$time_format = 'HH24:MI:SS';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$time_format = 'HH12:MI:SS am';
|
$time_format = 'HH12:MI:SS am';
|
||||||
@@ -279,6 +273,7 @@
|
|||||||
$parameters['domain_uuid'] = $domain_uuid;
|
$parameters['domain_uuid'] = $domain_uuid;
|
||||||
$sql .= order_by($order_by, $order, 'fax_date', 'desc');
|
$sql .= order_by($order_by, $order, 'fax_date', 'desc');
|
||||||
$sql .= limit_offset($rows_per_page, $offset);
|
$sql .= limit_offset($rows_per_page, $offset);
|
||||||
|
$parameters['time_zone'] = $time_zone;
|
||||||
$fax_files = $database->select($sql, $parameters, 'all');
|
$fax_files = $database->select($sql, $parameters, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
$parameters['search'] = '%'.$search.'%';
|
$parameters['search'] = '%'.$search.'%';
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepare to page the results
|
//get the count
|
||||||
$sql = "select count(fax_log_uuid) from v_fax_logs ";
|
$sql = "select count(fax_log_uuid) from v_fax_logs ";
|
||||||
$sql .= "where domain_uuid = :domain_uuid ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
$sql .= "and fax_uuid = :fax_uuid ";
|
$sql .= "and fax_uuid = :fax_uuid ";
|
||||||
@@ -104,14 +104,19 @@
|
|||||||
//set the time zone
|
//set the time zone
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
||||||
|
|
||||||
//set time format
|
//set the time format options: 12h, 24h
|
||||||
$time_format = $settings->get('domain', 'time_format');
|
if ($settings->get('domain', 'time_format') == '24h') {
|
||||||
|
$time_format = 'HH24:MI:SS';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$time_format = 'HH12:MI:SS am';
|
||||||
|
}
|
||||||
|
|
||||||
//get the list
|
//get the list
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
$sql .= " fax_epoch, ";
|
$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)), '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_success, ";
|
||||||
$sql .= " fax_result_code, ";
|
$sql .= " fax_result_code, ";
|
||||||
$sql .= " fax_result_text, ";
|
$sql .= " fax_result_text, ";
|
||||||
|
|||||||
@@ -518,7 +518,13 @@ if (!function_exists('fax_split_dtmf')) {
|
|||||||
$pdf->SetXY($x + 2.0, $y + 1.65);
|
$pdf->SetXY($x + 2.0, $y + 1.65);
|
||||||
if (defined('STDIN') || (!empty($_REQUEST['submit']) && $_REQUEST['submit'] != 'preview')) {
|
if (defined('STDIN') || (!empty($_REQUEST['submit']) && $_REQUEST['submit'] != 'preview')) {
|
||||||
$date = new DateTime('now', new DateTimeZone( $settings->get('domain','time_zone', date_default_timezone_get() ) ));
|
$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);
|
$pdf->SetXY($x + 2.0, $y + 1.95);
|
||||||
if (!empty($fax_recipient)) {
|
if (!empty($fax_recipient)) {
|
||||||
|
|||||||
@@ -93,9 +93,6 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the time zone
|
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
|
||||||
|
|
||||||
//get order and order by
|
//get order and order by
|
||||||
$order_by = $_GET["order_by"] ?? null;
|
$order_by = $_GET["order_by"] ?? null;
|
||||||
$order = $_GET["order"] ?? null;
|
$order = $_GET["order"] ?? null;
|
||||||
@@ -152,6 +149,17 @@
|
|||||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||||
$offset = $rows_per_page * $page;
|
$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
|
//get the list
|
||||||
$sql = "SELECT ";
|
$sql = "SELECT ";
|
||||||
$sql .= "d.domain_name, ";
|
$sql .= "d.domain_name, ";
|
||||||
@@ -160,7 +168,7 @@
|
|||||||
$sql .= "q.fax_uuid, ";
|
$sql .= "q.fax_uuid, ";
|
||||||
$sql .= "q.fax_date, ";
|
$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), '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.hostname, ";
|
||||||
$sql .= "q.fax_caller_id_name, ";
|
$sql .= "q.fax_caller_id_name, ";
|
||||||
$sql .= "q.fax_caller_id_number, ";
|
$sql .= "q.fax_caller_id_number, ";
|
||||||
@@ -172,10 +180,10 @@
|
|||||||
$sql .= "q.fax_status, ";
|
$sql .= "q.fax_status, ";
|
||||||
$sql .= "q.fax_retry_date, ";
|
$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), '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 .= "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), '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_retry_count, ";
|
||||||
$sql .= "q.fax_accountcode, ";
|
$sql .= "q.fax_accountcode, ";
|
||||||
$sql .= "q.fax_command ";
|
$sql .= "q.fax_command ";
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -547,13 +547,24 @@
|
|||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
unset($stream_icons, $icons);
|
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
|
//list the stream files
|
||||||
if (!empty($stream_files)) {
|
if (!empty($stream_files)) {
|
||||||
foreach ($stream_files as $stream_file_path) {
|
foreach ($stream_files as $stream_file_path) {
|
||||||
$row_uuid = uuid();
|
$row_uuid = uuid();
|
||||||
$stream_file = pathinfo($stream_file_path, PATHINFO_BASENAME);
|
$stream_file = pathinfo($stream_file_path, PATHINFO_BASENAME);
|
||||||
$stream_file_size = byte_convert(filesize($stream_file_path));
|
$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);
|
$stream_file_ext = pathinfo($stream_file, PATHINFO_EXTENSION);
|
||||||
switch ($stream_file_ext) {
|
switch ($stream_file_ext) {
|
||||||
case "wav" : $stream_file_type = "audio/wav"; break;
|
case "wav" : $stream_file_type = "audio/wav"; break;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -302,7 +302,6 @@
|
|||||||
|
|
||||||
//add the search term
|
//add the search term
|
||||||
$search = $_REQUEST["search"] ?? '';
|
$search = $_REQUEST["search"] ?? '';
|
||||||
|
|
||||||
//get total recordings from the database
|
//get total recordings from the database
|
||||||
$sql = "select count(*) from v_recordings ";
|
$sql = "select count(*) from v_recordings ";
|
||||||
$sql .= "where true ";
|
$sql .= "where true ";
|
||||||
@@ -332,16 +331,6 @@
|
|||||||
[$paging_controls_mini, $rows_per_page] = paging($num_rows, $param, $rows_per_page, true);
|
[$paging_controls_mini, $rows_per_page] = paging($num_rows, $param, $rows_per_page, true);
|
||||||
$offset = $rows_per_page * $page;
|
$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
|
//get the file size
|
||||||
if ($recording_storage_type == 'base64') {
|
if ($recording_storage_type == 'base64') {
|
||||||
switch ($db_type) {
|
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
|
//get the recordings from the database
|
||||||
$sql = "select recording_uuid, domain_uuid, ";
|
$sql = "select recording_uuid, domain_uuid, ";
|
||||||
if (!empty($sql_file_size)) { $sql .= $sql_file_size; }
|
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)), '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 .= "recording_name, recording_filename, recording_description ";
|
||||||
$sql .= "from v_recordings ";
|
$sql .= "from v_recordings ";
|
||||||
$sql .= "where true ";
|
$sql .= "where true ";
|
||||||
|
|||||||
@@ -657,6 +657,14 @@
|
|||||||
$document['title'] = $text['title-time_condition'];
|
$document['title'] = $text['title-time_condition'];
|
||||||
require_once "resources/header.php";
|
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
|
//debug
|
||||||
// echo "<div style='overflow: auto; font-family: courier; width: 100%; height: 200px; border: 1px solid #ccc; padding: 20px;'>\n";
|
// 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);
|
// echo "<b>".'$dialplan_details'."</b>\n"; view_array($dialplan_details, false);
|
||||||
@@ -807,8 +815,7 @@
|
|||||||
|
|
||||||
case 'hour': //hours of day
|
case 'hour': //hours of day
|
||||||
<?php
|
<?php
|
||||||
if ( $settings->get('domain', 'time_format') == "24h") {
|
if ($time_format == '24h') {
|
||||||
|
|
||||||
for ($h = 0; $h <= 23; $h++) {
|
for ($h = 0; $h <= 23; $h++) {
|
||||||
echo "sel_start.options[sel_start.options.length] = new Option(".$h.", ".$h.");\n";
|
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";
|
echo "sel_stop.options[sel_stop.options.length] = new Option(".$h.", ".$h.");\n";
|
||||||
@@ -826,8 +833,7 @@
|
|||||||
|
|
||||||
case 'time-of-day': //time of day
|
case 'time-of-day': //time of day
|
||||||
<?php
|
<?php
|
||||||
if ( $settings->get('domain', 'time_format') == "24h") {
|
if ($time_format == '24h') {
|
||||||
|
|
||||||
for ($h = 0; $h <= 23; $h++) {
|
for ($h = 0; $h <= 23; $h++) {
|
||||||
for ($m = 0; $m <= 59; $m++) {
|
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";
|
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_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";
|
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;
|
//h = 23;
|
||||||
//m = 59;
|
//m = 59;
|
||||||
@@ -876,14 +882,14 @@
|
|||||||
tb.id = obj.id;
|
tb.id = obj.id;
|
||||||
tb_id = obj.id;
|
tb_id = obj.id;
|
||||||
tb.className = 'formfld datetimepicker';
|
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-toggle', 'datetimepicker');
|
||||||
tb.setAttribute('data-target', '#' + tb.id);
|
tb.setAttribute('data-target', '#' + tb.id);
|
||||||
tb.setAttribute('onblur', "$(this).datetimepicker('hide');");
|
tb.setAttribute('onblur', "$(this).datetimepicker('hide');");
|
||||||
obj.parentNode.insertBefore(tb, obj);
|
obj.parentNode.insertBefore(tb, obj);
|
||||||
obj.parentNode.removeChild(obj);
|
obj.parentNode.removeChild(obj);
|
||||||
$('#'+tb_id).wrap("<div style='position: relative; display: inline;'></div>"); //add parent div
|
$('#'+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) {
|
function change_to_select(obj) {
|
||||||
|
|||||||
@@ -57,9 +57,10 @@
|
|||||||
$language_enabled = false;
|
$language_enabled = false;
|
||||||
|
|
||||||
//add the speech object and get the voices and languages arrays
|
//add the speech object and get the voices and languages arrays
|
||||||
if ($speech_enabled && !empty($speech_engine)) {
|
if (class_exists('speech') && $speech_enabled && !empty($speech_engine)) {
|
||||||
$speech = new speech($settings);
|
$speech = new speech($settings);
|
||||||
$voices = $speech->get_voices();
|
$voices = $speech->get_voices();
|
||||||
|
$greeting_format = $speech->get_format();
|
||||||
//$speech_models = $speech->get_models();
|
//$speech_models = $speech->get_models();
|
||||||
//$translate_enabled = $speech->get_translate_enabled();
|
//$translate_enabled = $speech->get_translate_enabled();
|
||||||
//$language_enabled = $speech->get_language_enabled();
|
//$language_enabled = $speech->get_language_enabled();
|
||||||
@@ -67,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//add the transcribe object and get the languages arrays
|
//add the transcribe object and get the languages arrays
|
||||||
if ($transcribe_enabled && !empty($transcribe_engine)) {
|
if (class_exists('transcribe') && $transcribe_enabled && !empty($transcribe_engine)) {
|
||||||
$transcribe = new transcribe($settings);
|
$transcribe = new transcribe($settings);
|
||||||
//$transcribe_models = $transcribe->get_models();
|
//$transcribe_models = $transcribe->get_models();
|
||||||
//$translate_enabled = $transcribe->get_translate_enabled();
|
//$translate_enabled = $transcribe->get_translate_enabled();
|
||||||
@@ -109,15 +110,17 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||||||
if (permission_exists('voicemail_greeting_delete')) {
|
if (permission_exists('voicemail_greeting_delete')) {
|
||||||
if (!empty($_POST['action']) && $_POST['action'] == 'delete' && is_uuid($voicemail_greeting_uuid)) {
|
if (!empty($_POST['action']) && $_POST['action'] == 'delete' && is_uuid($voicemail_greeting_uuid)) {
|
||||||
//prepare
|
//prepare
|
||||||
$array[0]['checked'] = 'true';
|
$array[0]['checked'] = 'true';
|
||||||
$array[0]['uuid'] = $voicemail_greeting_uuid;
|
$array[0]['uuid'] = $voicemail_greeting_uuid;
|
||||||
|
|
||||||
//delete
|
//delete
|
||||||
$obj = new voicemail_greetings;
|
$obj = new voicemail_greetings;
|
||||||
$obj->voicemail_id = $voicemail_id;
|
$obj->voicemail_id = $voicemail_id;
|
||||||
$obj->delete($array);
|
$obj->delete($array);
|
||||||
|
|
||||||
//redirect
|
//redirect
|
||||||
header("Location: voicemail_greetings.php?id=".$voicemail_id);
|
header("Location: voicemail_greetings.php?id=".$voicemail_id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,12 +240,11 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||||||
|
|
||||||
//set message
|
//set message
|
||||||
message::add($text['message-'.($action == 'add' ? 'greeting_created' : 'update')]);
|
message::add($text['message-'.($action == 'add' ? 'greeting_created' : 'update')]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//redirect
|
//redirect
|
||||||
header("Location: voicemail_greetings.php?id=".$voicemail_id);
|
header("Location: voicemail_greetings.php?id=".$voicemail_id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -405,14 +407,13 @@ if (!empty($_POST) && empty($_POST["persistformvar"])) {
|
|||||||
echo " ".$text['label-message']."\n";
|
echo " ".$text['label-message']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<td class='vtable' align='left'>\n";
|
echo "<td class='vtable' align='left'>\n";
|
||||||
echo " <textarea class='formfld' name='greeting_message' style='width: 300px; height: 150px;'>".escape($greeting_message ?? '')."</textarea>\n";
|
echo " <textarea class='formfld' name='greeting_message' style='width: 300px; height: 150px;'>".escape_textarea($greeting_message ?? '')."</textarea>\n";
|
||||||
echo "<br />\n";
|
echo "<br />\n";
|
||||||
echo $text['description-message']."\n";
|
echo $text['description-message']."\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||||
echo " ".$text['label-description']."\n";
|
echo " ".$text['label-description']."\n";
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -482,8 +482,15 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (file_exists($greeting_dir.'/'.$row['greeting_filename'])) {
|
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_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 {
|
} else {
|
||||||
$file_size = 0;
|
$file_size = 0;
|
||||||
$file_date = '';
|
$file_date = '';
|
||||||
|
|||||||
@@ -302,17 +302,17 @@
|
|||||||
if ($show == "all" && permission_exists('voicemail_all')) {
|
if ($show == "all" && permission_exists('voicemail_all')) {
|
||||||
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param, "class='shrink'");
|
||||||
}
|
}
|
||||||
echo th_order_by('voicemail_id', $text['label-voicemail_id'], $order_by, $order);
|
echo th_order_by('voicemail_id', $text['label-voicemail_id'], $order_by, $order, null, "style='width: 1%;'");
|
||||||
echo th_order_by('voicemail_mail_to', $text['label-voicemail_mail_to'], $order_by, $order, null, "class='hide-sm-dn'");
|
echo th_order_by('voicemail_mail_to', $text['label-voicemail_mail_to'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||||
echo th_order_by('voicemail_file', $text['label-voicemail_file_attached'], $order_by, $order, null, "class='center hide-md-dn'");
|
echo th_order_by('voicemail_file', $text['label-voicemail_file_attached'], $order_by, $order, null, "class='center hide-md-dn' style='width: 1%;'");
|
||||||
echo th_order_by('voicemail_local_after_email', $text['label-voicemail_local_after_email'], $order_by, $order, null, "class='center hide-md-dn'");
|
echo th_order_by('voicemail_local_after_email', $text['label-voicemail_local_after_email'], $order_by, $order, null, "class='center hide-md-dn' style='width: 1%;'");
|
||||||
if (permission_exists('voicemail_transcription_enabled') && $settings->get('transcribe', 'enabled', false) === true) {
|
if (permission_exists('voicemail_transcription_enabled') && $settings->get('transcribe', 'enabled', false) === true) {
|
||||||
echo th_order_by('voicemail_transcription_enabled', $text['label-voicemail_transcription_enabled'], $order_by, $order, null, "class='center'");
|
echo th_order_by('voicemail_transcription_enabled', $text['label-voicemail_transcription_enabled'], $order_by, $order, null, "class='center' style='width: 1%;'");
|
||||||
}
|
}
|
||||||
if (permission_exists('voicemail_message_view') || permission_exists('voicemail_greeting_view')) {
|
if (permission_exists('voicemail_message_view') || permission_exists('voicemail_greeting_view')) {
|
||||||
echo "<th>".$text['label-tools']."</th>\n";
|
echo "<th style='width: 17%;'>".$text['label-tools']."</th>\n";
|
||||||
}
|
}
|
||||||
echo th_order_by('voicemail_enabled', $text['label-voicemail_enabled'], $order_by, $order, null, "class='center'");
|
echo th_order_by('voicemail_enabled', $text['label-voicemail_enabled'], $order_by, $order, null, "class='center' style='width: 1%;'");
|
||||||
echo th_order_by('voicemail_description', $text['label-voicemail_description'], $order_by, $order, null, "class='hide-sm-dn'");
|
echo th_order_by('voicemail_description', $text['label-voicemail_description'], $order_by, $order, null, "class='hide-sm-dn'");
|
||||||
if (permission_exists('voicemail_edit') && $list_row_edit_button) {
|
if (permission_exists('voicemail_edit') && $list_row_edit_button) {
|
||||||
echo " <td class='action-button'> </td>\n";
|
echo " <td class='action-button'> </td>\n";
|
||||||
@@ -354,7 +354,7 @@
|
|||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
|
|
||||||
echo " <td class='hide-sm-dn'>".escape($row['voicemail_mail_to'])." </td>\n";
|
echo " <td class='hide-sm-dn overflow' style='max-width: 175px;'>".escape($row['voicemail_mail_to'])." </td>\n";
|
||||||
echo " <td class='center hide-md-dn'>".($row['voicemail_file'] == 'attach' ? $text['label-true'] : $text['label-false'])."</td>\n";
|
echo " <td class='center hide-md-dn'>".($row['voicemail_file'] == 'attach' ? $text['label-true'] : $text['label-false'])."</td>\n";
|
||||||
echo " <td class='center hide-md-dn'>".ucwords(escape($row['voicemail_local_after_email']))." </td>\n";
|
echo " <td class='center hide-md-dn'>".ucwords(escape($row['voicemail_local_after_email']))." </td>\n";
|
||||||
if (permission_exists('voicemail_transcription_enabled') && $settings->get('transcribe', 'enabled', false) === true) {
|
if (permission_exists('voicemail_transcription_enabled') && $settings->get('transcribe', 'enabled', false) === true) {
|
||||||
|
|||||||
@@ -34,17 +34,22 @@
|
|||||||
//if also viewing system status, show more recent calls (more room avaialble)
|
//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;
|
$missed_limit = !empty($selected_blocks) && (is_array($selected_blocks) && in_array('counts', $selected_blocks)) ? 10 : 5;
|
||||||
|
|
||||||
//set the sql time format
|
//set the time zone
|
||||||
$sql_time_format = 'DD Mon HH12:MI am';
|
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
||||||
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 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
|
//get the missed calls from call detail records
|
||||||
$sql = "select \n";
|
$sql = "select \n";
|
||||||
$sql .= " status, \n";
|
$sql .= " status, \n";
|
||||||
$sql .= " direction, \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_name, \n";
|
||||||
$sql .= " caller_id_number, \n";
|
$sql .= " caller_id_number, \n";
|
||||||
$sql .= " answer_stamp \n";
|
$sql .= " answer_stamp \n";
|
||||||
@@ -82,7 +87,7 @@
|
|||||||
$sql .= "start_epoch desc \n";
|
$sql .= "start_epoch desc \n";
|
||||||
$sql .= "limit :missed_limit \n";
|
$sql .= "limit :missed_limit \n";
|
||||||
$parameters['missed_limit'] = $missed_limit;
|
$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'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$result = $database->select($sql, $parameters, 'all');
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
$num_rows = !empty($result) ? sizeof($result) : 0;
|
$num_rows = !empty($result) ? sizeof($result) : 0;
|
||||||
|
|||||||
@@ -34,10 +34,15 @@
|
|||||||
//if also viewing system status, show more recent calls (more room avaialble)
|
//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;
|
$recent_limit = isset($selected_blocks) && is_array($selected_blocks) && in_array('counts', $selected_blocks) ? 10 : 5;
|
||||||
|
|
||||||
//set the sql time format
|
//set the time zone
|
||||||
$sql_time_format = 'DD Mon HH12:MI am';
|
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
||||||
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 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
|
//get the recent calls from call detail records
|
||||||
@@ -46,7 +51,7 @@
|
|||||||
status,
|
status,
|
||||||
direction,
|
direction,
|
||||||
start_stamp,
|
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_name,
|
||||||
caller_id_number,
|
caller_id_number,
|
||||||
destination_number,
|
destination_number,
|
||||||
@@ -79,7 +84,7 @@
|
|||||||
$sql .= "order by start_epoch desc ";
|
$sql .= "order by start_epoch desc ";
|
||||||
$sql .= "limit :recent_limit ";
|
$sql .= "limit :recent_limit ";
|
||||||
$parameters['recent_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'];
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||||
$result = $database->select($sql, $parameters, 'all');
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
$num_rows = !empty($result) ? sizeof($result) : 0;
|
$num_rows = !empty($result) ? sizeof($result) : 0;
|
||||||
|
|||||||
@@ -425,8 +425,8 @@
|
|||||||
echo " ".$text['label-start_range']."\n";
|
echo " ".$text['label-start_range']."\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " <div class='field no-wrap'>\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_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='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_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";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,9 +272,6 @@
|
|||||||
$outbound_caller_id_name = urldecode($array["variables"]["outbound_caller_id_name"] ?? '');
|
$outbound_caller_id_name = urldecode($array["variables"]["outbound_caller_id_name"] ?? '');
|
||||||
$outbound_caller_id_number = urldecode($array["variables"]["outbound_caller_id_number"] ?? '');
|
$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
|
//create the destinations object
|
||||||
$destinations = new destinations();
|
$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
|
//set the year, month and date
|
||||||
$tmp_year = date("Y", strtotime($start_stamp));
|
$tmp_year = date("Y", strtotime($start_stamp));
|
||||||
$tmp_month = date("M", strtotime($start_stamp));
|
$tmp_month = date("M", strtotime($start_stamp));
|
||||||
@@ -520,8 +530,8 @@
|
|||||||
}
|
}
|
||||||
echo " </td>\n";
|
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($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($start_time)."</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($end_time)."</td>\n";
|
||||||
if (permission_exists('xml_cdr_hangup_cause')) {
|
if (permission_exists('xml_cdr_hangup_cause')) {
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($hangup_cause)."</td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($hangup_cause)."</td>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,12 +53,20 @@
|
|||||||
$quick_select = 3; //set default
|
$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
|
//get the summary
|
||||||
$cdr = new xml_cdr;
|
$cdr = new xml_cdr;
|
||||||
$cdr->domain_uuid = $_SESSION['domain_uuid'];
|
$cdr->domain_uuid = $_SESSION['domain_uuid'];
|
||||||
$cdr->quick_select = $quick_select;
|
$cdr->quick_select = $quick_select;
|
||||||
$cdr->start_stamp_begin = $start_stamp_begin ?? null;
|
$cdr->start_stamp_begin = $start_stamp_begin_formatted ?? null;
|
||||||
$cdr->start_stamp_end = $start_stamp_end ?? null;
|
$cdr->start_stamp_end = $start_stamp_end_formatted ?? null;
|
||||||
$cdr->include_internal = $include_internal ?? null;
|
$cdr->include_internal = $include_internal ?? null;
|
||||||
$summary = $cdr->user_summary();
|
$summary = $cdr->user_summary();
|
||||||
|
|
||||||
@@ -174,14 +182,14 @@
|
|||||||
echo " ".$text['label-start_date_time']."\n";
|
echo " ".$text['label-start_date_time']."\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " <div class='field'>\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";
|
||||||
|
|
||||||
echo " <div class='label'>\n";
|
echo " <div class='label'>\n";
|
||||||
echo " ".$text['label-end_date_time']."\n";
|
echo " ".$text['label-end_date_time']."\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " <div class='field'>\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";
|
||||||
|
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
|
|||||||
@@ -296,12 +296,13 @@
|
|||||||
|
|
||||||
//set the time zone
|
//set the time zone
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
||||||
$parameters['time_zone'] = $time_zone;
|
|
||||||
|
|
||||||
//set the sql time format
|
//set the time format options: 12h, 24h
|
||||||
$sql_time_format = 'HH12:MI am';
|
if ($settings->get('domain', 'time_format') == '24h') {
|
||||||
if (!empty($settings->get('domain', 'time_format'))) {
|
$time_format = 'HH24:MI';
|
||||||
$sql_time_format = $settings->get('domain', 'time_format') == '12h' ? "HH12:MI am" : "HH24:MI";
|
}
|
||||||
|
else {
|
||||||
|
$time_format = 'HH12:MI am';
|
||||||
}
|
}
|
||||||
|
|
||||||
//get the results from the db
|
//get the results from the db
|
||||||
@@ -313,7 +314,7 @@
|
|||||||
$sql .= "c.start_stamp, \n";
|
$sql .= "c.start_stamp, \n";
|
||||||
$sql .= "c.end_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), '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.start_epoch, \n";
|
||||||
$sql .= "c.hangup_cause, \n";
|
$sql .= "c.hangup_cause, \n";
|
||||||
$sql .= "c.billsec as duration, \n";
|
$sql .= "c.billsec as duration, \n";
|
||||||
@@ -471,50 +472,67 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!empty($start_stamp_begin)) {
|
||||||
if (!empty($start_stamp_begin) && !empty($start_stamp_end)) {
|
$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";
|
$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_begin'] = $start_stamp_begin_formatted.':00.000 '.$time_zone;
|
||||||
$parameters['start_stamp_end'] = $start_stamp_end.':59.999 '.$time_zone;
|
$parameters['start_stamp_end'] = $start_stamp_end_formatted.':59.999 '.$time_zone;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!empty($start_stamp_begin)) {
|
if (!empty($start_stamp_begin_formatted)) {
|
||||||
$sql .= "and start_stamp >= :start_stamp_begin \n";
|
$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";
|
$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";
|
$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_begin'] = $answer_stamp_begin_formatted.':00.000 '.$time_zone;
|
||||||
$parameters['answer_stamp_end'] = $answer_stamp_end.':59.999 '.$time_zone;
|
$parameters['answer_stamp_end'] = $answer_stamp_end_formatted.':59.999 '.$time_zone;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!empty($answer_stamp_begin)) {
|
if (!empty($answer_stamp_begin_formatted)) {
|
||||||
$sql .= "and answer_stamp >= :answer_stamp_begin \n";
|
$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";
|
$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";
|
$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_begin'] = $end_stamp_begin_formatted.':00.000 '.$time_zone;
|
||||||
$parameters['end_stamp_end'] = $end_stamp_end.':59.999 '.$time_zone;
|
$parameters['end_stamp_end'] = $end_stamp_end_formatted.':59.999 '.$time_zone;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!empty($end_stamp_begin)) {
|
if (!empty($end_stamp_begin_formatted)) {
|
||||||
$sql .= "and end_stamp >= :end_stamp_begin \n";
|
$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";
|
$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)) {
|
if (is_numeric($duration_min)) {
|
||||||
@@ -652,6 +670,7 @@
|
|||||||
$database->username = $settings->get('cdr', 'archive_database_username');
|
$database->username = $settings->get('cdr', 'archive_database_username');
|
||||||
$database->password = $settings->get('cdr', 'archive_database_password');
|
$database->password = $settings->get('cdr', 'archive_database_password');
|
||||||
}
|
}
|
||||||
|
$parameters['time_zone'] = $time_zone;
|
||||||
$result = $database->select($sql, $parameters, 'all');
|
$result = $database->select($sql, $parameters, 'all');
|
||||||
$result_count = is_array($result) ? sizeof($result) : 0;
|
$result_count = is_array($result) ? sizeof($result) : 0;
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|||||||
@@ -214,8 +214,8 @@
|
|||||||
echo " <td class='vtable'>";
|
echo " <td class='vtable'>";
|
||||||
echo " <div class='row'>\n";
|
echo " <div class='row'>\n";
|
||||||
echo " <div class='col-sm-12'>";
|
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_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='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_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 " </div>\n";
|
echo " </div>\n";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
@@ -225,8 +225,8 @@
|
|||||||
echo " <td class='vtable'>";
|
echo " <td class='vtable'>";
|
||||||
echo " <div class='row'>\n";
|
echo " <div class='row'>\n";
|
||||||
echo " <div class='col-sm-12'>";
|
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_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='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_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 " </div>\n";
|
echo " </div>\n";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
@@ -236,8 +236,8 @@
|
|||||||
echo " <td class='vtable'>";
|
echo " <td class='vtable'>";
|
||||||
echo " <div class='row'>\n";
|
echo " <div class='row'>\n";
|
||||||
echo " <div class='col-sm-12'>";
|
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_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='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_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 " </div>\n";
|
echo " </div>\n";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -131,6 +131,14 @@
|
|||||||
$search_url .= '&mos_score='.urlencode($_GET['mos_score']);
|
$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
|
//show the content
|
||||||
echo "<div class='action_bar' id='action_bar'>\n";
|
echo "<div class='action_bar' id='action_bar'>\n";
|
||||||
echo " <div class='heading'><b>".$text['title-call-statistics']."</b></div>\n";
|
echo " <div class='heading'><b>".$text['title-call-statistics']."</b></div>\n";
|
||||||
@@ -234,6 +242,11 @@
|
|||||||
scales: {
|
scales: {
|
||||||
x: {
|
x: {
|
||||||
type: "time",
|
type: "time",
|
||||||
|
time: {
|
||||||
|
displayFormats: {
|
||||||
|
hour: '<?php echo $chart_time_format; ?>',
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
y: {
|
y: {
|
||||||
min: 0
|
min: 0
|
||||||
|
|||||||
@@ -200,45 +200,63 @@
|
|||||||
$parameters['context'] = '%'.$context.'%';
|
$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";
|
$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_begin'] = $start_stamp_begin_formatted.':00.000';
|
||||||
$parameters['start_stamp_end'] = $start_stamp_end.':59.999';
|
$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";
|
$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";
|
$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";
|
$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_begin'] = $answer_stamp_begin_formatted.':00.000';
|
||||||
$parameters['answer_stamp_end'] = $answer_stamp_end.':59.999';
|
$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";
|
$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";
|
$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";
|
$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_begin'] = $end_stamp_begin_formatted.':00.000';
|
||||||
$parameters['end_stamp_end'] = $end_stamp_end.':59.999';
|
$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";
|
$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";
|
$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)) {
|
if (!empty($duration)) {
|
||||||
$sql_where_ands[] = "c.duration like :duration";
|
$sql_where_ands[] = "c.duration like :duration";
|
||||||
@@ -355,13 +373,20 @@
|
|||||||
|
|
||||||
//set the time zone
|
//set the time zone
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
$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
|
//build the sql query for xml cdr statistics
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
$sql .= "row_number() over() as hours, ";
|
$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, '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 start_date) as start_epoch, ";
|
||||||
$sql .= "extract(epoch from end_date) as end_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";
|
$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 .= " group by s.s_id, s.start_date, s.end_date, s.s_hour \n";
|
||||||
$sql .= " order by s.s_id asc \n";
|
$sql .= " order by s.s_id asc \n";
|
||||||
$sql .= ") as d; \n";
|
$sql .= ") as d; \n";
|
||||||
|
$parameters['time_zone'] = $time_zone;
|
||||||
$stats = $database->select($sql, $parameters, 'all');
|
$stats = $database->select($sql, $parameters, 'all');
|
||||||
|
|
||||||
//set the hours
|
//set the hours
|
||||||
|
|||||||
@@ -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
|
//pre-populate the form
|
||||||
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
if (!empty($_GET) && empty($_POST["persistformvar"])) {
|
||||||
$sql = "select * from v_contacts ";
|
$sql = "select * from v_contacts ";
|
||||||
@@ -2635,14 +2646,14 @@ if (permission_exists('contact_time_view')) {
|
|||||||
echo " ".$text['label-time_start']."\n";
|
echo " ".$text['label-time_start']."\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " <div class='field no-wrap'>\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>\n";
|
||||||
|
|
||||||
echo " <div class='label'>\n";
|
echo " <div class='label'>\n";
|
||||||
echo " ".$text['label-time_stop']."\n";
|
echo " ".$text['label-time_stop']."\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " <div class='field no-wrap'>\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>\n";
|
||||||
|
|
||||||
echo " <div class='label'>\n";
|
echo " <div class='label'>\n";
|
||||||
@@ -2701,7 +2712,7 @@ if (permission_exists('contact_note_view')) {
|
|||||||
echo " ".$text['label-note_user']."\n";
|
echo " ".$text['label-note_user']."\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " <div class='field no-wrap' style='margin-top: 2px;'>\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>\n";
|
||||||
|
|
||||||
echo " <div class='label empty_row' style='grid-row: 4 / span 99;'>\n";
|
echo " <div class='label empty_row' style='grid-row: 4 / span 99;'>\n";
|
||||||
|
|||||||
@@ -39,6 +39,17 @@
|
|||||||
$contact_uuid = $_GET['id'];
|
$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
|
//get the contact list
|
||||||
$sql = "select * from v_contact_notes ";
|
$sql = "select * from v_contact_notes ";
|
||||||
$sql .= "where domain_uuid = :domain_uuid ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
@@ -93,7 +104,7 @@
|
|||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
echo " <td class='overflow'>".$contact_note."</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') {
|
if (permission_exists('contact_note_edit') && $list_row_edit_button == 'true') {
|
||||||
echo " <td class='action-button'>\n";
|
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]);
|
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
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -34,6 +34,17 @@
|
|||||||
exit;
|
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
|
//get the contact list
|
||||||
$sql = "select * from v_contact_notes ";
|
$sql = "select * from v_contact_notes ";
|
||||||
$sql .= "where domain_uuid = :domain_uuid ";
|
$sql .= "where domain_uuid = :domain_uuid ";
|
||||||
@@ -53,7 +64,7 @@
|
|||||||
foreach ($contact_notes as $row) {
|
foreach ($contact_notes as $row) {
|
||||||
$contact_note = str_replace("\n","<br />",escape($row['contact_note']));
|
$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' 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++;
|
$x++;
|
||||||
}
|
}
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -28,6 +28,10 @@
|
|||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
if (!permission_exists('contact_time_add')) { echo "access denied"; exit; }
|
||||||
|
|
||||||
|
//set the defaults
|
||||||
|
$contact_time_uuid = '';
|
||||||
|
$time_description = '';
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
@@ -36,6 +40,9 @@
|
|||||||
$domain_uuid = $_REQUEST['domain_uuid'];
|
$domain_uuid = $_REQUEST['domain_uuid'];
|
||||||
$contact_uuid = $_REQUEST['contact_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
|
//get posted variables & set time status
|
||||||
if (!empty($_POST)) {
|
if (!empty($_POST)) {
|
||||||
$contact_time_uuid = $_POST['contact_time_uuid'];
|
$contact_time_uuid = $_POST['contact_time_uuid'];
|
||||||
|
|||||||
@@ -42,6 +42,17 @@
|
|||||||
$contact_uuid = $_GET['id'];
|
$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
|
//get the contact list
|
||||||
$sql = "select ct.*, u.username, u.domain_uuid as user_domain_uuid ";
|
$sql = "select ct.*, u.username, u.domain_uuid as user_domain_uuid ";
|
||||||
$sql .= "from v_contact_times as ct, v_users as u ";
|
$sql .= "from v_contact_times as ct, v_users as u ";
|
||||||
@@ -86,7 +97,7 @@
|
|||||||
if (!empty($row["time_start"]) && !empty($row['time_stop'])) {
|
if (!empty($row["time_start"]) && !empty($row['time_stop'])) {
|
||||||
$time_start = strtotime($row["time_start"]);
|
$time_start = strtotime($row["time_start"]);
|
||||||
$time_stop = strtotime($row['time_stop']);
|
$time_stop = strtotime($row['time_stop']);
|
||||||
$time = gmdate("H:i:s", ($time_stop - $time_start));
|
$time = gmdate($time_zone, ($time_stop - $time_start));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
unset($time);
|
unset($time);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -146,7 +146,14 @@
|
|||||||
|
|
||||||
//set the time zone
|
//set the time zone
|
||||||
$time_zone = $settings->get('domain', 'time_zone', date_default_timezone_get());
|
$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
|
//get the list
|
||||||
$sql = "select ";
|
$sql = "select ";
|
||||||
@@ -155,7 +162,7 @@
|
|||||||
$sql .= "u.domain_uuid, ";
|
$sql .= "u.domain_uuid, ";
|
||||||
$sql .= "d.domain_name, ";
|
$sql .= "d.domain_name, ";
|
||||||
$sql .= "to_char(timezone(:time_zone, timestamp), 'DD Mon YYYY') as date_formatted, ";
|
$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 .= "user_uuid, ";
|
||||||
$sql .= "username, ";
|
$sql .= "username, ";
|
||||||
$sql .= "type, ";
|
$sql .= "type, ";
|
||||||
@@ -187,6 +194,7 @@
|
|||||||
$sql .= "and u.domain_uuid = d.domain_uuid ";
|
$sql .= "and u.domain_uuid = d.domain_uuid ";
|
||||||
$sql .= order_by($order_by, $order, 'timestamp', 'desc');
|
$sql .= order_by($order_by, $order, 'timestamp', 'desc');
|
||||||
$sql .= limit_offset($rows_per_page, $offset);
|
$sql .= limit_offset($rows_per_page, $offset);
|
||||||
|
$parameters['time_zone'] = $time_zone;
|
||||||
$user_logs = $database->select($sql, $parameters ?? null, 'all');
|
$user_logs = $database->select($sql, $parameters ?? null, 'all');
|
||||||
unset($sql, $parameters);
|
unset($sql, $parameters);
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,8 @@
|
|||||||
$view->assign('project_path', PROJECT_PATH);
|
$view->assign('project_path', PROJECT_PATH);
|
||||||
//domain menu
|
//domain menu
|
||||||
$view->assign('domain_menu', escape($settings->get('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
|
//domain json token
|
||||||
$view->assign('domain_json_token_name', $domain_json_token['name']);
|
$view->assign('domain_json_token_name', $domain_json_token['name']);
|
||||||
$view->assign('domain_json_token_hash', $domain_json_token['hash']);
|
$view->assign('domain_json_token_hash', $domain_json_token['hash']);
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ account.{$row.line_number}.sip_server.2.expires = {$row.register_expires}
|
|||||||
account.{$row.line_number}.sip_server.2.retry_counts = 3
|
account.{$row.line_number}.sip_server.2.retry_counts = 3
|
||||||
|
|
||||||
account.{$row.line_number}.outbound_proxy_enable = {if isset($account.{$row.line_number}.outbound_proxy_primary)}1{else}0{/if}
|
account.{$row.line_number}.outbound_proxy_enable = {if isset($account.{$row.line_number}.outbound_proxy_primary)}1{else}0{/if}
|
||||||
|
|
||||||
account.{$row.line_number}.outbound_proxy.1.address = {$row.outbound_proxy_primary}
|
account.{$row.line_number}.outbound_proxy.1.address = {$row.outbound_proxy_primary}
|
||||||
{if isset($outbound_proxy_1_port)}
|
{if isset($outbound_proxy_1_port)}
|
||||||
account.{$row.line_number}.outbound_proxy.1.port = {$outbound_proxy_1_port}
|
account.{$row.line_number}.outbound_proxy.1.port = {$outbound_proxy_1_port}
|
||||||
|
|||||||
@@ -551,12 +551,19 @@ account.2.label = {$account.2.label}
|
|||||||
account.2.display_name = {$account.2.display_name}
|
account.2.display_name = {$account.2.display_name}
|
||||||
account.2.auth_name = {$account.2.auth_id}
|
account.2.auth_name = {$account.2.auth_id}
|
||||||
account.2.password = {$account.2.password}
|
account.2.password = {$account.2.password}
|
||||||
|
|
||||||
{if isset($account.2.server.1.address)}
|
{if isset($account.2.server.1.address)}
|
||||||
account.2.user_name = {$account.2.user_id}@{$account.2.server_address}
|
account.2.user_name = {$account.2.user_id}@{$account.2.server_address}
|
||||||
{else}
|
{else}
|
||||||
account.2.user_name = {$account.2.user_id}
|
account.2.user_name = {$account.2.user_id}
|
||||||
{/if}
|
{/if}
|
||||||
account.2.sip_server_host = {$account.2.server_address}
|
|
||||||
|
{if isset($account.2.server.1.address)}
|
||||||
|
account.2.sip_server.1.address = {$account.2.server.1.address}
|
||||||
|
{else}
|
||||||
|
account.2.sip_server.1.address = {$account.2.server_address}
|
||||||
|
{/if}
|
||||||
|
|
||||||
account.2.sip_server_port = {$account.2.sip_port}
|
account.2.sip_server_port = {$account.2.sip_port}
|
||||||
account.2.outbound_host = {$account.2.outbound_proxy}
|
account.2.outbound_host = {$account.2.outbound_proxy}
|
||||||
|
|
||||||
@@ -574,6 +581,17 @@ account.2.outbound_proxy.1.address = {$account.2.outbound_proxy_primary}
|
|||||||
account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary}
|
account.2.outbound_proxy.2.address = {$account.2.outbound_proxy_secondary}
|
||||||
account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if}
|
account.2.outbound_proxy_enable = {if isset($account.2.outbound_proxy_primary)}1{else}0{/if}
|
||||||
|
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.2.outbound_proxy.1.port = {$outbound_proxy_1_port}
|
||||||
|
{else}
|
||||||
|
account.2.outbound_proxy.1.port = {$account.2.sip_port}
|
||||||
|
{/if}
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.2.outbound_proxy.2.port = {$outbound_proxy_2_port}
|
||||||
|
{else}
|
||||||
|
account.2.outbound_proxy.2.port = {$account.2.sip_port}
|
||||||
|
{/if}
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
## Failback ##
|
## Failback ##
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
@@ -1037,20 +1055,24 @@ account.3.label = {$account.3.label}
|
|||||||
account.3.display_name = {$account.3.display_name}
|
account.3.display_name = {$account.3.display_name}
|
||||||
account.3.auth_name = {$account.3.auth_id}
|
account.3.auth_name = {$account.3.auth_id}
|
||||||
account.3.password = {$account.3.password}
|
account.3.password = {$account.3.password}
|
||||||
|
|
||||||
{if isset($account.3.server.1.address)}
|
{if isset($account.3.server.1.address)}
|
||||||
account.3.user_name = {$account.3.user_id}@{$account.3.server_address}
|
account.3.user_name = {$account.3.user_id}@{$account.3.server_address}
|
||||||
{else}
|
{else}
|
||||||
account.3.user_name = {$account.3.user_id}
|
account.3.user_name = {$account.3.user_id}
|
||||||
{/if}
|
{/if}
|
||||||
account.3.sip_server_host = {$account.3.server_address}
|
|
||||||
|
{if isset($account.3.server.1.address)}
|
||||||
|
account.3.sip_server.1.address = {$account.3.server.1.address}
|
||||||
|
{else}
|
||||||
|
account.3.sip_server.1.address = {$account.3.server_address}
|
||||||
|
{/if}
|
||||||
|
|
||||||
account.3.sip_server_port = {$account.3.sip_port}
|
account.3.sip_server_port = {$account.3.sip_port}
|
||||||
account.3.outbound_host = {$account.3.outbound_proxy}
|
account.3.outbound_host = {$account.3.outbound_proxy}
|
||||||
|
|
||||||
account.3.outbound_port = {$account.3.sip_port}
|
account.3.outbound_port = {$account.3.sip_port}
|
||||||
{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if}
|
{if isset($yealink_sip_listen_port)}account.3.sip_listen_port = {$yealink_sip_listen_port}{else}account.3.sip_listen_port = 5060{/if}
|
||||||
|
|
||||||
account.3.sip_listen_port = 5060
|
|
||||||
#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
|
|
||||||
{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if}
|
{if $account.3.sip_transport == 'udp'}account.3.transport = 0{/if}
|
||||||
{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if}
|
{if $account.3.sip_transport == 'tcp'}account.3.transport = 1{/if}
|
||||||
{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if}
|
{if $account.3.sip_transport == 'tls'}account.3.transport = 2{/if}
|
||||||
@@ -1060,6 +1082,17 @@ account.3.outbound_proxy.1.address = {$account.3.outbound_proxy_primary}
|
|||||||
account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary}
|
account.3.outbound_proxy.2.address = {$account.3.outbound_proxy_secondary}
|
||||||
account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if}
|
account.3.outbound_proxy_enable = {if isset($account.3.outbound_proxy_primary)}1{else}0{/if}
|
||||||
|
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.3.outbound_proxy.1.port = {$outbound_proxy_1_port}
|
||||||
|
{else}
|
||||||
|
account.3.outbound_proxy.1.port = {$account.3.sip_port}
|
||||||
|
{/if}
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.3.outbound_proxy.2.port = {$outbound_proxy_2_port}
|
||||||
|
{else}
|
||||||
|
account.3.outbound_proxy.2.port = {$account.3.sip_port}
|
||||||
|
{/if}
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
## Failback ##
|
## Failback ##
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
@@ -1514,20 +1547,24 @@ account.4.label = {$account.4.label}
|
|||||||
account.4.display_name = {$account.4.display_name}
|
account.4.display_name = {$account.4.display_name}
|
||||||
account.4.auth_name = {$account.4.auth_id}
|
account.4.auth_name = {$account.4.auth_id}
|
||||||
account.4.password = {$account.4.password}
|
account.4.password = {$account.4.password}
|
||||||
|
|
||||||
{if isset($account.4.server.1.address)}
|
{if isset($account.4.server.1.address)}
|
||||||
account.4.user_name = {$account.4.user_id}@{$account.4.server_address}
|
account.4.user_name = {$account.4.user_id}@{$account.4.server_address}
|
||||||
{else}
|
{else}
|
||||||
account.4.user_name = {$account.4.user_id}
|
account.4.user_name = {$account.4.user_id}
|
||||||
{/if}
|
{/if}
|
||||||
account.4.sip_server_host = {$account.4.server_address}
|
|
||||||
|
{if isset($account.4.server.1.address)}
|
||||||
|
account.4.sip_server.1.address = {$account.4.server.1.address}
|
||||||
|
{else}
|
||||||
|
account.4.sip_server.1.address = {$account.4.server_address}
|
||||||
|
{/if}
|
||||||
|
|
||||||
account.4.sip_server_port = {$account.4.sip_port}
|
account.4.sip_server_port = {$account.4.sip_port}
|
||||||
account.4.outbound_host = {$account.4.outbound_proxy}
|
account.4.outbound_host = {$account.4.outbound_proxy}
|
||||||
|
|
||||||
account.4.outbound_port = {$account.4.sip_port}
|
account.4.outbound_port = {$account.4.sip_port}
|
||||||
{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if}
|
{if isset($yealink_sip_listen_port)}account.4.sip_listen_port = {$yealink_sip_listen_port}{else}account.4.sip_listen_port = 5060{/if}
|
||||||
|
|
||||||
account.4.sip_listen_port = 5060
|
|
||||||
#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
|
|
||||||
{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if}
|
{if $account.4.sip_transport == 'udp'}account.4.transport = 0{/if}
|
||||||
{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if}
|
{if $account.4.sip_transport == 'tcp'}account.4.transport = 1{/if}
|
||||||
{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if}
|
{if $account.4.sip_transport == 'tls'}account.4.transport = 2{/if}
|
||||||
@@ -1537,6 +1574,17 @@ account.4.outbound_proxy.1.address = {$account.4.outbound_proxy_primary}
|
|||||||
account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary}
|
account.4.outbound_proxy.2.address = {$account.4.outbound_proxy_secondary}
|
||||||
account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if}
|
account.4.outbound_proxy_enable = {if isset($account.4.outbound_proxy_primary)}1{else}0{/if}
|
||||||
|
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.4.outbound_proxy.1.port = {$outbound_proxy_1_port}
|
||||||
|
{else}
|
||||||
|
account.4.outbound_proxy.1.port = {$account.4.sip_port}
|
||||||
|
{/if}
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.4.outbound_proxy.2.port = {$outbound_proxy_2_port}
|
||||||
|
{else}
|
||||||
|
account.4.outbound_proxy.2.port = {$account.4.sip_port}
|
||||||
|
{/if}
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
## Failback ##
|
## Failback ##
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
@@ -1986,20 +2034,24 @@ account.5.label = {$account.5.label}
|
|||||||
account.5.display_name = {$account.5.display_name}
|
account.5.display_name = {$account.5.display_name}
|
||||||
account.5.auth_name = {$account.5.auth_id}
|
account.5.auth_name = {$account.5.auth_id}
|
||||||
account.5.password = {$account.5.password}
|
account.5.password = {$account.5.password}
|
||||||
|
|
||||||
{if isset($account.5.server.1.address)}
|
{if isset($account.5.server.1.address)}
|
||||||
account.5.user_name = {$account.5.user_id}@{$account.5.server_address}
|
account.5.user_name = {$account.5.user_id}@{$account.5.server_address}
|
||||||
{else}
|
{else}
|
||||||
account.5.user_name = {$account.5.user_id}
|
account.5.user_name = {$account.5.user_id}
|
||||||
{/if}
|
{/if}
|
||||||
account.5.sip_server_host = {$account.5.server_address}
|
|
||||||
|
{if isset($account.5.server.1.address)}
|
||||||
|
account.5.sip_server.1.address = {$account.5.server.1.address}
|
||||||
|
{else}
|
||||||
|
account.5.sip_server.1.address = {$account.5.server_address}
|
||||||
|
{/if}
|
||||||
|
|
||||||
account.5.sip_server_port = {$account.5.sip_port}
|
account.5.sip_server_port = {$account.5.sip_port}
|
||||||
account.5.outbound_host = {$account.5.outbound_proxy}
|
account.5.outbound_host = {$account.5.outbound_proxy}
|
||||||
|
|
||||||
account.5.outbound_port = {$account.5.sip_port}
|
account.5.outbound_port = {$account.5.sip_port}
|
||||||
{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if}
|
{if isset($yealink_sip_listen_port)}account.5.sip_listen_port = {$yealink_sip_listen_port}{else}account.5.sip_listen_port = 5060{/if}
|
||||||
|
|
||||||
account.5.sip_listen_port = 5060
|
|
||||||
#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
|
|
||||||
{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if}
|
{if $account.5.sip_transport == 'udp'}account.5.transport = 0{/if}
|
||||||
{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if}
|
{if $account.5.sip_transport == 'tcp'}account.5.transport = 1{/if}
|
||||||
{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if}
|
{if $account.5.sip_transport == 'tls'}account.5.transport = 2{/if}
|
||||||
@@ -2009,6 +2061,17 @@ account.5.outbound_proxy.1.address = {$account.5.outbound_proxy_primary}
|
|||||||
account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary}
|
account.5.outbound_proxy.2.address = {$account.5.outbound_proxy_secondary}
|
||||||
account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if}
|
account.5.outbound_proxy_enable = {if isset($account.5.outbound_proxy_primary)}1{else}0{/if}
|
||||||
|
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.5.outbound_proxy.1.port = {$outbound_proxy_1_port}
|
||||||
|
{else}
|
||||||
|
account.5.outbound_proxy.1.port = {$account.5.sip_port}
|
||||||
|
{/if}
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.5.outbound_proxy.2.port = {$outbound_proxy_2_port}
|
||||||
|
{else}
|
||||||
|
account.5.outbound_proxy.2.port = {$account.5.sip_port}
|
||||||
|
{/if}
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
## Failback ##
|
## Failback ##
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
@@ -2458,20 +2521,24 @@ account.6.label = {$account.6.label}
|
|||||||
account.6.display_name = {$account.6.display_name}
|
account.6.display_name = {$account.6.display_name}
|
||||||
account.6.auth_name = {$account.6.auth_id}
|
account.6.auth_name = {$account.6.auth_id}
|
||||||
account.6.password = {$account.6.password}
|
account.6.password = {$account.6.password}
|
||||||
|
|
||||||
{if isset($account.6.server.1.address)}
|
{if isset($account.6.server.1.address)}
|
||||||
account.6.user_name = {$account.6.user_id}@{$account.6.server_address}
|
account.6.user_name = {$account.6.user_id}@{$account.6.server_address}
|
||||||
{else}
|
{else}
|
||||||
account.6.user_name = {$account.6.user_id}
|
account.6.user_name = {$account.6.user_id}
|
||||||
{/if}
|
{/if}
|
||||||
account.6.sip_server_host = {$account.6.server_address}
|
|
||||||
|
{if isset($account.6.server.1.address)}
|
||||||
|
account.6.sip_server.1.address = {$account.6.server.1.address}
|
||||||
|
{else}
|
||||||
|
account.6.sip_server.1.address = {$account.6.server_address}
|
||||||
|
{/if}
|
||||||
|
|
||||||
account.6.sip_server_port = {$account.6.sip_port}
|
account.6.sip_server_port = {$account.6.sip_port}
|
||||||
account.6.outbound_host = {$account.6.outbound_proxy}
|
account.6.outbound_host = {$account.6.outbound_proxy}
|
||||||
|
|
||||||
account.6.outbound_port = {$account.6.sip_port}
|
account.6.outbound_port = {$account.6.sip_port}
|
||||||
{if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if}
|
{if isset($yealink_sip_listen_port)}account.6.sip_listen_port = {$yealink_sip_listen_port}{else}account.6.sip_listen_port = 5060{/if}
|
||||||
|
|
||||||
account.6.sip_listen_port = 5060
|
|
||||||
#Configure the transport type; 0-UDP (default), 1-TCP, 2-TLS, 3-DNS SRV;
|
|
||||||
{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if}
|
{if $account.6.sip_transport == 'udp'}account.6.transport = 0{/if}
|
||||||
{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if}
|
{if $account.6.sip_transport == 'tcp'}account.6.transport = 1{/if}
|
||||||
{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if}
|
{if $account.6.sip_transport == 'tls'}account.6.transport = 2{/if}
|
||||||
@@ -2481,6 +2548,17 @@ account.6.outbound_proxy.1.address = {$account.6.outbound_proxy_primary}
|
|||||||
account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary}
|
account.6.outbound_proxy.2.address = {$account.6.outbound_proxy_secondary}
|
||||||
account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if}
|
account.6.outbound_proxy_enable = {if isset($account.6.outbound_proxy_primary)}1{else}0{/if}
|
||||||
|
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.6.outbound_proxy.1.port = {$outbound_proxy_1_port}
|
||||||
|
{else}
|
||||||
|
account.6.outbound_proxy.1.port = {$account.6.sip_port}
|
||||||
|
{/if}
|
||||||
|
{if isset($outbound_proxy_1_port)}
|
||||||
|
account.6.outbound_proxy.2.port = {$outbound_proxy_2_port}
|
||||||
|
{else}
|
||||||
|
account.6.outbound_proxy.2.port = {$account.6.sip_port}
|
||||||
|
{/if}
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
## Failback ##
|
## Failback ##
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
|
|||||||
@@ -2958,7 +2958,8 @@ else { //default: white
|
|||||||
?>
|
?>
|
||||||
}
|
}
|
||||||
|
|
||||||
div.card:has(.datetimepicker) {
|
div.card:has(.datetimepicker),
|
||||||
|
div.card:has(.datetimesecpicker) {
|
||||||
overflow-x: visible;
|
overflow-x: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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-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/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}/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 *}
|
{*//link to custom css file *}
|
||||||
{if !empty($settings.theme.custom_css)}
|
{if !empty($settings.theme.custom_css)}
|
||||||
<link rel='stylesheet' type='text/css' href='{$settings.theme.custom_css}'>
|
<link rel='stylesheet' type='text/css' href='{$settings.theme.custom_css}'>
|
||||||
@@ -567,9 +567,23 @@
|
|||||||
});
|
});
|
||||||
//define formatting of individual classes
|
//define formatting of individual classes
|
||||||
$('.datepicker').datetimepicker({ format: 'YYYY-MM-DD', });
|
$('.datepicker').datetimepicker({ format: 'YYYY-MM-DD', });
|
||||||
$('.datetimepicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm', });
|
{/literal}
|
||||||
$('.datetimepicker-future').datetimepicker({ format: 'YYYY-MM-DD HH:mm', minDate: new Date(), });
|
|
||||||
$('.datetimesecpicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss', });
|
{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}
|
{/literal}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user