From 064e48a0cd02407b66ee33734a6ed2779d87fcd3 Mon Sep 17 00:00:00 2001 From: jakani24 Date: Thu, 20 Jun 2024 15:34:01 +0200 Subject: [PATCH] . --- src/server/cyberhex-code/install/create_db.php | 18 ++++++++++++++++++ .../system/secure_zone/php/incident_list.php | 4 +++- .../system/secure_zone/php/index.php | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/server/cyberhex-code/install/create_db.php b/src/server/cyberhex-code/install/create_db.php index 23f20e3..8c3b906 100644 --- a/src/server/cyberhex-code/install/create_db.php +++ b/src/server/cyberhex-code/install/create_db.php @@ -105,6 +105,24 @@ '; } + // Create incident table + $sql = "CREATE TABLE IF NOT EXISTS incidents ( + id INT AUTO_INCREMENT PRIMARY KEY, + status VARCHAR(50) NOT NULL, + description VARCHAR(255) NOT NULL + )"; + + if ($conn->query($sql) === TRUE) { + echo '
'; + } else { + $success=0; + echo '
'; + } + // Create server log table $sql = "CREATE TABLE IF NOT EXISTS server_log ( id INT AUTO_INCREMENT PRIMARY KEY, diff --git a/src/server/cyberhex-code/system/secure_zone/php/incident_list.php b/src/server/cyberhex-code/system/secure_zone/php/incident_list.php index 421933f..c4480cf 100644 --- a/src/server/cyberhex-code/system/secure_zone/php/incident_list.php +++ b/src/server/cyberhex-code/system/secure_zone/php/incident_list.php @@ -72,7 +72,7 @@ include "../../../api/php/log/add_server_entry.php"; //to log things echo(''); echo(''); echo(''); - echo(''); + echo(''); echo(''); echo(''); echo(''); @@ -86,10 +86,12 @@ include "../../../api/php/log/add_server_entry.php"; //to log things $row = $result->fetch_assoc(); $last_id=$row["id"]; $status=$row["status"]; + $description=$row["description"]; if($last_id!=1){ //number 1 is the unauthenticated user echo(''); echo(''); echo(''); + echo(''); echo(''); echo(''); } diff --git a/src/server/cyberhex-code/system/secure_zone/php/index.php b/src/server/cyberhex-code/system/secure_zone/php/index.php index 7d9903a..d043041 100644 --- a/src/server/cyberhex-code/system/secure_zone/php/index.php +++ b/src/server/cyberhex-code/system/secure_zone/php/index.php @@ -117,7 +117,7 @@ if(isset($_GET["page"])){
Incident IdStatusGoto IncidentIncident IdStatusDescriptionGoto Incident
'.$last_id.''.$status.''.$description.'Goto Incident