CDR: Some fixes and enhancements...

- Ability to delete single and multiple CDR records, if desired (permission required, includes recording, if any).

- Search criteria kept through paging, deleting, sorting, and upon using the provided 'Back' button on the CDR Details page.

- Added some missing language translations.
This commit is contained in:
Nate Jones
2015-02-19 23:28:40 +00:00
parent 1a47c2eb44
commit 1f65abe238
5 changed files with 201 additions and 59 deletions

View File

@@ -184,7 +184,7 @@
$text['label-average']['es-cl'] = "Promedio";
$text['label-average']['pt-pt'] = "Média";
$text['label-average']['fr-fr'] = "Moyenne";
$text['label-preset']['en-us'] = 'Quick Select';
$text['label-preset']['es-cl'] = 'Quick Select';
$text['label-preset']['pt-pt'] = 'Quick Select';
@@ -275,15 +275,15 @@
$text['table-direction']['pt-pt'] = "Direcção";
$text['table-direction']['fr-fr'] = "Direction";
$text['table-name']['en-us'] = "Name (play)";
$text['table-name']['es-cl'] = "Nombre (Reproducir)";
$text['table-name']['pt-pt'] = "Nome (tocar)";
$text['table-name']['fr-fr'] = "Nom (jouer)";
$text['table-name']['en-us'] = "Name";
$text['table-name']['es-cl'] = "Nombre";
$text['table-name']['pt-pt'] = "Nome";
$text['table-name']['fr-fr'] = "Nom";
$text['table-download']['en-us'] = "Number (download)";
$text['table-download']['es-cl'] = "Número (descargar)";
$text['table-download']['pt-pt'] = "Número (descarregar)";
$text['table-download']['fr-fr'] = "Numéro (télécharger)";
$text['table-download']['en-us'] = "Number";
$text['table-download']['es-cl'] = "Número";
$text['table-download']['pt-pt'] = "Número";
$text['table-download']['fr-fr'] = "Numéro";
$text['table-end']['en-us'] = "End";
$text['table-end']['es-cl'] = "Fin";
@@ -562,30 +562,50 @@
$text['option-false']['es-cl'] = "Falso";
$text['option-false']['pt-pt'] = "Não";
$text['option-false']['fr-fr'] = "Non";
$text['option-default']['en-us'] = "Default";
$text['option-default']['es-cl'] = "Default";
$text['option-default']['pt-pt'] = "Default";
$text['option-default']['fr-fr'] = "Default";
$text['option-last_hour']['en-us'] = "Last Hour";
$text['option-last_hour']['es-cl'] = "Last Hour";
$text['option-last_hour']['pt-pt'] = "Last Hour";
$text['option-last_hour']['fr-fr'] = "Last Hour";
$text['option-today']['en-us'] = "Today";
$text['option-today']['es-cl'] = "Today";
$text['option-today']['pt-pt'] = "Today";
$text['option-today']['fr-fr'] = "Today";
$text['option-yesterday']['en-us'] = "Yesterday";
$text['option-yesterday']['es-cl'] = "Yesterday";
$text['option-yesterday']['pt-pt'] = "Yesterday";
$text['option-yesterday']['fr-fr'] = "Yesterday";
$text['option-this_month']['en-us'] = "This Month";
$text['option-this_month']['es-cl'] = "This Month";
$text['option-this_month']['pt-pt'] = "This Month";
$text['option-this_month']['fr-fr'] = "This Month";
$text['option-this_year']['en-us'] = "This Year";
$text['option-this_year']['es-cl'] = "This Year";
$text['option-this_year']['pt-pt'] = "This Year";
$text['option-this_year']['fr-fr'] = "This Year";
$text['confirm-delete']['en-us'] = "Do you really want to delete this?";
$text['confirm-delete']['es-cl'] = "¿Realmente desea eliminar el número?";
$text['confirm-delete']['pt-pt'] = "Deseja realmente remover isto?";
$text['confirm-delete']['fr-fr'] = "Voulez-vous vraiment supprimer cela?";
$text['button-delete']['en-us'] = "Delete";
$text['button-delete']['es-cl'] = "Eliminar";
$text['button-delete']['pt-pt'] = "Remover";
$text['button-delete']['fr-fr'] = "Supprimer";
$text['message-delete']['en-us'] = "Delete Completed";
$text['message-delete']['es-cl'] = "Eliminación Completada";
$text['message-delete']['pt-pt'] = "Remoção Efectuada";
$text['message-delete']['fr-fr'] = "Supprimé";
?>

