stage #1
@@ -259,7 +259,7 @@ if (mysqli_num_rows($os_sql) > 0) {
|
||||
SELECT DISTINCT client_id, client_name
|
||||
FROM clients
|
||||
JOIN assets ON asset_client_id = client_id
|
||||
WHERE client_archived_at IS NULL
|
||||
WHERE $archive_query
|
||||
$access_permission_query
|
||||
ORDER BY client_name ASC
|
||||
");
|
||||
|
||||
@@ -106,7 +106,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
SELECT DISTINCT client_id, client_name
|
||||
FROM clients
|
||||
JOIN certificates ON certificate_client_id = client_id
|
||||
WHERE client_archived_at IS NULL
|
||||
WHERE $archive_query
|
||||
$access_permission_query
|
||||
ORDER BY client_name ASC
|
||||
");
|
||||
|
||||
@@ -192,7 +192,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
SELECT DISTINCT client_id, client_name
|
||||
FROM clients
|
||||
JOIN contacts ON contact_client_id = client_id
|
||||
WHERE client_archived_at IS NULL
|
||||
WHERE $archive_query
|
||||
$access_permission_query
|
||||
ORDER BY client_name ASC
|
||||
");
|
||||
|
||||
@@ -12,10 +12,10 @@ if (isset($_GET['client_id'])) {
|
||||
// Overide Filter Header Archived
|
||||
if (isset($_GET['archived']) && $_GET['archived'] == 1) {
|
||||
$archived = 1;
|
||||
$archive_query = "c.credential_archived_at IS NOT NULL";
|
||||
$archive_query = "credential_archived_at IS NOT NULL";
|
||||
} else {
|
||||
$archived = 0;
|
||||
$archive_query = "c.credential_archived_at IS NULL";
|
||||
$archive_query = "credential_archived_at IS NULL";
|
||||
}
|
||||
|
||||
// Log when users load the Credentials page
|
||||
@@ -28,10 +28,10 @@ if (isset($_GET['client_id'])) {
|
||||
// Overide Filter Header Archived
|
||||
if (isset($_GET['archived']) && $_GET['archived'] == 1) {
|
||||
$archived = 1;
|
||||
$archive_query = "(client_archived_at IS NOT NULL OR c.credential_archived_at IS NOT NULL)";
|
||||
$archive_query = "(client_archived_at IS NOT NULL OR credential_archived_at IS NOT NULL)";
|
||||
} else {
|
||||
$archived = 0;
|
||||
$archive_query = "(client_archived_at IS NULL AND c.credential_archived_at IS NULL)";
|
||||
$archive_query = "(client_archived_at IS NULL AND credential_archived_at IS NULL)";
|
||||
}
|
||||
// Log when users load the Credentials page
|
||||
logAction("Credential", "View", "$session_name viewed the All Credentials page");
|
||||
@@ -132,6 +132,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<?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; ?>">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
@@ -200,7 +201,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
SELECT DISTINCT client_id, client_name
|
||||
FROM clients
|
||||
JOIN credentials ON credential_client_id = client_id
|
||||
WHERE client_archived_at IS NULL
|
||||
WHERE $archive_query
|
||||
$access_permission_query
|
||||
ORDER BY client_name ASC
|
||||
");
|
||||
|
||||
@@ -94,6 +94,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<?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; ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="input-group mb-3 mb-md-0">
|
||||
@@ -117,7 +118,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
SELECT DISTINCT client_id, client_name
|
||||
FROM clients
|
||||
JOIN domains ON domain_client_id = client_id
|
||||
WHERE client_archived_at IS NULL
|
||||
WHERE $archive_query
|
||||
$access_permission_query
|
||||
ORDER BY client_name ASC
|
||||
");
|
||||
|
||||
@@ -151,7 +151,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
SELECT DISTINCT client_id, client_name
|
||||
FROM clients
|
||||
JOIN locations ON location_client_id = client_id
|
||||
WHERE client_archived_at IS NULL
|
||||
WHERE $archive_query
|
||||
$access_permission_query
|
||||
ORDER BY client_name ASC
|
||||
");
|
||||
|
||||
@@ -147,7 +147,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
SELECT DISTINCT client_id, client_name
|
||||
FROM clients
|
||||
JOIN networks ON network_client_id = client_id
|
||||
WHERE client_archived_at IS NULL
|
||||
WHERE $archive_query
|
||||
$access_permission_query
|
||||
ORDER BY client_name ASC
|
||||
");
|
||||
|
||||
@@ -114,7 +114,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
SELECT DISTINCT client_id, client_name
|
||||
FROM clients
|
||||
JOIN software ON software_client_id = client_id
|
||||
WHERE client_archived_at IS NULL
|
||||
WHERE $archive_query
|
||||
$access_permission_query
|
||||
ORDER BY client_name ASC
|
||||
");
|
||||
|
||||
Reference in New Issue
Block a user