mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Code deduplication/tidying
- Move default pagination/sort/search query variable mapping to pagination_head.php - Remove user_logs.php
This commit is contained in:
25
vendors.php
25
vendors.php
@@ -1,16 +1,5 @@
|
||||
<?php include("inc_all.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
|
||||
@@ -30,20 +19,6 @@ if(!empty($_GET['sb'])){
|
||||
$sb = "vendor_name";
|
||||
}
|
||||
|
||||
//Column Order
|
||||
if(isset($_GET['o'])){
|
||||
if($_GET['o'] == 'ASC'){
|
||||
$o = "ASC";
|
||||
$disp = "DESC";
|
||||
}else{
|
||||
$o = "DESC";
|
||||
$disp = "ASC";
|
||||
}
|
||||
}else{
|
||||
$o = "ASC";
|
||||
$disp = "DESC";
|
||||
}
|
||||
|
||||
//Date From and Date To Filter
|
||||
if(!empty($_GET['dtf'])){
|
||||
$dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);
|
||||
|
||||
Reference in New Issue
Block a user