diff --git a/app/content/rsslist.php b/app/content/rsslist.php index 75f2b2afa4..4dc61e3cdc 100644 --- a/app/content/rsslist.php +++ b/app/content/rsslist.php @@ -42,28 +42,6 @@ else { $text[$key] = $value[$_SESSION['domain']['language']['code']]; } -if (!function_exists('th_order_by')) { - //html table header order by - function th_order_by($field_name, $columntitle, $order_by, $order) { - - $html .= "    "; - if (strlen($order_by)==0) { - $html .= "$columntitle"; - } - else { - if ($order=="asc") { - $html .= "$columntitle"; - } - else { - $html .= "$columntitle"; - } - } - $html .= "    "; - - return $html; - } -} - require_once "resources/header.php"; echo "\n"; diff --git a/app/dialplan/dialplans.php b/app/dialplan/dialplans.php index 7ae44c03a5..f88bd054bc 100644 --- a/app/dialplan/dialplans.php +++ b/app/dialplan/dialplans.php @@ -46,25 +46,6 @@ else { $dialplan_context = check_str($_GET["dialplan_context"]); $app_uuid = check_str($_GET["app_uuid"]); -//custom table header order by to accomodate the app_uuid - function th_order_by($field_name, $columntitle, $order_by, $order, $app_uuid) { - if (strlen($app_uuid) > 0) { $app_uuid = "app_uuid=".$app_uuid; } - $html = "    "; - if (strlen($order_by)==0) { - $html .= "$columntitle"; - } - else { - if ($order=="asc") { - $html .= "$columntitle"; - } - else { - $html .= "$columntitle"; - } - } - $html .= "    "; - return $html; - } - //includes require_once "resources/header.php"; require_once "resources/paging.php"; @@ -274,11 +255,11 @@ else { unset ($prep_statement); } echo "\n"; - echo "   ".$row['dialplan_name']."\n"; - echo "   ".$row['dialplan_number']."\n"; - echo "   ".$row['dialplan_context']."\n"; - echo "   ".$row['dialplan_order']."\n"; - echo "   ".$row['dialplan_enabled']."\n"; + echo " ".$row['dialplan_name']."\n"; + echo " ".$row['dialplan_number']."\n"; + echo " ".$row['dialplan_context']."\n"; + echo " ".$row['dialplan_order']."\n"; + echo " ".$row['dialplan_enabled']."\n"; echo " ".$row['dialplan_description']." \n"; echo " \n"; if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") { diff --git a/app/xml_cdr/app_languages.php b/app/xml_cdr/app_languages.php index ea1ed20eac..3c823a1f84 100644 --- a/app/xml_cdr/app_languages.php +++ b/app/xml_cdr/app_languages.php @@ -1,4 +1,4 @@ -"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; echo th_order_by('start_stamp', $text['label-start'], $order_by, $order); //echo th_order_by('end_stamp', 'End', $order_by, $order); - echo th_order_by('duration', $text['label-length'], $order_by, $order); + echo th_order_by('duration', $text['label-duration'], $order_by, $order); if (if_group("admin") || if_group("superadmin")) { echo th_order_by('pdd_ms', 'PDD', $order_by, $order); } @@ -379,7 +348,7 @@ else { echo " \n"; echo " \n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; diff --git a/app/xml_cdr/xml_cdr_inc.php b/app/xml_cdr/xml_cdr_inc.php index e17f14dd48..062efdab76 100644 --- a/app/xml_cdr/xml_cdr_inc.php +++ b/app/xml_cdr/xml_cdr_inc.php @@ -75,22 +75,14 @@ else { if ($missed == true) { $sql_where .= "and billsec = '0' "; } - if (strlen($start_epoch) > 0 && strlen($stop_epoch) > 0) { + if (strlen($start_epoch) > 0 && strlen($stop_epoch) > 0) { $sql_where .= "and start_epoch BETWEEN ".$start_epoch." AND ".$stop_epoch." "; } if (strlen($cdr_id) > 0) { $sql_where .= "and cdr_id like '%$cdr_id%' "; } if (strlen($direction) > 0) { $sql_where .= "and direction = '$direction' "; } - if (strlen($caller_id_name) > 0) { $sql_where .= "and caller_id_name like '$caller_id_name' "; } - if (strlen($caller_id_number) > 0 && strlen($destination_number) > 0) { - $sql_where .= "and ("; - $sql_where .= "caller_id_number = '$caller_id_number' "; - $sql_where .= "or destination_number = '$destination_number'"; - $sql_where .= ") "; - } - else { - if (strlen($caller_id_number) > 0) { $sql_where .= "and caller_id_number like '$caller_id_number' "; } - if (strlen($destination_number) > 0) { $sql_where .= "and destination_number like '$destination_number' "; } - } + if (strlen($caller_id_name) > 0) { $sql_where .= "and caller_id_name like '%".$caller_id_name."%' "; } + if (strlen($caller_id_number) > 0) { $sql_where .= "and caller_id_number like '%".$caller_id_number."%' "; } + if (strlen($destination_number) > 0) { $sql_where .= "and destination_number like '%".$destination_number."%' "; } if (strlen($context) > 0) { $sql_where .= "and context like '%$context%' "; } if ($db_type == "sqlite") { if (strlen($start_stamp) > 0) { $sql_where .= "and start_stamp like '%$start_stamp%' "; } @@ -113,7 +105,7 @@ else { if (strlen($network_addr) > 0) { $sql_where .= "and network_addr like '%$network_addr%' "; } //example sql - // select caller_id_number, destination_number from v_xml_cdr where domain_uuid = '' + // select caller_id_number, destination_number from v_xml_cdr where domain_uuid = '' // and (caller_id_number = '1001' or destination_number = '1001' or destination_number = '*991001') if (!if_group("admin") && !if_group("superadmin") && !permission_exists('xml_cdr_domain')) { $sql_where = "where domain_uuid = '$domain_uuid' "; @@ -182,7 +174,7 @@ else { //page results if rows_per_page is greater than zero if ($rows_per_page > 0) { - //get the number of rows in the v_xml_cdr + //get the number of rows in the v_xml_cdr $sql = "select count(*) as num_rows from v_xml_cdr "; $sql .= $sql_where; $prep_statement = $db->prepare(check_sql($sql)); @@ -201,8 +193,8 @@ else { //prepare to page the results //$rows_per_page = 150; //set on the page that includes this page $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); + if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } + list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); $offset = $rows_per_page * $page; } diff --git a/resources/functions.php b/resources/functions.php index 9a028c405b..0a4f99d22c 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -62,6 +62,7 @@ if (!function_exists('check_sql')) { function check_sql($string) { + $string = str_replace("''", "null", $string); return trim($string); //remove white space } } @@ -358,21 +359,21 @@ if (!function_exists('th_order_by')) { //html table header order by - function th_order_by($field_name, $columntitle, $order_by, $order) { - - $html = ""; + $html .= ""; return $html; } } diff --git a/themes/enhanced/template.php b/themes/enhanced/template.php index 92acff0581..bff9d54ee2 100644 --- a/themes/enhanced/template.php +++ b/themes/enhanced/template.php @@ -86,7 +86,6 @@ b { } th { - /*border-top: 1px solid #444444;*/ border-bottom: 1px solid #a4aebf; text-align: left; color: #3164AD; @@ -377,6 +376,24 @@ table tr:nth-last-child(-5) td:first-of-type { border-bottom-top-radius:7px; } +fieldset { + padding: 8px; + text-align: left; + border: 1px solid #aeb7c6; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + margin: 0px; +} + +legend { + font-size: 13px; + font-family: arial; + font-weight: bold; + color: #3164ad; + padding-bottom: 8px; + padding-right: 2px; +} /* begin the menu css*/ @@ -984,7 +1001,7 @@ table tr:nth-last-child(-5) td:first-of-type { -
".$text['title']."\n"; + echo "".$text['title']."


\n"; echo "\n"; echo "\n"; echo "\n"; @@ -124,16 +127,24 @@ else { //search the call detail records if (if_group("admin") || if_group("superadmin") || permission_exists('xml_cdr_domain')) { + + echo "
"; + echo "Basic Search"; + echo "
\n"; - echo "
\n"; + if (if_group("admin") || if_group("superadmin") || permission_exists('xml_cdr_domain')) { + echo " \n"; + } echo " \n"; echo " \n"; echo "
\n"; + + echo "
\n"; echo "\n"; - echo ""; + echo ""; echo ""; - echo "\n"; - echo "\n"; - echo "\n"; + echo ""; + echo ""; echo ""; echo "
\n"; - echo "\n"; + echo "\n"; - echo "\n"; - echo ""; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; + echo ""; + echo ""; - echo "
\n"; + + echo "\n"; echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - - echo "
".$text['label-description'].":\n"; - echo " \n"; + echo " ".$text['label-direction']."\n"; + echo " \n"; + echo "
".$text['label-cid-name'].":
\n"; - - echo "
\n"; - - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
".$text['label-source'].":
".$text['label-destination'].":
\n"; - - echo "
\n"; - - echo "\n"; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - //echo " "; - - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - - echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; + echo "
Context:
Answer:
End:
".$text['label-start'].":
".$text['label-status'].":\n"; - echo " \n"; + echo " ".$text['label-status']."\n"; + echo " \n"; + echo " \n"; echo "
\n"; - //echo "
Duration:
Bill:
UUID:
Bridge UUID:
Account Code:
Read Codec:
Write Codec:
Remote Media IP:
Network Address:
\n"; - echo "
"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['label-source']."\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['label-destination']."\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + + echo "
\n"; + + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['label-cid-name']."\n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " ".$text['label-start']."\n"; + echo " \n"; + echo " \n"; + echo "
\n"; echo "
\n"; - //echo " \n"; - echo "\n"; - echo "  \n"; - echo " \n"; - echo "
"; + + echo "\n"; + echo "\n"; + + echo "
"; + echo ""; + + echo ""; + echo "

"; + } //show the results @@ -320,13 +289,13 @@ else { //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-name'], $order_by, $order); - echo th_order_by('caller_id_number', $text['label-number'], $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 "
".$text['label-tools'].""; - echo "   \n"; + echo " \n"; if (is_numeric($row['caller_id_number'])) { echo " ".format_phone($row['caller_id_number']).' '; } diff --git a/app/xml_cdr/xml_cdr_details.php b/app/xml_cdr/xml_cdr_details.php index 46552b06fa..5407d0eaa4 100644 --- a/app/xml_cdr/xml_cdr_details.php +++ b/app/xml_cdr/xml_cdr_details.php @@ -186,7 +186,7 @@ else { echo "".$text['label-destination']."".$text['label-start']."".$text['table-end']."".$text['label-length']."".$text['label-duration']."".$text['label-status']."
    "; + function th_order_by($field_name, $columntitle, $order_by, $order, $app_uuid = '') { + if (strlen($app_uuid) > 0) { $app_uuid = "&app_uuid=".$app_uuid; } // accomodate need to pass app_uuid where necessary (inbound/outbound routes lists) + $html = ""; if (strlen($order_by)==0) { - $html .= "$columntitle"; + $html .= "$columntitle"; } else { if ($order=="asc") { - $html .= "$columntitle"; + $html .= "$columntitle"; } else { - $html .= "$columntitle"; + $html .= "$columntitle"; } } - $html .= "