From 37eefcd5726e05951a23e6a0bb2873bdc9947d54 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 1 Feb 2018 16:00:18 -0700 Subject: [PATCH] Update xml_cdr_statistics.php --- app/xml_cdr/xml_cdr_statistics.php | 120 ++++++++++++++++++++++++----- 1 file changed, 101 insertions(+), 19 deletions(-) diff --git a/app/xml_cdr/xml_cdr_statistics.php b/app/xml_cdr/xml_cdr_statistics.php index c7b4401c10..c6048340d3 100644 --- a/app/xml_cdr/xml_cdr_statistics.php +++ b/app/xml_cdr/xml_cdr_statistics.php @@ -23,16 +23,19 @@ Contributor(s): Mark J Crane */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('xml_cdr_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('xml_cdr_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -42,27 +45,106 @@ else { require_once "xml_cdr_statistics_inc.php"; require_once "resources/header.php"; -//page title and description +//search url + $search_url = ''; + if (permission_exists('xml_cdr_search_advanced')) { + $search_url .= '&redirect=xml_cdr_statistics'; + } + if(permission_exists('xml_cdr_all') && ($_GET['showall'] === 'true')){ + $search_url .= '&showall=true'; + } + if (strlen($_GET['direction']) > 0) { + $search_url .= '&direction='.$_GET['direction']; + } + if (strlen($_GET['leg']) > 0) { + $search_url .= '&leg='.$_GET['leg']; + } + if (strlen($_GET['caller_id_name']) > 0) { + $search_url .= '&caller_id_name='.$_GET['caller_id_name']; + } + if (strlen($_GET['caller_extension_uuid']) > 0) { + $search_url .= '&caller_extension_uuid='.$_GET['caller_extension_uuid']; + } + if (strlen($_GET['caller_id_number']) > 0) { + $search_url .= '&caller_id_number='.$_GET['caller_id_number']; + } + if (strlen($_GET['destination_number']) > 0) { + $search_url .= '&destination_number='.$_GET['destination_number']; + } + if (strlen($_GET['context']) > 0) { + $search_url .= '&context='.$_GET['context']; + } + if (strlen($_GET['start_stamp_begin']) > 0) { + $search_url .= '&start_stamp_begin='.$_GET['start_stamp_begin']; + } + if (strlen($_GET['start_stamp_end']) > 0) { + $search_url .= '&start_stamp_end='.$_GET['start_stamp_end']; + } + if (strlen($_GET['answer_stamp_begin']) > 0) { + $search_url .= '&answer_stamp_begin='.$_GET['answer_stamp_begin']; + } + if (strlen($_GET['answer_stamp_end']) > 0) { + $search_url .= '&answer_stamp_end='.$_GET['answer_stamp_end']; + } + if (strlen($_GET['end_stamp_begin']) > 0) { + $search_url .= '&end_stamp_begin='.$_GET['end_stamp_begin']; + } + if (strlen($_GET['end_stamp_end']) > 0) { + $search_url .= '&end_stamp_end='.$_GET['end_stamp_end']; + } + if (strlen($_GET['duration']) > 0) { + $search_url .= '&duration='.$_GET['duration']; + } + if (strlen($_GET['billsec']) > 0) { + $search_url .= '&billsec='.$_GET['billsec']; + } + if (strlen($_GET['hangup_cause']) > 0) { + $search_url .= '&hangup_cause='.$_GET['hangup_cause']; + } + if (strlen($_GET['uuid']) > 0) { + $search_url .= '&uuid='.$_GET['uuid']; + } + if (strlen($_GET['bleg_uuid']) > 0) { + $search_url .= '&bleg_uuid='.$_GET['bleg_uuid']; + } + if (strlen($_GET['accountcode']) > 0) { + $search_url .= '&accountcode='.$_GET['accountcode']; + } + if (strlen($_GET['read_codec']) > 0) { + $search_url .= '&read_codec='.$_GET['read_codec']; + } + if (strlen($_GET['write_codec']) > 0) { + $search_url .= '&write_codec='.$_GET['write_codec']; + } + if (strlen($_GET['remote_media_ip']) > 0) { + $search_url .= '&remote_media_ip='.$_GET['remote_media_ip']; + } + if (strlen($_GET['network_addr']) > 0) { + $search_url .= '&network_addr='.$_GET['network_addr']; + } + if (strlen($_GET['mos_comparison']) > 0) { + $search_url .= '&mos_comparison='.$_GET['mos_comparison']; + } + if (strlen($_GET['mos_score']) > 0) { + $search_url .= '&mos_score='.$_GET['mos_score']; + } +//page title and description echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo "\n"; echo "\n"; @@ -253,4 +335,4 @@ else { //show the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>
".$text['label-call-statistics']."\n"; echo " \n"; if (permission_exists('xml_cdr_search_advanced')) { - $advenced_search_url = 'xml_cdr_search.php?redirect=xml_cdr_statistics'; - if(permission_exists('xml_cdr_all') && (@$_GET['showall'] === 'true')){ - $advenced_search_url .= '&showall=true'; - } - echo " \n"; + echo " \n"; } if (permission_exists('xml_cdr_all')) { if ($_GET['showall'] != 'true') { - echo "\n"; + echo "\n"; } } echo " \n"; - echo " \n"; + echo " \n"; echo "