mirror of
https://github.com/itflow-org/itflow
synced 2026-03-15 10:14:51 +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:
56
accounts.php
56
accounts.php
@@ -1,51 +1,19 @@
|
|||||||
<?php include("inc_all.php"); ?>
|
<?php include("inc_all.php");
|
||||||
|
|
||||||
<?php
|
if(!empty($_GET['sb'])){
|
||||||
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
|
}else{
|
||||||
|
$sb = "account_name";
|
||||||
|
}
|
||||||
|
|
||||||
//Paging
|
//Rebuild URL
|
||||||
if(isset($_GET['p'])){
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
$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'])){
|
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM accounts
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
WHERE account_name LIKE '%$q%' AND company_id = $session_company_id
|
||||||
}else{
|
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
|
||||||
}else{
|
|
||||||
$sb = "account_name";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM accounts
|
|
||||||
WHERE account_name LIKE '%$q%' AND company_id = $session_company_id
|
|
||||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
32
assets.php
32
assets.php
@@ -1,23 +1,5 @@
|
|||||||
<?php include("inc_all.php");
|
<?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;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Custom Query Filter
|
|
||||||
if(isset($_GET['q'])){
|
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Column Filter
|
//Column Filter
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
@@ -25,20 +7,6 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "asset_name";
|
$sb = "asset_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Column Order Filter
|
|
||||||
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
|
//Date From and Date To Filter
|
||||||
if(!empty($_GET['dtf'])){
|
if(!empty($_GET['dtf'])){
|
||||||
$dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);
|
$dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php include("inc_all.php");
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "campaign_created_at";
|
$sb = "campaign_created_at";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(empty($_GET['canned_date'])){
|
if(empty($_GET['canned_date'])){
|
||||||
//Prevents lots of undefined variable errors.
|
//Prevents lots of undefined variable errors.
|
||||||
// $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00
|
// $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00
|
||||||
|
|||||||
@@ -1,47 +1,17 @@
|
|||||||
<?php include("inc_all_admin.php");
|
<?php include("inc_all_admin.php");
|
||||||
|
|
||||||
//Paging
|
if(isset($_GET['category'])){
|
||||||
if(isset($_GET['p'])){
|
$category = mysqli_real_escape_string($mysqli,$_GET['category']);
|
||||||
$p = intval($_GET['p']);
|
|
||||||
$record_from = (($p)-1)*$_SESSION['records_per_page'];
|
|
||||||
$record_to = $_SESSION['records_per_page'];
|
|
||||||
}else{
|
}else{
|
||||||
$record_from = 0;
|
$category = "Expense";
|
||||||
$record_to = $_SESSION['records_per_page'];
|
|
||||||
$p = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['q'])){
|
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_GET['category'])){
|
|
||||||
$category = mysqli_real_escape_string($mysqli,$_GET['category']);
|
|
||||||
}else{
|
|
||||||
$category = "Expense";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "category_name";
|
$sb = "category_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -29,42 +29,12 @@ $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT(*) AS count FROM as
|
|||||||
AND asset_archived_at IS NULL AND asset_client_id = $client_id"));
|
AND asset_archived_at IS NULL AND asset_client_id = $client_id"));
|
||||||
$other_count = $row['count'];
|
$other_count = $row['count'];
|
||||||
|
|
||||||
//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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "asset_name";
|
$sb = "asset_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Asset Type from GET
|
//Asset Type from GET
|
||||||
if(isset($_GET['type']) && ($_GET['type']) == 'workstation'){
|
if(isset($_GET['type']) && ($_GET['type']) == 'workstation'){
|
||||||
$type_query = "asset_type = 'desktop' OR asset_type = 'laptop'";
|
$type_query = "asset_type = 'desktop' OR asset_type = 'laptop'";
|
||||||
|
|||||||
@@ -1,21 +1,5 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
@@ -23,19 +7,6 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "certificate_name";
|
$sb = "certificate_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
<?php
|
<?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'])){
|
if(isset($_GET['q'])){
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
||||||
//Phone Numbers
|
//Phone Numbers
|
||||||
@@ -18,7 +7,6 @@ if(isset($_GET['q'])){
|
|||||||
if(empty($n)){
|
if(empty($n)){
|
||||||
$n = $q;
|
$n = $q;
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$q = "";
|
$q = "";
|
||||||
//Phone Numbers
|
//Phone Numbers
|
||||||
@@ -31,19 +19,6 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "contact_name";
|
$sb = "contact_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "department_name";
|
$sb = "department_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "document_name";
|
$sb = "document_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Tag from GET
|
# Tag from GET
|
||||||
if (isset($_GET['tag'])) {
|
if (isset($_GET['tag'])) {
|
||||||
$tag = intval($_GET['tag']);
|
$tag = intval($_GET['tag']);
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "domain_name";
|
$sb = "domain_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "invoice_number";
|
$sb = "invoice_number";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
<?php
|
<?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'])){
|
if(isset($_GET['q'])){
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
||||||
//Phone Numbers
|
//Phone Numbers
|
||||||
@@ -29,19 +18,6 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "location_name";
|
$sb = "location_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -2,42 +2,12 @@
|
|||||||
|
|
||||||
require_once("rfc6238.php");
|
require_once("rfc6238.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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "login_name";
|
$sb = "login_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,37 +1,13 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "log_id";
|
$sb = "log_id";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
// Reverse default sort
|
||||||
if($_GET['o'] == 'ASC'){
|
if(!isset($_GET['o'])){
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "network_name";
|
$sb = "network_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "payment_date";
|
$sb = "payment_date";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "quote_number";
|
$sb = "quote_number";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "recurring_id";
|
$sb = "recurring_id";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(isset($_GET['tab'])){
|
if(isset($_GET['tab'])){
|
||||||
|
|
||||||
|
include('pagination_head.php');
|
||||||
|
|
||||||
if($_GET['tab'] == "overview"){
|
if($_GET['tab'] == "overview"){
|
||||||
include("client_overview.php");
|
include("client_overview.php");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "scheduled_ticket_subject";
|
$sb = "scheduled_ticket_subject";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Current tab
|
// Current tab
|
||||||
$tab = str_replace('-', ' ', htmlentities($_GET['tab']));
|
$tab = str_replace('-', ' ', htmlentities($_GET['tab']));
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Search query
|
|
||||||
if(isset($_GET['q'])){
|
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Current tab
|
// Current tab
|
||||||
$tab = htmlentities($_GET['tab']);
|
$tab = htmlentities($_GET['tab']);
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
<?php
|
<?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'])){
|
if(isset($_GET['q'])){
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
||||||
//Phone Numbers
|
//Phone Numbers
|
||||||
@@ -26,19 +15,6 @@ if(isset($_GET['q'])){
|
|||||||
// Sort
|
// Sort
|
||||||
$sb = "item_created_at";
|
$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
|
// Current tab
|
||||||
$tab = str_replace('-', ' ', htmlentities($_GET['tab']));
|
$tab = str_replace('-', ' ', htmlentities($_GET['tab']));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "software_name";
|
$sb = "software_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "ticket_number";
|
$sb = "ticket_number";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "trip_date";
|
$sb = "trip_date";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Date From and Date To Filter
|
//Date From and Date To Filter
|
||||||
if(isset($_GET['dtf'])){
|
if(isset($_GET['dtf'])){
|
||||||
$dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);
|
$dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
<?php
|
<?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'])){
|
if(isset($_GET['q'])){
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
||||||
//Phone Numbers
|
//Phone Numbers
|
||||||
@@ -29,19 +18,6 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "vendor_name";
|
$sb = "vendor_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php include("inc_all_admin.php");
|
<?php include("inc_all_admin.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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "company_name";
|
$sb = "company_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php include("inc_all_admin.php");
|
<?php include("inc_all_admin.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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "custom_link_name";
|
$sb = "custom_link_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
30
expenses.php
30
expenses.php
@@ -1,41 +1,11 @@
|
|||||||
<?php include("inc_all.php");
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "expense_date";
|
$sb = "expense_date";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(empty($_GET['canned_date'])){
|
if(empty($_GET['canned_date'])){
|
||||||
//Prevents lots of undefined variable errors.
|
//Prevents lots of undefined variable errors.
|
||||||
// $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00
|
// $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ include("top_nav.php");
|
|||||||
include("side_nav.php");
|
include("side_nav.php");
|
||||||
include("inc_wrapper.php");
|
include("inc_wrapper.php");
|
||||||
include("inc_alert_feedback.php");
|
include("inc_alert_feedback.php");
|
||||||
|
include("pagination_head.php");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -16,5 +16,6 @@ include("top_nav.php");
|
|||||||
include("admin_side_nav.php");
|
include("admin_side_nav.php");
|
||||||
include("inc_wrapper.php");
|
include("inc_wrapper.php");
|
||||||
include("inc_alert_feedback.php");
|
include("inc_alert_feedback.php");
|
||||||
|
include("pagination_head.php");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
27
invoices.php
27
invoices.php
@@ -51,22 +51,6 @@
|
|||||||
|
|
||||||
$real_overdue_amount = $total_overdue - $total_overdue_partial;
|
$real_overdue_amount = $total_overdue - $total_overdue_partial;
|
||||||
|
|
||||||
//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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
$sb = strip_tags(mysqli_real_escape_string($mysqli, $_GET['sb']));
|
||||||
@@ -74,15 +58,8 @@
|
|||||||
$sb = "invoice_number";
|
$sb = "invoice_number";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
// Reverse default sort
|
||||||
if($_GET['o'] == 'ASC'){
|
if(!isset($_GET['o'])){
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
28
logs.php
28
logs.php
@@ -1,37 +1,13 @@
|
|||||||
<?php include("inc_all_admin.php");
|
<?php include("inc_all_admin.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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "log_id";
|
$sb = "log_id";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
// Reverse default sort
|
||||||
if($_GET['o'] == 'ASC'){
|
if(!isset($_GET['o'])){
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,5 @@
|
|||||||
<?php include("inc_all.php");
|
<?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;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Custom Query Filter
|
|
||||||
if(isset($_GET['q'])){
|
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Column Filter
|
//Column Filter
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
@@ -25,16 +7,8 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "notification_timestamp";
|
$sb = "notification_timestamp";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Column Order Filter
|
// Reverse default sort
|
||||||
if(isset($_GET['o'])){
|
if(!isset($_GET['o'])){
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
|
* Pagination Body/Footer
|
||||||
|
* Displays page number buttons
|
||||||
|
*
|
||||||
|
* Should not be accessed directly, but called from other pages
|
||||||
|
* Relies upon the $num_rows variable being set correctly
|
||||||
|
*/
|
||||||
|
|
||||||
$total_found_rows = $num_rows[0];
|
$total_found_rows = $num_rows[0];
|
||||||
$total_pages = ceil($total_found_rows / $_SESSION['records_per_page']);
|
$total_pages = ceil($total_found_rows / $_SESSION['records_per_page']);
|
||||||
|
|||||||
40
pagination_head.php
Normal file
40
pagination_head.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Pagination - Head
|
||||||
|
* Sets the paging/sort for use in limit/order by
|
||||||
|
* Sets the default search query from GET to $q
|
||||||
|
*
|
||||||
|
* Should not be accessed directly, but called from other pages
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Order
|
||||||
|
if(isset($_GET['o'])){
|
||||||
|
if($_GET['o'] == 'ASC'){
|
||||||
|
$o = "ASC";
|
||||||
|
$disp = "DESC";
|
||||||
|
}else{
|
||||||
|
$o = "DESC";
|
||||||
|
$disp = "ASC";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$o = "ASC";
|
||||||
|
$disp = "DESC";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Search
|
||||||
|
if(isset($_GET['q'])){
|
||||||
|
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
||||||
|
}else{
|
||||||
|
$q = "";
|
||||||
|
}
|
||||||
28
payments.php
28
payments.php
@@ -1,37 +1,13 @@
|
|||||||
<?php include("inc_all.php");
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "payment_date";
|
$sb = "payment_date";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
// Reverse default sort
|
||||||
if($_GET['o'] == 'ASC'){
|
if(!isset($_GET['o'])){
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
29
products.php
29
products.php
@@ -1,40 +1,11 @@
|
|||||||
<?php include("inc_all.php");
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "product_name";
|
$sb = "product_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|||||||
30
quotes.php
30
quotes.php
@@ -1,39 +1,13 @@
|
|||||||
<?php include("inc_all.php");
|
<?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;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Custom Query Filter
|
|
||||||
if(isset($_GET['q'])){
|
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "quote_number";
|
$sb = "quote_number";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Column Order Filter
|
// Reverse default sort
|
||||||
if(isset($_GET['o'])){
|
if(!isset($_GET['o'])){
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php include("inc_all.php");
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "recurring_next_date";
|
$sb = "recurring_next_date";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(empty($_GET['canned_date'])) {
|
if(empty($_GET['canned_date'])) {
|
||||||
//Prevents lots of undefined variable errors.
|
//Prevents lots of undefined variable errors.
|
||||||
// $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00
|
// $dtf and $dtt will be set by the below else to 0000-00-00 / 9999-00-00
|
||||||
|
|||||||
28
revenues.php
28
revenues.php
@@ -1,37 +1,13 @@
|
|||||||
<?php include("inc_all.php");
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "revenue_date";
|
$sb = "revenue_date";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
// Reverse default sort
|
||||||
if($_GET['o'] == 'ASC'){
|
if(!isset($_GET['o'])){
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
include("inc_all.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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "scheduled_ticket_subject";
|
$sb = "scheduled_ticket_subject";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,11 @@
|
|||||||
<?php include("inc_all_admin.php");
|
<?php include("inc_all_admin.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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "api_key_name";
|
$sb = "api_key_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
30
tags.php
30
tags.php
@@ -1,41 +1,11 @@
|
|||||||
<?php include("inc_all.php");
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "tag_name";
|
$sb = "tag_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
13
taxes.php
13
taxes.php
@@ -6,19 +6,6 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "tax_name";
|
$sb = "tax_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,5 @@
|
|||||||
<?php include("inc_all.php");
|
<?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;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Search Query Filter
|
|
||||||
if(isset($_GET['q'])){
|
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Column Sortby Filter
|
//Column Sortby Filter
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
@@ -25,16 +7,8 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "transfer_date";
|
$sb = "transfer_date";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Order Filter
|
// Reverse default sort
|
||||||
if(isset($_GET['o'])){
|
if(!isset($_GET['o'])){
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
28
trips.php
28
trips.php
@@ -1,37 +1,13 @@
|
|||||||
<?php include("inc_all.php");
|
<?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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "trip_date";
|
$sb = "trip_date";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
// Reverse default sort
|
||||||
if($_GET['o'] == 'ASC'){
|
if(!isset($_GET['o'])){
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
$o = "DESC";
|
||||||
$disp = "ASC";
|
$disp = "ASC";
|
||||||
}
|
}
|
||||||
|
|||||||
114
user_logs.php
114
user_logs.php
@@ -1,114 +0,0 @@
|
|||||||
<?php include("inc_all_admin.php");
|
|
||||||
|
|
||||||
//Rebuild URL
|
|
||||||
|
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
|
||||||
|
|
||||||
//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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
|
||||||
}else{
|
|
||||||
$sb = "log_id";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM logs, users
|
|
||||||
WHERE log_type LIKE '%$q%' OR log_action LIKE '%$q%' OR log_description LIKE '%$q%'
|
|
||||||
AND (logs.user_id = users.user_id)
|
|
||||||
ORDER BY $sb $o LIMIT $record_from, $record_to");
|
|
||||||
|
|
||||||
$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|
||||||
$total_found_rows = $num_rows[0];
|
|
||||||
$total_pages = ceil($total_found_rows / 10);
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="card mb-3">
|
|
||||||
<div class="card-header bg-dark text-white">
|
|
||||||
<h6 class="float-left mt-1"><i class="fa fa-fw fa-book mr-2"></i>Logs</h6>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<form autocomplete="off">
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="search" class="form-control col-md-4" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Logs">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button class="btn btn-primary"><i class="fa fa-search"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<hr>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-striped table-borderless table-hover">
|
|
||||||
<thead class="text-dark <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
|
||||||
<tr>
|
|
||||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=log_created_at&o=<?php echo $disp; ?>">Timestamp</a></th>
|
|
||||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=name&o=<?php echo $disp; ?>">User</a></th>
|
|
||||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=log_type&o=<?php echo $disp; ?>">Type</a></th>
|
|
||||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=log_action&o=<?php echo $disp; ?>">Action</a></th>
|
|
||||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=log_description&o=<?php echo $disp; ?>">Description</a></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
while($row = mysqli_fetch_array($sql)){
|
|
||||||
$log_id = $row['log_id'];
|
|
||||||
$log_type = $row['log_type'];
|
|
||||||
$log_action = $row['log_action'];
|
|
||||||
$log_description = $row['log_description'];
|
|
||||||
$log_created_at = $row['log_created_at'];
|
|
||||||
$user_id = $row['user_id'];
|
|
||||||
$user_name = $row['name'];
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><?php echo $log_created_at; ?></td>
|
|
||||||
<td><?php echo $user_name; ?></td>
|
|
||||||
<td><?php echo $log_type; ?></td>
|
|
||||||
<td><?php echo $log_action; ?></td>
|
|
||||||
<td><?php echo $log_description; ?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<?php include("pagination.php"); ?>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php include("footer.php");
|
|
||||||
30
users.php
30
users.php
@@ -1,41 +1,11 @@
|
|||||||
<?php include("inc_all_admin.php");
|
<?php include("inc_all_admin.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']);
|
|
||||||
}else{
|
|
||||||
$q = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($_GET['sb'])){
|
if(!empty($_GET['sb'])){
|
||||||
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
$sb = mysqli_real_escape_string($mysqli,$_GET['sb']);
|
||||||
}else{
|
}else{
|
||||||
$sb = "user_name";
|
$sb = "user_name";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_GET['o'])){
|
|
||||||
if($_GET['o'] == 'ASC'){
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}else{
|
|
||||||
$o = "DESC";
|
|
||||||
$disp = "ASC";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
$o = "ASC";
|
|
||||||
$disp = "DESC";
|
|
||||||
}
|
|
||||||
|
|
||||||
//Rebuild URL
|
//Rebuild URL
|
||||||
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
$url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o' => $o)));
|
||||||
|
|
||||||
|
|||||||
25
vendors.php
25
vendors.php
@@ -1,16 +1,5 @@
|
|||||||
<?php include("inc_all.php");
|
<?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'])){
|
if(isset($_GET['q'])){
|
||||||
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
$q = mysqli_real_escape_string($mysqli,$_GET['q']);
|
||||||
//Phone Numbers
|
//Phone Numbers
|
||||||
@@ -30,20 +19,6 @@ if(!empty($_GET['sb'])){
|
|||||||
$sb = "vendor_name";
|
$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
|
//Date From and Date To Filter
|
||||||
if(!empty($_GET['dtf'])){
|
if(!empty($_GET['dtf'])){
|
||||||
$dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);
|
$dtf = mysqli_real_escape_string($mysqli,$_GET['dtf']);
|
||||||
|
|||||||
Reference in New Issue
Block a user