Allow to set quick notes under asset details

This commit is contained in:
johnnyq
2023-11-06 14:25:55 -05:00
parent dff4eff5cc
commit a8ee791d64
2 changed files with 15 additions and 3 deletions

View File

@@ -181,6 +181,18 @@ if (isset($_POST['contact_set_notes'])) {
}
if (isset($_POST['asset_set_notes'])) {
$asset_id = intval($_POST['asset_id']);
$notes = sanitizeInput($_POST['notes']);
// Update notes
mysqli_query($mysqli, "UPDATE assets SET asset_notes = '$notes' WHERE asset_id = $asset_id");
// Logging
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Assets', log_action = 'Modify', log_description = '$session_name modified asset notes', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
}
/*
* Collision Detection/Avoidance
* Called upon loading a ticket, and every 2 mins thereafter