Added Software Licenses, Tickets and notes under contact details as well as fix the contact edit by moving the modal just below the edit button so it does not conflict with other tables that have the contact_id var

This commit is contained in:
johnnyq
2023-01-25 11:16:36 -05:00
committed by Marcus Hill
parent 36a857c366
commit e8bcdc42f3
3 changed files with 256 additions and 3 deletions

View File

@@ -163,6 +163,18 @@ if (isset($_POST['client_set_notes'])) {
}
if (isset($_POST['contact_set_notes'])) {
$contact_id = intval($_POST['contact_id']);
$notes = trim(strip_tags(mysqli_real_escape_string($mysqli, $_POST['notes'])));
// Update notes
mysqli_query($mysqli, "UPDATE contacts SET contact_notes = '$notes' WHERE contact_id = contact_id");
// Logging
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Contact', log_action = 'Modify', log_description = '$session_name modified contact notes', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id, company_id = $session_company_id");
}
/*
* Collision Detection/Avoidance
* Called upon loading a ticket, and every 2 mins thereafter