From ac1083bdbbe27cd2d10dab6091928190b3b84dc5 Mon Sep 17 00:00:00 2001 From: jakani24 Date: Thu, 20 Jun 2024 15:40:35 +0200 Subject: [PATCH] adding incidents --- .../cyberhex-code/install/create_db.php | 4 +- .../system/secure_zone/php/add_incident.php | 83 +++++++++++++++++++ 2 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 src/server/cyberhex-code/system/secure_zone/php/add_incident.php diff --git a/src/server/cyberhex-code/install/create_db.php b/src/server/cyberhex-code/install/create_db.php index 8c3b906..fbdb4a5 100644 --- a/src/server/cyberhex-code/install/create_db.php +++ b/src/server/cyberhex-code/install/create_db.php @@ -114,12 +114,12 @@ if ($conn->query($sql) === TRUE) { echo '
'; } else { $success=0; echo '
'; } diff --git a/src/server/cyberhex-code/system/secure_zone/php/add_incident.php b/src/server/cyberhex-code/system/secure_zone/php/add_incident.php new file mode 100644 index 0000000..7d39be9 --- /dev/null +++ b/src/server/cyberhex-code/system/secure_zone/php/add_incident.php @@ -0,0 +1,83 @@ + + + + + + + + Change Password + + + +
+
+
+
+
+

Add an incident

+
+
+
+
+ + +
+ +
+
+ + connect_error) { + $success=0; + die("Connection failed: " . $conn->connect_error); + } + $stmt = $conn->prepare("INSERT INTO incidents (description, status) VALUES (?, 'open')"); + $stmt->bind_param("s", $keyword); + + $keyword=htmlspecialchars($_POST["keyword"]); + + $stmt->execute(); + $stmt->close(); + $conn->close(); + echo ''; + log_action("INCIDENT::ADD::SUCCESS","User ".$_SESSION["username"]." added an incident.",$_SESSION["id"]); + ?> + +
+
+
+
+
+ +