Webgui: filter and pagination working
This commit is contained in:
@@ -103,7 +103,7 @@ if ($action == ACT_DEFAULT):
|
||||
|
||||
page_caption_search($pagetitle);
|
||||
|
||||
$flt = db_get_filter($user->id, 201);
|
||||
$flt = db_get_filter($user->id, 201, ['cond','name','txt']);
|
||||
|
||||
/*
|
||||
The only way to find out whether the inventory is on the current boat is to use
|
||||
@@ -144,7 +144,7 @@ try {
|
||||
}
|
||||
$numrows = $sth->fetchColumn();
|
||||
$page = gpc_get_int($_REQUEST, 'p', 1);
|
||||
$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp);
|
||||
$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp);
|
||||
$lastpage = ceil($numrows/$rows_pp);
|
||||
|
||||
$sql = "SELECT i.invid, i.invname, i.number, i.invcond, i.eid, s.sname AS container "
|
||||
@@ -157,7 +157,7 @@ $sql .= ' WHERE ' . $where;
|
||||
$sql .= $order;
|
||||
|
||||
// if pagination:
|
||||
$sql .= ' LIMIT ' . ($page - 1) * $g_rows_pp . ',' . $g_rows_pp;
|
||||
$sql .= ' LIMIT ' . ($page - 1) * $rows_pp . ',' . $rows_pp;
|
||||
|
||||
$sth = $pdo->prepare($sql);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user