diff --git a/app/bridges/bridges.php b/app/bridges/bridges.php index b48c7ba937..cad7da81f9 100644 --- a/app/bridges/bridges.php +++ b/app/bridges/bridges.php @@ -86,7 +86,7 @@ } } -//get order and order by and sanatize the values +//get order and order by $order_by = $_GET["order_by"]; $order = $_GET["order"]; @@ -124,8 +124,7 @@ if ($_GET['show'] == "all" && permission_exists('bridge_all')) { $param .= "&show=all"; } - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } + $page = is_numeric($_GET['page']) ? $_GET['page'] : 0; list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page); list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true); $offset = $rows_per_page * $page; @@ -225,10 +224,10 @@ } echo "
| \n";
- echo " ".$text['header-extensions']." (".$total_extensions.") \n"; - echo " | \n";
- echo " \n";
- echo " |
| \n"; - echo " ".$text['description-extensions']."\n"; - echo " | \n"; - echo "|
| "; + echo $text['description-extensions']."\n"; + echo " | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| \n"; + echo " \n"; + echo " | \n"; } if ($_GET['show'] == "all" && permission_exists('extension_all')) { - echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param); + echo "".$text['label-domain']." | \n"; + //echo th_order_by('domain_name', $text['label-domain'], $order_by, $order); } echo th_order_by('extension', $text['label-extension'], $order_by, $order); + echo th_order_by('effective_caller_id_name', $text['label-effective_cid_name'], $order_by, $order, null, "class='hide-xs'"); + echo th_order_by('outbound_caller_id_name', $text['label-outbound_cid_name'], $order_by, $order, null, "class='hide-sm-dn'"); echo th_order_by('call_group', $text['label-call_group'], $order_by, $order); - //echo th_order_by('voicemail_mail_to', $text['label-voicemail_mail_to'], $order_by, $order); if (permission_exists("extension_user_context")) { echo th_order_by('user_context', $text['label-user_context'], $order_by, $order); } if (permission_exists('extension_registered')) { echo "".$text['label-is_registered']." | \n"; } - echo th_order_by('enabled', $text['label-enabled'], $order_by, $order); - echo th_order_by('description', $text['label-description'], $order_by, $order); - - echo "\n"; - if (permission_exists('extension_add')) { - if ($_SESSION['limit']['extensions']['numeric'] == '' || ($_SESSION['limit']['extensions']['numeric'] != '' && $total_extensions < $_SESSION['limit']['extensions']['numeric'])) { - echo "".$v_link_label_add.""; - } + echo th_order_by('enabled', $text['label-enabled'], $order_by, $order, null, "class='center'"); + echo th_order_by('description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn'"); + if (permission_exists('extension_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { + echo " | \n"; } - if (permission_exists('extension_delete') && is_array($extensions)) { - echo "".$v_link_label_delete.""; - } - echo "\n"; echo " | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| "; - echo " "; - echo " | "; - $ext_ids[] = 'checkbox_'.$row['extension_uuid']; + echo "|||||||||||||||||||
| \n"; + echo " \n"; + echo " \n"; + echo " | \n"; } if ($_GET['show'] == "all" && permission_exists('extension_all')) { - echo "".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])." | \n"; + echo "".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])." | \n"; } - echo ""; + echo " | "; if (permission_exists('extension_edit')) { - echo "".escape($row['extension']).""; + echo "".escape($row['extension']).""; } else { echo escape($row['extension']); } - echo " | \n"; - echo "".escape($row['call_group'])." | \n"; - //echo "".$row['voicemail_mail_to']." | \n"; + echo " \n"; + + echo " \n"; + echo " \n"; + echo "".escape($row['call_group'])." | \n"; if (permission_exists("extension_user_context")) { - echo "".escape($row['user_context'])." | \n"; + echo "".escape($row['user_context'])." | \n"; } if (permission_exists('extension_registered')) { - echo ""; + echo " | "; $extension_number = $row['extension'].'@'.$_SESSION['domain_name']; $extension_number_alias = $row['number_alias']; if(strlen($extension_number_alias) > 0) { @@ -229,88 +282,61 @@ $found_count = 0; if (is_array($registrations)) { foreach ($registrations as $array) { - if ( - ($extension_number == $array['user']) || - ($extension_number_alias != '' && - $extension_number_alias == $array['user'] - ) - ) { + if ($extension_number == $array['user'] || ($extension_number_alias != '' && $extension_number_alias == $array['user'])) { $found_count++; } } } if ($found_count > 0) { - echo "Yes ($found_count)"; - } else { - echo "No"; + echo $text['label-true']." (".$found_count.")"; + } + else { + echo $text['label-false']; } unset($extension_number, $extension_number_alias, $found_count, $array); echo " | \n"; } - - echo "".($row['enabled'] == 'true' ? $text['label-true'] : $text['label-false'])." | \n"; - echo "".escape($row['description'])." | \n"; - - echo ""; - if (permission_exists('extension_edit')) { - echo "$v_link_label_edit"; + if (permission_exists('extension_enabled')) { + echo " | "; + echo button::create(['type'=>'submit','class'=>'link','label'=>$text['label-'.$row['enabled']],'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle'); list_form_submit('form_list')"]); } - if (permission_exists('extension_delete')) { - echo "$v_link_label_delete"; + else { + echo " | "; + echo $text['label-'.$row['enabled']]; + } + echo " | \n"; + echo " \n"; + if (permission_exists('extension_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { + echo ""; + echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]); + echo " | \n"; } - echo "\n"; echo "||
| \n"; - if (permission_exists('extension_add')) { - if ($_SESSION['limit']['extensions']['numeric'] == '' || ($_SESSION['limit']['extensions']['numeric'] != '' && $total_extensions < $_SESSION['limit']['extensions']['numeric'])) { - echo "".$v_link_label_add.""; - } - } - if (permission_exists('extension_delete')) { - echo "".$v_link_label_delete.""; - } - echo " | \n"; - echo "|||||||||||||||||||