More Client Enforcement in modals across the app

This commit is contained in:
johnnyq
2026-07-16 13:10:02 -04:00
parent 9e84ce4c07
commit 2c09ce097c
34 changed files with 172 additions and 36 deletions

View File

@@ -49,6 +49,8 @@ if (isset($_POST['client_set_notes'])) {
$client_id = intval($_POST['client_id']);
$notes = escapeSql($_POST['notes']);
enforceClientAccess();
// Update notes
mysqli_query($mysqli, "UPDATE clients SET client_notes = '$notes' WHERE client_id = $client_id");
@@ -74,6 +76,8 @@ if (isset($_POST['contact_set_notes'])) {
$contact_name = escapeSql($row['contact_name']);
$client_id = intval($row['contact_client_id']);
enforceClientAccess();
// Update notes
mysqli_query($mysqli, "UPDATE contacts SET contact_notes = '$notes' WHERE contact_id = $contact_id");
@@ -99,6 +103,8 @@ if (isset($_POST['asset_set_notes'])) {
$asset_name = escapeSql($row['asset_name']);
$client_id = intval($row['asset_client_id']);
enforceClientAccess();
// Update notes
mysqli_query($mysqli, "UPDATE assets SET asset_notes = '$notes' WHERE asset_id = $asset_id");