Webgui: filter and pagination working

This commit is contained in:
2026-07-15 19:42:55 +02:00
parent 2177834b39
commit a183a4725f
33 changed files with 2088 additions and 750 deletions
+3 -3
View File
@@ -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 {