Dedup More Pagination code you now only have to define Sortby column and its order, also fixed issue when searching by date it would close on the first query

This commit is contained in:
johnnyq
2023-02-24 20:22:57 -05:00
parent 704c8e409f
commit 6f0017d90b
42 changed files with 288 additions and 977 deletions

View File

@@ -1,4 +1,9 @@
<?php
// Default Column Sortby Filter
$sb = "asset_name";
$o = "ASC";
require_once("inc_all_client.php");
//Get Asset Counts
@@ -30,12 +35,6 @@ $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT(*) AS count FROM a
AND asset_archived_at IS NULL AND asset_client_id = $client_id"));
$other_count = intval($row['count']);
if (!empty($_GET['sb'])) {
$sb = sanitizeInput($_GET['sb']);
} else {
$sb = "asset_name";
}
//Asset Type from GET
if (isset($_GET['type']) && ($_GET['type']) == 'workstation') {
$type_query = "asset_type = 'desktop' OR asset_type = 'laptop'";