View File

@@ -90,7 +90,9 @@ else {
echo "<tr>\n";
echo "<td align='left' width='50%' nowrap='nowrap' style='vertical-align: top;'><b>".$text['title']."</b><br><br><br></td>\n";
echo "<td align='right' width='100%' style='vertical-align: top;'>\n";
echo " <form id='frm_export' method='post' action='xml_cdr_export.php'>";
echo " <form id='frm_export' method='post' action='xml_cdr_export.php'>\n";
echo " <input type='hidden' name='cdr_id' value='$cdr_id'>\n";
echo " <input type='hidden' name='missed' value='$missed'>\n";
echo " <input type='hidden' name='direction' value='$direction'>\n";
echo " <input type='hidden' name='caller_id_name' value='$caller_id_name'>\n";
echo " <input type='hidden' name='start_stamp_begin' value='$start_stamp_begin'>\n";
@@ -98,13 +100,14 @@ else {
echo " <input type='hidden' name='hangup_cause' value='$hangup_cause'>\n";
echo " <input type='hidden' name='caller_extension_uuid' value='$caller_extension_uuid'>\n";
echo " <input type='hidden' name='caller_id_number' value='$caller_id_number'>\n";
echo " <input type='hidden' name='destination_extension_uuid' value='$destination_extension_uuid'>\n";
echo " <input type='hidden' name='destination_number' value='$destination_number'>\n";
echo " <input type='hidden' name='context' value='$context'>\n";
echo " <input type='hidden' name='answer_stamp_begin' value='$answer_stamp_begin'>\n";
echo " <input type='hidden' name='answer_stamp_end' value='$answer_stamp_end'>\n";
echo " <input type='hidden' name='end_stamp_begin' value='$end_stamp_begin'>\n";
echo " <input type='hidden' name='end_stamp_end' value='$end_stamp_end'>\n";
echo " <input type='hidden' name='start_epoch' value='$start_epoch'>\n";
echo " <input type='hidden' name='stop_epoch' value='$stop_epoch'>\n";
echo " <input type='hidden' name='duration' value='$duration'>\n";
echo " <input type='hidden' name='billsec' value='$billsec'>\n";
echo " <input type='hidden' name='uuid' value='$uuid'>\n";
@@ -114,6 +117,11 @@ else {
echo " <input type='hidden' name='write_codec' value='$write_codec'>\n";
echo " <input type='hidden' name='remote_media_ip' value='$remote_media_ip'>\n";
echo " <input type='hidden' name='network_addr' value='$network_addr'>\n";
echo " <input type='hidden' name='bridge_uuid' value='$bridge_uuid'>\n";
if (isset($order_by)) {
echo " <input type='hidden' name='order_by' value='$order_by'>\n";
echo " <input type='hidden' name='order' value='$order'>\n";
}
echo " <table cellpadding='0' cellspacing='0' border='0'>\n";
echo " <tr>\n";
echo " <td style='vertical-align: top;'>\n";
@@ -156,7 +164,7 @@ else {
//basic search of call detail records
if (permission_exists('xml_cdr_search')) {
echo "<form method='post' action=''>\n";
echo "<form method='get' action=''>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
@@ -331,30 +339,42 @@ else {
echo "<br /><br />";
}
//mod paging parameters for inclusion in column sort heading links
$param = substr($param, 1); //remove leading '&'
$param = substr($param, 0, strrpos($param, '&order_by=')); //remove trailing order by
//show the results
echo "<form name='frm' method='post' action='xml_cdr_delete.php'>\n";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
if (permission_exists('xml_cdr_delete')) {
echo "<th style='width: 30px; text-align: center; padding: 0px;'><input type='checkbox' onchange=\"(this.checked) ? check('all') : check('none');\"></th>";
}
echo "<th>&nbsp;</th>\n";
echo th_order_by('caller_id_name', $text['label-cid-name'], $order_by, $order);
echo th_order_by('caller_id_number', $text['label-source'], $order_by, $order);
echo th_order_by('destination_number', $text['label-destination'], $order_by, $order);
echo th_order_by('caller_id_name', $text['label-cid-name'], $order_by, $order, null, null, $param);
echo th_order_by('caller_id_number', $text['label-source'], $order_by, $order, null, null, $param);
echo th_order_by('destination_number', $text['label-destination'], $order_by, $order, null, null, $param);
echo "<th>".$text['label-tools']."</th>\n";
echo th_order_by('start_stamp', $text['label-start'], $order_by, $order, null, "style='text-align: right;'");
echo th_order_by('tta', $text['label-tta'], $order_by, $order, null, "style='text-align: right;'");
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "style='text-align: center;'");
echo th_order_by('start_stamp', $text['label-start'], $order_by, $order, null, "style='text-align: center;'", $param);
echo th_order_by('tta', $text['label-tta'], $order_by, $order, null, "style='text-align: right;'", $param);
echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "style='text-align: center;'", $param);
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
// billing collumns
echo "<th>".$text['label-price']."</th>\n";
}
if (permission_exists('xml_cdr_pdd')) {
echo th_order_by('pdd_ms', 'PDD', $order_by, $order, null, "style='text-align: right;'");
echo th_order_by('pdd_ms', 'PDD', $order_by, $order, null, "style='text-align: right;'", $param);
}
if (permission_exists('xml_cdr_mos')) {
echo th_order_by('rtp_audio_in_mos', 'MOS', $order_by, $order, null, "style='text-align: center;'");
echo th_order_by('rtp_audio_in_mos', 'MOS', $order_by, $order, null, "style='text-align: center;'", $param);
}
echo th_order_by('hangup_cause', $text['label-status'], $order_by, $order);
echo th_order_by('hangup_cause', $text['label-status'], $order_by, $order, $param);
if (if_group("admin") || if_group("superadmin") || if_group("cdr")) {
echo "<td class='list_control_icon'>&nbsp;</td>\n";
echo "<td class='list_control_icon'>";
if (permission_exists('xml_cdr_delete')) {
echo "<a href='javascript:void(0);' onclick=\"if (confirm('".$text['confirm-delete']."')) { document.forms.frm.submit(); }\" alt='".$text['button-delete']."'>".$v_link_label_delete."</a>";
}
echo "</td>\n";
}
echo "</tr>\n";
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){
@@ -386,9 +406,10 @@ else {
$hangup_cause = strtolower($hangup_cause);
$hangup_cause = ucwords($hangup_cause);
//If they cancelled, show the ring time, not the bill time.
//if call cancelled, show the ring time, not the bill time.
$seconds = ($row['hangup_cause']=="ORIGINATOR_CANCEL") ? $row['duration'] : round(($row['billmsec'] / 1000), 0, PHP_ROUND_HALF_UP);
//handle recordings
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$path_mod.'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
$tmp_name = '';
if(!empty($row['recording_file']) && file_exists($row['recording_file'])){
@@ -418,8 +439,29 @@ else {
elseif (file_exists($tmp_dir.'/'.$row['bridge_uuid'].'_1.mp3')) {
$tmp_name = $row['bridge_uuid']."_1.mp3";
}
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name) && $seconds > 0) {
$recording_file_path = '/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name;
$recording_file_name = strtolower(pathinfo($tmp_name, PATHINFO_BASENAME));
$recording_file_ext = pathinfo($recording_file_name, PATHINFO_EXTENSION);
switch ($recording_file_ext) {
case "wav" : $recording_type = "audio/wav"; break;
case "mp3" : $recording_type = "audio/mpeg"; break;
case "ogg" : $recording_type = "audio/ogg"; break;
}
}
else {
unset($recording_file_path);
}
$tr_link = (if_group("admin") || if_group("superadmin") || if_group("cdr")) ? "href='xml_cdr_details.php?uuid=".$row['uuid']."'" : null;
echo "<tr ".$tr_link.">\n";
if (permission_exists('xml_cdr_delete')) {
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center; vertical-align: middle; padding: 0px;'>";
echo " <input type='checkbox' name='id[]' id='checkbox_".$row['uuid']."' value='".$row['uuid']."'>";
echo " <input type='hidden' name='rec[]' value='".base64_encode($recording_file_path)."'>";
$xml_ids[] = 'checkbox_'.$row['uuid'];
echo " </td>";
}
if (
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_missed.png") &&
file_exists($_SERVER["DOCUMENT_ROOT"]."/themes/".$_SESSION['domain']['template']['name']."/images/icon_cdr_inbound_connected.png") &&
@@ -483,19 +525,11 @@ else {
echo " </a>\n";
echo " </td>\n";
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name) && $seconds > 0) {
if ($recording_file_path != '') {
echo " <td valign='top' class='".$row_style["2"]." tr_link_void'>";
$recording_file_path = '/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name;
$recording_file_name = strtolower(pathinfo($tmp_name, PATHINFO_BASENAME));
$recording_file_ext = pathinfo($recording_file_name, PATHINFO_EXTENSION);
switch ($recording_file_ext) {
case "wav" : $recording_type = "audio/wav"; break;
case "mp3" : $recording_type = "audio/mpeg"; break;
case "ogg" : $recording_type = "audio/ogg"; break;
}
echo "<audio id='recording_audio_".$row['uuid']."' style='display: none;' preload='none' onended=\"recording_reset('".$row['uuid']."');\" src=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=rec&filename=".base64_encode($recording_file_path)."\" type='".$recording_type."'></audio>";
echo "<span id='recording_button_".$row['uuid']."' onclick=\"recording_play('".$row['uuid']."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
echo "<a href=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=rec&t=bin&filename=".base64_encode($recording_file_path)."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
echo "<audio id='recording_audio_".$row['uuid']."' style='display: none;' preload='none' onended=\"recording_reset('".$row['uuid']."');\" src=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=rec&filename=".base64_encode($recording_file_path)."\" type='".$recording_type."'></audio>";
echo "<span id='recording_button_".$row['uuid']."' onclick=\"recording_play('".$row['uuid']."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
echo "<a href=\"".PROJECT_PATH."/app/recordings/recordings.php?a=download&type=rec&t=bin&filename=".base64_encode($recording_file_path)."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
}
else {
echo " <td valign='top' class='".$row_style[$c]."'>";
@@ -503,7 +537,7 @@ else {
}
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: right;'>".$tmp_start_epoch."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: center;' nowrap='nowrap'>".$tmp_start_epoch."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."' style='text-align: right;'>".(($row['tta'] > 0) ? $row['tta']."s" : "&nbsp;")."</td>\n";
@@ -571,7 +605,7 @@ else {
if (permission_exists("xml_cdr_mos")) {
echo " <td valign='top' class='".$row_style[$c]."' ".((strlen($row['rtp_audio_in_mos']) > 0) ? "title='".($row['rtp_audio_in_mos'] / 5 * 100)."%'" : null)." style='text-align: center;'>".((strlen($row['rtp_audio_in_mos']) > 0) ? $row['rtp_audio_in_mos'] : "&nbsp;")."</td>\n";
}
echo " <td valign='top' class='".$row_style[$c]."'>";
echo " <td valign='top' class='".$row_style[$c]."' nowrap='nowrap'>";
if (if_group("admin") || if_group("superadmin") || if_group("cdr")) {
echo "<a href='xml_cdr_details.php?uuid=".$row['uuid']."'>".$hangup_cause."</a>";
}
@@ -580,8 +614,11 @@ else {
}
echo " </td>\n";
if (if_group("admin") || if_group("superadmin") || if_group("cdr")) {
echo " <td class='list_control_icon'>";
echo " <td class='list_control_icons tr_link_void'>";
echo " <a href='xml_cdr_details.php?uuid=".$row['uuid']."' title='".$text['button-view']."'>$v_link_label_view</a>";
if (permission_exists('xml_cdr_delete')) {
echo "<a href='xml_cdr_delete.php?id[]=".$row['uuid']."&rec[]=".(($recording_file_path != '') ? base64_encode($recording_file_path) : null)."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a>";
}
echo " </td>\n";
}
echo "</tr>\n";
@@ -592,10 +629,25 @@ else {
echo "<tr>\n";
echo "</table>";
echo "</form>";
echo "<br><br>";
echo $paging_controls;
echo "<br><br>";
// check or uncheck all checkboxes
if (sizeof($xml_ids) > 0) {
echo "<script>\n";
echo " function check(what) {\n";
foreach ($xml_ids as $xml_id) {
echo "document.getElementById('".$xml_id."').checked = (what == 'all') ? true : false;\n";
}
echo " }\n";
echo "</script>\n";
}
//store last search/sort query parameters in session
$_SESSION['xml_cdr']['last_query'] = $_SERVER["QUERY_STRING"];
//show the footer
require_once "resources/footer.php";

View File

@@ -0,0 +1,69 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Copyright (C) 2008-2012
All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('xml_cdr_delete')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//get posted values, if any
if (sizeof($_REQUEST) > 0) {
$xml_cdr_uuids = $_REQUEST["id"];
$recording_file_path = $_REQUEST["rec"];
if (sizeof($xml_cdr_uuids) > 0) {
foreach ($xml_cdr_uuids as $index => $xml_cdr_uuid) {
// delete record
$sql = "delete from v_xml_cdr ";
$sql .= "where uuid = '".$xml_cdr_uuid."' ";
$sql .= "and domain_uuid = '".$domain_uuid."' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
unset($sql, $prep_statement);
//delete recording, if any
echo $_SESSION['switch']['recordings']['dir'].base64_decode($recording_file_path[$index])."...";
if (file_exists($_SESSION['switch']['recordings']['dir'].base64_decode($recording_file_path[$index]))) {
@unlink($_SESSION['switch']['recordings']['dir'].base64_decode($recording_file_path[$index]));
}
}
}
}
// set message
$_SESSION["message"] = $text['message-delete'].": ".sizeof($xml_cdr_uuids);
header("Location: xml_cdr.php".(($_SESSION['xml_cdr']['last_query'] != '') ? "?".$_SESSION['xml_cdr']['last_query'] : null));
?>

View File

@@ -100,7 +100,7 @@ else {
echo "<tr>\n";
echo "<td width='30%' align='left' valign='top' nowrap='nowrap'><b>".$text['title2']."</b></td>\n";
echo "<td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='xml_cdr.php'\" value='".$text['button-back']."'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='xml_cdr.php".(($_SESSION['xml_cdr']['last_query'] != '') ? "?".$_SESSION['xml_cdr']['last_query'] : null)."'\" value='".$text['button-back']."'>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
@@ -235,8 +235,8 @@ else {
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>Name</th>\n";
echo "<th>Value</th>\n";
echo "<th>".$text['label-name']."</th>\n";
echo "<th>".$text['label-value']."</th>\n";
echo "</tr>\n";
foreach($array["channel_data"] as $key => $value) {
$value = urldecode($value);
@@ -255,7 +255,7 @@ else {
$row_style["1"] = "row_style1";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo " <td align='left'><b>Variables</b>&nbsp;</td>\n";
echo " <td align='left'><b>".$text['label-variables']."</b>&nbsp;</td>\n";
echo "<td></td>\n";
echo "</tr>\n";
echo "</table>\n";
@@ -353,7 +353,7 @@ else {
echo " <table width='95%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$text['label-call-flow']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " <td>&nbsp;</td>\n";
echo " </tr>\n";
echo " </table>\n";
@@ -379,7 +379,7 @@ else {
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$text['label-call-flow-2']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " <td>&nbsp;</td>\n";
echo " </tr>\n";
echo "</table>\n";
@@ -405,7 +405,7 @@ else {
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$text['label-call-flow-3']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " <td>&nbsp;</td>\n";
echo " </tr>\n";
echo "</table>\n";
@@ -432,7 +432,7 @@ else {
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td><b>".$text['label-call-flow-4']."</b>&nbsp;</td>\n";
echo " <td></td>\n";
echo " <td>&nbsp;</td>\n";
echo " </tr>\n";
echo "</table>\n";
@@ -450,8 +450,8 @@ else {
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".wordwrap($value,75,"<br />\n", TRUE)."&nbsp;</td>\n";
}
else {
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".$key."</td>\n";
echo " <td>\n";
echo " <td valign='top' align='left' class='".$row_style[$c]."'>".$key."&nbsp;</td>\n";
echo " <td class='".$row_style[$c]."'>\n";
echo " <table width='100%'>\n";
foreach($child["originatee_caller_profile"] as $key => $value) {
//print_r($tmp_child);

View File

@@ -45,8 +45,6 @@ else {
//get post or get variables from http
if (count($_REQUEST) > 0) {
$order_by = check_str($_REQUEST["order_by"]);
$order = check_str($_REQUEST["order"]);
$cdr_id = check_str($_REQUEST["cdr_id"]);
$missed = check_str($_REQUEST["missed"]);
$direction = check_str($_REQUEST["direction"]);
@@ -73,6 +71,9 @@ else {
$write_codec = check_str($_REQUEST["write_codec"]);
$remote_media_ip = check_str($_REQUEST["remote_media_ip"]);
$network_addr = check_str($_REQUEST["network_addr"]);
$bridge_uuid = check_str($_REQUEST["network_addr"]);
$order_by = check_str($_REQUEST["order_by"]);
$order = check_str($_REQUEST["order"]);
}
//build the sql where string
@@ -172,11 +173,12 @@ else {
}
//set the param variable which is used with paging
$param = "&missed=".$missed;
$param = "&cdr_id=".$cdr_id;
$param .= "&missed=".$missed;
$param .= "&direction=".$direction;
$param .= "&caller_id_name=".$caller_id_name;
$param .= "&start_stamp=".$start_stamp;
$param .= "&hangup_cause=".$hangup_cause;
$param .= "&caller_id_number=".$caller_id_number;
$param .= "&caller_extension_uuid=".$caller_extension_uuid;
$param .= "&destination_number=".$destination_number;
$param .= "&context=".$context;
$param .= "&start_stamp_begin=".$start_stamp_begin;
@@ -189,18 +191,17 @@ else {
$param .= "&stop_epoch=".$stop_epoch;
$param .= "&duration=".$duration;
$param .= "&billsec=".$billsec;
$param .= "&hangup_cause=".$hangup_cause;
$param .= "&uuid=".$uuid;
$param .= "&bridge_uuid=".$bridge_uuid;
$param .= "&bleg_uuid=".$bleg_uuid;
$param .= "&accountcode=".$accountcode;
$param .= "&read_codec=".$read_codec;
$param .= "&write_codec=".$write_codec;
$param .= "&remote_media_ip=".$remote_media_ip;
$param .= "&network_addr=".$network_addr;
$param .= "&bridge_uuid=".$bridge_uuid;
if (isset($order_by)) {
$param .= "&order_by=".$order_by;
}
if (isset($order)) {
$param .= "&order=".$order;
$param .= "&order_by=".$order_by."&order=".$order;
}
//create the sql query to get the xml cdr records