Update conference_controls.php

This commit is contained in:
FusionPBX
2016-10-29 00:11:56 -06:00
committed by GitHub
parent 166e81e9f5
commit afc4289e81

View File

@@ -23,21 +23,21 @@
$order = check_str($_GET["order"]);
//add the search term
$search = check_str($_GET["search"]);
$search = strtolower(check_str($_GET["search"]));
if (strlen($search) > 0) {
$sql_search = "where (";
$sql_search .= "control_name like '%".$search."%'";
$sql_search .= "or control_enabled like '%".$search."%'";
$sql_search .= "or control_description like '%".$search."%'";
$sql_search .= ")";
$sql_search .= "lower(control_name) like '%".$search."%' ";
$sql_search .= "or lower(control_description) like '%".$search."%' ";
$sql_search .= ") ";
}
//additional includes
require_once "resources/header.php";
require_once "resources/paging.php";
//prepare to page the results
$sql = "select count(*) as num_rows from v_conference_controls ";
//$sql .= "where domain_uuid = '$domain_uuid' ";
$sql = "select count(conference_control_uuid) as num_rows ";
$sql .= "from v_conference_controls";
$sql .= $sql_search;
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
$prep_statement = $db->prepare($sql);
@@ -45,10 +45,10 @@
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
if ($row['num_rows'] > 0) {
$num_rows = $row['num_rows'];
$num_rows = $row['num_rows'];
}
else {
$num_rows = '0';
$num_rows = '0';
}
}
@@ -62,7 +62,7 @@
//get the list
$sql = "select * from v_conference_controls ";
//$sql .= "where domain_uuid = '$domain_uuid' ";
//$sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' ";
$sql .= $sql_search;
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
$sql .= "limit $rows_per_page offset $offset ";
@@ -117,7 +117,7 @@
echo "<tr ".$tr_link.">\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['control_name']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['control_enabled']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['control_description']."&nbsp;</td>\n";
echo " <td valign='top' class='row_stylebg'>".$row['control_description']."&nbsp;</td>\n";
echo " <td class='list_control_icons'>";
if (permission_exists('conference_control_edit')) {
echo "<a href='conference_control_edit.php?id=".$row['conference_control_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
@@ -156,4 +156,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>