Users: Paging fix.

This commit is contained in:
Nate 2019-11-26 14:11:20 -07:00
parent 3b202a0bab
commit 3b7c97a459
1 changed files with 7 additions and 9 deletions

View File

@ -88,16 +88,14 @@
//prepare for paging //prepare for paging
$rows_per_page = is_numeric($_SESSION['domain']['paging']['numeric']) ? $_SESSION['domain']['paging']['numeric'] : 50; $rows_per_page = is_numeric($_SESSION['domain']['paging']['numeric']) ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = "search=".escape($search); $param = "&search=".$search;
if (isset($_GET['show']) && permission_exists('user_all') && $_GET['show'] == 'all') { if ($_GET['show'] == "all" && permission_exists('user_all')) {
$param .= "&show=all"; $param .= "&show=all";
} }
if (isset($_GET['page'])) { $page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
$page = $_GET['page']; list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); $offset = $rows_per_page * $page;
$offset = $rows_per_page * $page;
}
//get the users from the database //get the users from the database
$sql = "select u.domain_uuid, u.user_uuid, u.contact_uuid, u.domain_name, u.username, u.user_enabled, "; $sql = "select u.domain_uuid, u.user_uuid, u.contact_uuid, u.domain_name, u.username, u.user_enabled, ";
@ -238,4 +236,4 @@
//include the footer //include the footer
include "resources/footer.php"; include "resources/footer.php";
?> ?>