mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
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:
@@ -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'";
|
||||
|
||||
Reference in New Issue
Block a user