diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index b7e49f705b..8d1063f53b 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -341,29 +341,24 @@ else { echo "\n"; echo " \n"; - //echo th_order_by('direction', 'Direction', $order_by, $order); - //echo th_order_by('default_language', 'Language', $order_by, $order); - //echo th_order_by('context', 'Context', $order_by, $order); - //echo th_order_by('leg', 'Leg', $order_by, $order); 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('start_stamp', $text['label-start'], $order_by, $order); - echo th_order_by('tta', 'TTA', $order_by, $order); - //echo th_order_by('end_stamp', 'End', $order_by, $order); - echo th_order_by('duration', $text['label-duration'], $order_by, $order); + echo "".$text['label-tools']."\n"; + echo th_order_by('start_stamp', $text['label-start'], $order_by, $order, null, "style='text-align: right;'"); + echo th_order_by('tta', '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;'"); if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){ // billing collumns echo "".$text['label-price']."\n"; } if (permission_exists('xml_cdr_pdd')) { - echo th_order_by('pdd_ms', 'PDD', $order_by, $order); + echo th_order_by('pdd_ms', 'PDD', $order_by, $order, null, "style='text-align: right;'"); } if (permission_exists('xml_cdr_mos')) { - echo th_order_by('rtp_audio_in_mos', 'MOS', $order_by, $order); + echo th_order_by('rtp_audio_in_mos', 'MOS', $order_by, $order, null, "style='text-align: center;'"); } echo th_order_by('hangup_cause', $text['label-status'], $order_by, $order); - echo "".$text['label-tools']."\n"; if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { echo " \n"; } @@ -390,6 +385,9 @@ else { $hangup_cause = strtolower($hangup_cause); $hangup_cause = ucwords($hangup_cause); + //If they cancelled, show the ring time, not the bill time. + $seconds = ($row['hangup_cause']=="ORIGINATOR_CANCEL") ? $row['duration'] : $row['billsec']; + $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; $tmp_name = ''; if(!empty($row['recording_file']) && file_exists($row['recording_file'])){ @@ -457,9 +455,6 @@ else { else { echo "  "; } - //echo " ".$row['default_language']."\n"; - //echo " ".$row['context']."\n"; - //echo " ".$row['leg']."\n"; echo " "; echo $row['caller_id_name'].' '; @@ -486,15 +481,32 @@ else { } echo " \n"; echo " \n"; - echo " ".$tmp_start_epoch."\n"; - //echo " ".$row['end_stamp']."\n"; - echo " ".(($row['tta'] > 0) ? $row['tta']."s" : " ")."\n"; + if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name) && $seconds > 0) { + echo " "; + $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 ""; + echo "".$v_link_label_play.""; + echo "".$v_link_label_download.""; + } + else { + echo " "; + echo " "; + } + echo " \n"; - //If they cancelled, show the ring time, not the bill time. - $seconds = ($row['hangup_cause']=="ORIGINATOR_CANCEL") ? $row['duration'] : $row['billsec']; + echo " ".$tmp_start_epoch."\n"; - echo " ".gmdate("G:i:s", $seconds)."\n"; + echo " ".(($row['tta'] > 0) ? $row['tta']."s" : " ")."\n"; + + echo " ".gmdate("G:i:s", $seconds)."\n"; if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billing/app_config.php")){ @@ -522,10 +534,10 @@ else { echo " ".number_format($price,6)." $billing_currency\n"; } if (permission_exists("xml_cdr_pdd")) { - echo " ".number_format($row['pdd_ms']/1000,2)."s\n"; + echo " ".number_format($row['pdd_ms']/1000,2)."s\n"; } if (permission_exists("xml_cdr_mos")) { - echo " 0) ? "title='".($row['rtp_audio_in_mos'] / 5 * 100)."%'" : null).">".((strlen($row['rtp_audio_in_mos']) > 0) ? $row['rtp_audio_in_mos'] : " ")."\n"; + echo " 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'] : " ")."\n"; } echo " "; if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { @@ -535,25 +547,6 @@ else { echo $hangup_cause; } echo " \n"; - if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) { - echo " "; - $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/wave"; break; - case "mp3" : $recording_type = "audio/mpeg"; break; - case "ogg" : $recording_type = "audio/ogg"; break; - } - echo ""; - echo "".$v_link_label_play.""; - echo "".$v_link_label_download.""; - } - else { - echo " "; - echo " "; - } - echo " \n"; if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { echo " "; echo " $v_link_label_view"; diff --git a/themes/enhanced/template.php b/themes/enhanced/template.php index 152cf49c32..bafffbd828 100644 --- a/themes/enhanced/template.php +++ b/themes/enhanced/template.php @@ -436,8 +436,8 @@ table.tr_hover tr:hover td a { border-bottom: 1px solid #c5d1e5; background-color: #fff; color: #000; - text-align: left; - padding: 0 0 0 2px; + text-align: center; + padding: 0 1px 0 1px; width: 42px; white-space: nowrap; } diff --git a/themes/minimized/template.php b/themes/minimized/template.php index c06356657d..6eca82d4b5 100644 --- a/themes/minimized/template.php +++ b/themes/minimized/template.php @@ -436,8 +436,8 @@ table.tr_hover tr:hover td a { border-bottom: 1px solid #c5d1e5; background-color: #fff; color: #000; - text-align: left; - padding: 0 0 0 2px; + text-align: center; + padding: 0 1px 0 1px; width: 42px; white-space: nowrap; }