">
@@ -261,7 +294,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- |
+
|
diff --git a/locations.php b/locations.php
index 858c8a5a..64f57ccf 100644
--- a/locations.php
+++ b/locations.php
@@ -15,6 +15,18 @@ if (isset($_GET['client_id'])) {
$client_url = '';
}
+if (!$client_url) {
+ // Client Filter
+ if (isset($_GET['client']) & !empty($_GET['client'])) {
+ $client_query = 'AND (location_client_id = ' . intval($_GET['client']) . ')';
+ $client = intval($_GET['client']);
+ } else {
+ // Default - any
+ $client_query = '';
+ $client = '';
+ }
+}
+
// Tags Filter
if (isset($_GET['tags']) && is_array($_GET['tags']) && !empty($_GET['tags'])) {
// Sanitize each element of the status array
@@ -31,9 +43,6 @@ if (isset($_GET['tags']) && is_array($_GET['tags']) && !empty($_GET['tags'])) {
$tag_query = '';
}
-//Rebuild URL
-$url_query_strings_sort = http_build_query($get_copy);
-
$sql = mysqli_query(
$mysqli,
"SELECT SQL_CALC_FOUND_ROWS locations.*, clients.*, GROUP_CONCAT(tag_name) FROM locations
@@ -116,8 +125,31 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+
+
+
+
+
+
+
+
">
diff --git a/modals/asset_add_modal.php b/modals/asset_add_modal.php
index 106afeb4..9746f59a 100644
--- a/modals/asset_add_modal.php
+++ b/modals/asset_add_modal.php
@@ -58,7 +58,7 @@
while ($row = mysqli_fetch_array($sql)) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']); ?>
-
+
diff --git a/modals/certificate_add_modal.php b/modals/certificate_add_modal.php
index 24bb2149..14bbcdfd 100644
--- a/modals/certificate_add_modal.php
+++ b/modals/certificate_add_modal.php
@@ -46,7 +46,7 @@
while ($row = mysqli_fetch_array($sql)) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']); ?>
-
+
diff --git a/modals/contact_add_modal.php b/modals/contact_add_modal.php
index d13be9f7..6ce2b8cf 100644
--- a/modals/contact_add_modal.php
+++ b/modals/contact_add_modal.php
@@ -49,7 +49,7 @@
while ($row = mysqli_fetch_array($sql)) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']); ?>
-
+
diff --git a/modals/credential_add_modal.php b/modals/credential_add_modal.php
index 85d83527..ce4274d5 100644
--- a/modals/credential_add_modal.php
+++ b/modals/credential_add_modal.php
@@ -49,7 +49,7 @@
while ($row = mysqli_fetch_array($sql)) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']); ?>
-
+
diff --git a/modals/domain_add_modal.php b/modals/domain_add_modal.php
index a420f9bd..ed5057a6 100644
--- a/modals/domain_add_modal.php
+++ b/modals/domain_add_modal.php
@@ -44,7 +44,7 @@
while ($row = mysqli_fetch_array($sql)) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']); ?>
-
+
diff --git a/modals/location_add_modal.php b/modals/location_add_modal.php
index 025f605d..fa770c52 100644
--- a/modals/location_add_modal.php
+++ b/modals/location_add_modal.php
@@ -51,7 +51,7 @@
while ($row = mysqli_fetch_array($sql)) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']); ?>
-
+
diff --git a/modals/network_add_modal.php b/modals/network_add_modal.php
index d23f8609..12505a8d 100644
--- a/modals/network_add_modal.php
+++ b/modals/network_add_modal.php
@@ -49,7 +49,7 @@
while ($row = mysqli_fetch_array($sql)) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']); ?>
-
+
@@ -86,7 +86,7 @@
diff --git a/modals/software_add_modal.php b/modals/software_add_modal.php
index 5be6bd11..ca46241f 100644
--- a/modals/software_add_modal.php
+++ b/modals/software_add_modal.php
@@ -54,7 +54,7 @@
while ($row = mysqli_fetch_array($sql)) {
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']); ?>
-
+
diff --git a/networks.php b/networks.php
index 03c18a69..4ccd7c62 100644
--- a/networks.php
+++ b/networks.php
@@ -18,8 +18,27 @@ if (isset($_GET['client_id'])) {
// Perms
enforceUserPermission('module_support');
-//Rebuild URL
-$url_query_strings_sb = http_build_query(array_merge($_GET, array('sort' => $sort, 'order' => $order)));
+if (!$client_url) {
+ // Client Filter
+ if (isset($_GET['client']) & !empty($_GET['client'])) {
+ $client_query = 'AND (network_client_id = ' . intval($_GET['client']) . ')';
+ $client = intval($_GET['client']);
+ } else {
+ // Default - any
+ $client_query = '';
+ $client = '';
+ }
+}
+
+if ($client_url && isset($_GET['location']) && !empty($_GET['location'])) {
+ // Location Filter
+ $location_query = 'AND (network_location_id = ' . intval($_GET['location']) . ')';
+ $location_filter = intval($_GET['location']);
+} else {
+ // Default - any
+ $location_query = '';
+ $location_filter = '';
+}
$sql = mysqli_query(
$mysqli,
@@ -29,6 +48,7 @@ $sql = mysqli_query(
WHERE network_$archive_query
AND (network_name LIKE '%$q%' OR network_description LIKE '%$q%' OR network_vlan LIKE '%$q%' OR network LIKE '%$q%' OR network_gateway LIKE '%$q%' OR network_subnet LIKE '%$q%' OR network_primary_dns LIKE '%$q%' OR network_secondary_dns LIKE '%$q%' OR network_dhcp_range LIKE '%$q%' OR location_name LIKE '%$q%' OR client_name LIKE '%$q%')
$access_permission_query
+ $location_query
$client_query
ORDER BY $sort $order LIMIT $record_from, $record_to"
);
@@ -71,7 +91,49 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/software.php b/software.php
index 8e3f63b2..f16c7fb8 100644
--- a/software.php
+++ b/software.php
@@ -18,6 +18,18 @@ if (isset($_GET['client_id'])) {
// Perms
enforceUserPermission('module_support');
+if (!$client_url) {
+ // Client Filter
+ if (isset($_GET['client']) & !empty($_GET['client'])) {
+ $client_query = 'AND (software_client_id = ' . intval($_GET['client']) . ')';
+ $client = intval($_GET['client']);
+ } else {
+ // Default - any
+ $client_query = '';
+ $client = '';
+ }
+}
+
$sql = mysqli_query(
$mysqli,
"SELECT SQL_CALC_FOUND_ROWS * FROM software
@@ -74,7 +86,31 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
+
+
+
+
+
+
+
+
+
+ |