mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Finished Updating admin / settings posts to use new logAction function, tidy and added more details to logging
This commit is contained in:
@@ -17,10 +17,12 @@ if (isset($_POST['add_software_template'])) {
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO software SET software_name = '$name', software_version = '$version', software_description = '$description', software_type = '$type', software_license_type = '$license_type', software_notes = '$notes', software_template = 1, software_client_id = 0");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Software Template', log_action = 'Create', log_description = '$session_user_name created software template $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||
$software_id = mysqli_insert_id($mysqli);
|
||||
|
||||
$_SESSION['alert_message'] = "Software template created";
|
||||
// Logging
|
||||
logAction("Software Template", "Create", "$session_name created software template $name", 0, $software_id);
|
||||
|
||||
$_SESSION['alert_message'] = "Software template <strong>$name</strong> created";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
@@ -38,10 +40,10 @@ if (isset($_POST['edit_software_template'])) {
|
||||
|
||||
mysqli_query($mysqli,"UPDATE software SET software_name = '$name', software_version = '$version', software_description = '$description', software_type = '$type', software_license_type = '$license_type', software_notes = '$notes' WHERE software_id = $software_id");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Software Teplate', log_action = 'Modify', log_description = '$session_name modified software template $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||
// Logging
|
||||
logAction("Software Template", "Edit", "$session_name edited software template $name", 0, $software_id);
|
||||
|
||||
$_SESSION['alert_message'] = "Software template updated";
|
||||
$_SESSION['alert_message'] = "Software template <strong>$name</strong> edited";
|
||||
|
||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user