Code deduplication/tidying

- Move default pagination/sort/search query variable mapping to pagination_head.php
- Remove user_logs.php
This commit is contained in:
Marcus Hill
2022-04-14 19:49:18 +01:00
parent ca629801af
commit b4f2fdd03d
50 changed files with 92 additions and 1359 deletions

View File

@@ -1,16 +1,5 @@
<?php
//Paging
if(isset($_GET['p'])){
$p = intval($_GET['p']);
$record_from = (($p)-1)*$_SESSION['records_per_page'];
$record_to = $_SESSION['records_per_page'];
}else{
$record_from = 0;
$record_to = $_SESSION['records_per_page'];
$p = 1;
}
if(isset($_GET['q'])){
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
//Phone Numbers
@@ -26,19 +15,6 @@ if(isset($_GET['q'])){
// Sort
$sb = "item_created_at";
if(isset($_GET['o'])){
if($_GET['o'] == 'ASC'){
$o = "ASC";
$disp = "DESC";
}else{
$o = "DESC";
$disp = "ASC";
}
}else{
$o = "ASC";
$disp = "DESC";
}
// Current tab
$tab = str_replace('-', ' ', htmlentities($_GET['tab']));