diff --git a/client_asset_edit_modal.php b/client_asset_edit_modal.php index bd42286b..16c267a3 100644 --- a/client_asset_edit_modal.php +++ b/client_asset_edit_modal.php @@ -131,12 +131,18 @@ '$asset_created_at' OR location_archived_at IS NULL) AND location_client_id = $client_id ORDER BY location_archived_at ASC, location_name ASC"); while ($row = mysqli_fetch_array($sql_locations)) { $location_id_select = intval($row['location_id']); $location_name_select = nullable_htmlentities($row['location_name']); + $location_archived_at = nullable_htmlentities($row['location_archived_at']); + if (empty($location_archived_at)) { + $location_archived_display = ""; + } else { + $location_archived_display = "Archived - "; + } ?> - + @@ -153,13 +159,19 @@ '$asset_created_at' OR contact_archived_at IS NULL) AND contact_client_id = $client_id ORDER BY contact_name ASC"); + $sql_contacts = mysqli_query($mysqli, "SELECT * FROM contacts WHERE (contact_archived_at > '$asset_created_at' OR contact_archived_at IS NULL) AND contact_client_id = $client_id ORDER BY contact_archived_at ASC, contact_name ASC"); while ($row = mysqli_fetch_array($sql_contacts)) { $contact_id_select = intval($row['contact_id']); $contact_name_select = nullable_htmlentities($row['contact_name']); + $contact_archived_at = nullable_htmlentities($row['contact_archived_at']); + if (empty($contact_archived_at)) { + $contact_archived_display = ""; + } else { + $contact_archived_display = "Archived - "; + } ?> @@ -191,14 +203,20 @@ '$asset_created_at' OR network_archived_at IS NULL) AND network_client_id = $client_id ORDER BY network_name ASC"); + $sql_networks = mysqli_query($mysqli, "SELECT * FROM networks WHERE (network_archived_at > '$asset_created_at' OR network_archived_at IS NULL) AND network_client_id = $client_id ORDER BY network_archived_at ASC, network_name ASC"); while ($row = mysqli_fetch_array($sql_networks)) { $network_id_select = intval($row['network_id']); $network_name_select = nullable_htmlentities($row['network_name']); $network_select = nullable_htmlentities($row['network']); + $network_archived_at = nullable_htmlentities($row['network_archived_at']); + if (empty($network_archived_at)) { + $network_archived_display = ""; + } else { + $network_archived_display = "Archived - "; + } ?> - + @@ -239,12 +257,18 @@ '$asset_created_at' OR vendor_archived_at IS NULL) AND vendor_client_id = $client_id ORDER BY vendor_name ASC"); + $sql_vendors = mysqli_query($mysqli, "SELECT * FROM vendors WHERE (vendor_archived_at > '$asset_created_at' OR vendor_archived_at IS NULL) AND vendor_client_id = $client_id ORDER BY vendor_archived_at ASC, vendor_name ASC"); while ($row = mysqli_fetch_array($sql_vendors)) { $vendor_id_select = intval($row['vendor_id']); $vendor_name_select = nullable_htmlentities($row['vendor_name']); + $vendor_archived_at = nullable_htmlentities($row['vendor_archived_at']); + if (empty($vendor_archived_at)) { + $vendor_archived_display = ""; + } else { + $vendor_archived_display = "Archived - "; + } ?> - + diff --git a/client_assets.php b/client_assets.php index dcdec50c..ec69ac82 100644 --- a/client_assets.php +++ b/client_assets.php @@ -214,11 +214,23 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); if (empty($contact_name)) { $contact_name = "-"; } + $contact_archived_at = nullable_htmlentities($row['contact_archived_at']); + if (empty($contact_archived_at)) { + $contact_archived_display = ""; + } else { + $contact_archived_display = "Archived - "; + } $location_name = nullable_htmlentities($row['location_name']); if (empty($location_name)) { $location_name = "-"; } + $location_archived_at = nullable_htmlentities($row['location_archived_at']); + if (empty($location_archived_at)) { + $location_archived_display = ""; + } else { + $location_archived_display = "Archived - "; + } $login_id = intval($row['login_id']); $login_username = nullable_htmlentities(decryptLoginEntry($row['login_username'])); @@ -303,9 +315,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); - + - +