mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update ring_groups.php (#2823)
Add a search box to Ring Groups. Search by extension, name, strategy, enabled, or description.
This commit is contained in:
@@ -43,6 +43,18 @@
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//add the search term
|
||||
$search = strtolower(check_str($_GET["search"]));
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = "and (";
|
||||
$sql_search .= "lower(ring_group_name) like '%".$search."%' ";
|
||||
$sql_search .= "or lower(ring_group_extension) like '%".$search."%' ";
|
||||
$sql_search .= "or lower(ring_group_description) like '%".$search."%' ";
|
||||
$sql_search .= "or lower(ring_group_enabled) like '%".$search."%' ";
|
||||
$sql_search .= "or lower(ring_group_strategy) like '%".$search."%' ";
|
||||
$sql_search .= ")";
|
||||
}
|
||||
|
||||
//additional includes
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/paging.php";
|
||||
@@ -55,7 +67,13 @@
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-ring_groups']."</b></td>\n";
|
||||
echo " <td width='50%' align='right'> </td>\n";
|
||||
// echo " <td width='50%' align='right'> </td>\n";
|
||||
echo " <form method='get' action=''>\n";
|
||||
echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
|
||||
echo " <input type='text' class='txt' style='width: 150px' name='search' id='search' value='".$search."'>\n";
|
||||
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </form>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
@@ -98,6 +116,7 @@
|
||||
//get the list
|
||||
$sql = "select * from v_ring_groups ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
$sql .= $sql_search;
|
||||
if (strlen($order_by) == 0) {
|
||||
$sql .= "order by ring_group_name, ring_group_extension asc ";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user