mirror of
https://github.com/itflow-org/itflow
synced 2026-03-25 23:05:37 +00:00
Limit Client Selection to clients that have an emtity in client filters
This commit is contained in:
@@ -230,7 +230,14 @@ if (mysqli_num_rows($os_sql) > 0) {
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN assets ON asset_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
@@ -85,7 +85,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN certificates ON certificate_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
@@ -165,7 +165,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN contacts ON contact_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
@@ -179,7 +179,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN credentials ON credential_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
@@ -97,7 +97,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN domains ON domain_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
@@ -134,7 +134,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN locations ON location_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
@@ -118,7 +118,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN networks ON network_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
@@ -79,7 +79,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN services ON service_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
@@ -95,7 +95,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
<option value="" <?php if ($client == "") { echo "selected"; } ?>>- All Clients -</option>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$sql_clients_filter = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
$sql_clients_filter = mysqli_query($mysqli, "
|
||||||
|
SELECT DISTINCT client_id, client_name
|
||||||
|
FROM clients
|
||||||
|
JOIN software ON software_client_id = client_id
|
||||||
|
WHERE client_archived_at IS NULL
|
||||||
|
$access_permission_query
|
||||||
|
ORDER BY client_name ASC
|
||||||
|
");
|
||||||
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
while ($row = mysqli_fetch_array($sql_clients_filter)) {
|
||||||
$client_id = intval($row['client_id']);
|
$client_id = intval($row['client_id']);
|
||||||
$client_name = nullable_htmlentities($row['client_name']);
|
$client_name = nullable_htmlentities($row['client_name']);
|
||||||
|
|||||||
Reference in New Issue
Block a user