mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Simplified Client URL Handling in global client header logic
This commit is contained in:
@@ -8,9 +8,11 @@ $order = "ASC";
|
||||
if (isset($_GET['client_id'])) {
|
||||
require_once "includes/inc_all_client.php";
|
||||
$client_query = "AND vendor_client_id = $client_id";
|
||||
$client_url = "client_id=$client_id&";
|
||||
} else {
|
||||
require_once "includes/inc_all.php";
|
||||
$client_query = "AND vendor_client_id = 0";
|
||||
$client_url = '';
|
||||
}
|
||||
|
||||
$sql = mysqli_query(
|
||||
@@ -54,7 +56,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form autocomplete="off">
|
||||
<?php if(isset($_GET['client_id'])) { ?>
|
||||
<?php if ($client_url) { ?>
|
||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
|
||||
@@ -71,7 +73,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="btn-group float-right">
|
||||
<a href="?<?php if(isset($_GET['client_id'])) { echo "client_id=$client_id&"; } ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||
<a href="?<?php echo "$client_url"; ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
||||
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user