Update destinations.php
This commit is contained in:
parent
77ef2b6142
commit
b1d43dd776
|
|
@ -98,7 +98,7 @@
|
|||
}
|
||||
|
||||
//add the search term
|
||||
$search = strtolower(check_str($_GET["search"]));
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(destination_type) like :search ";
|
||||
|
|
@ -115,10 +115,6 @@
|
|||
$sql_search .= ") ";
|
||||
}
|
||||
|
||||
//additional includes
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(destination_uuid) as num_rows from v_destinations ";
|
||||
$sql .= "where destination_type = :destination_type ";
|
||||
|
|
@ -130,16 +126,15 @@
|
|||
}
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
}
|
||||
$parameters['destination_type'] = $destination_type;
|
||||
if (strlen($search) > 0) {
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
$parameters['destination_type'] = $destination_type;
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
unset($parameters);
|
||||
|
||||
//prepare to page the results
|
||||
require_once "resources/paging.php";
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".escape($search);
|
||||
if ($_GET['show'] == "all" && permission_exists('destination_all')) {
|
||||
|
|
@ -161,6 +156,7 @@
|
|||
}
|
||||
if (isset($sql_search)) {
|
||||
$sql .= "and ".$sql_search;
|
||||
$parameters['search'] = '%'.$search.'%';
|
||||
}
|
||||
$sql .= "and destination_type = :destination_type ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
|
|
@ -202,6 +198,9 @@
|
|||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//include the header
|
||||
require_once "resources/header.php";
|
||||
|
||||
//define the checkbox_toggle function
|
||||
echo "<script type=\"text/javascript\">\n";
|
||||
echo " function checkbox_toggle(item) {\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue