mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 02:46:30 +00:00
Extension Summary: Updates for PHP 8.1
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -47,23 +47,27 @@
|
||||
$text = $language->get();
|
||||
|
||||
//retrieve submitted data
|
||||
$quick_select = $_REQUEST['quick_select'];
|
||||
$start_stamp_begin = $_REQUEST['start_stamp_begin'];
|
||||
$start_stamp_end = $_REQUEST['start_stamp_end'];
|
||||
$include_internal = $_REQUEST['include_internal'];
|
||||
$quick_select = sizeof($_REQUEST) == 0 ? 3 : $quick_select; //set default
|
||||
if (!empty($_REQUEST)) {
|
||||
$quick_select = $_REQUEST['quick_select'];
|
||||
$start_stamp_begin = $_REQUEST['start_stamp_begin'];
|
||||
$start_stamp_end = $_REQUEST['start_stamp_end'];
|
||||
$include_internal = $_REQUEST['include_internal'];
|
||||
}
|
||||
else {
|
||||
$quick_select = 3; //set default
|
||||
}
|
||||
|
||||
//get the summary
|
||||
$cdr = new xml_cdr;
|
||||
$cdr->domain_uuid = $_SESSION['domain_uuid'];
|
||||
$cdr->quick_select = $quick_select;
|
||||
$cdr->start_stamp_begin = $start_stamp_begin;
|
||||
$cdr->start_stamp_end = $start_stamp_end;
|
||||
$cdr->include_internal = $include_internal;
|
||||
$cdr->start_stamp_begin = $start_stamp_begin ?? null;
|
||||
$cdr->start_stamp_end = $start_stamp_end ?? null;
|
||||
$cdr->include_internal = $include_internal ?? null;
|
||||
$summary = $cdr->user_summary();
|
||||
|
||||
//set the http header
|
||||
if ($_REQUEST['type'] == "csv") {
|
||||
if (!empty($_REQUEST['type']) && $_REQUEST['type'] == "csv") {
|
||||
|
||||
//set the headers
|
||||
header('Content-type: application/octet-binary');
|
||||
@@ -149,24 +153,6 @@
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='form_set'>\n";
|
||||
echo " <div class='label'>\n";
|
||||
echo " ".$text['label-start_date_time']."\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='field'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>\n";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='form_set'>\n";
|
||||
echo " <div class='label'>\n";
|
||||
echo " ".$text['label-end_date_time']."\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='field'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>\n";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='form_set'>\n";
|
||||
echo " <div class='label'>\n";
|
||||
echo " ".$text['label-include_internal']."\n";
|
||||
@@ -179,9 +165,27 @@
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='form_set'>\n";
|
||||
echo " <div class='label'>\n";
|
||||
echo " ".$text['label-start_date_time']."\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='field'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin ?? '')."'>\n";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo " <div class='form_set'>\n";
|
||||
echo " <div class='label'>\n";
|
||||
echo " ".$text['label-end_date_time']."\n";
|
||||
echo " </div>\n";
|
||||
echo " <div class='field'>\n";
|
||||
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px; max-width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end ?? '')."'>\n";
|
||||
echo " </div>\n";
|
||||
echo " </div>\n";
|
||||
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('xml_cdr_extension_summary_all') && $_GET['show'] == 'all') {
|
||||
if (!empty($_GET['show']) && $_GET['show'] == 'all' && permission_exists('xml_cdr_extension_summary_all')) {
|
||||
echo "<input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
|
||||
@@ -191,7 +195,7 @@
|
||||
//show the results
|
||||
echo "<table class='list'>\n";
|
||||
echo " <tr class='list-header'>\n";
|
||||
if ($_GET['show'] === "all" && permission_exists('xml_cdr_extension_summary_all')) {
|
||||
if (!empty($_GET['show']) && $_GET['show'] === "all" && permission_exists('xml_cdr_extension_summary_all')) {
|
||||
echo " <th>".$text['label-domain']."</th>\n";
|
||||
}
|
||||
echo " <th>".$text['label-extension']."</th>\n";
|
||||
@@ -213,7 +217,7 @@
|
||||
if (is_array($summary)) {
|
||||
foreach ($summary as $key => $row) {
|
||||
echo "<tr class='list-row'>\n";
|
||||
if ($_GET['show'] === "all" && permission_exists('xml_cdr_extension_summary_all')) {
|
||||
if (!empty($_GET['show']) && $_GET['show'] === "all" && permission_exists('xml_cdr_extension_summary_all')) {
|
||||
echo " <td>".escape($row['domain_name'])."</td>\n";
|
||||
}
|
||||
echo " <td>".escape($row['extension'])."</td>\n";
|
||||
@@ -240,4 +244,4 @@
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user