.
This commit is contained in:
@@ -105,6 +105,24 @@
|
|||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 '<br><div class="alert alert-success" role="alert">
|
||||||
|
Table log created successfully!
|
||||||
|
</div>';
|
||||||
|
} else {
|
||||||
|
$success=0;
|
||||||
|
echo '<br><div class="alert alert-danger" role="alert">
|
||||||
|
Error creating table log: ' . $conn->error .'
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
|
||||||
// Create server log table
|
// Create server log table
|
||||||
$sql = "CREATE TABLE IF NOT EXISTS server_log (
|
$sql = "CREATE TABLE IF NOT EXISTS server_log (
|
||||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ include "../../../api/php/log/add_server_entry.php"; //to log things
|
|||||||
echo('<table class="table">');
|
echo('<table class="table">');
|
||||||
echo('<thead>');
|
echo('<thead>');
|
||||||
echo('<tr>');
|
echo('<tr>');
|
||||||
echo('<th>Incident Id</th><th>Status</th><th>Goto Incident</th>');
|
echo('<th>Incident Id</th><th>Status</th><th>Description</th><th>Goto Incident</th>');
|
||||||
echo('</tr>');
|
echo('</tr>');
|
||||||
echo('</thead>');
|
echo('</thead>');
|
||||||
echo('<tbody>');
|
echo('<tbody>');
|
||||||
@@ -86,10 +86,12 @@ include "../../../api/php/log/add_server_entry.php"; //to log things
|
|||||||
$row = $result->fetch_assoc();
|
$row = $result->fetch_assoc();
|
||||||
$last_id=$row["id"];
|
$last_id=$row["id"];
|
||||||
$status=$row["status"];
|
$status=$row["status"];
|
||||||
|
$description=$row["description"];
|
||||||
if($last_id!=1){ //number 1 is the unauthenticated user
|
if($last_id!=1){ //number 1 is the unauthenticated user
|
||||||
echo('<tr>');
|
echo('<tr>');
|
||||||
echo('<td>'.$last_id.'</td>');
|
echo('<td>'.$last_id.'</td>');
|
||||||
echo('<td>'.$status.'</td>');
|
echo('<td>'.$status.'</td>');
|
||||||
|
echo('<td>'.$description.'</td>');
|
||||||
echo('<td><a href="manage_incident.php?incident_id='.$last_id.'">Goto Incident</a></td>');
|
echo('<td><a href="manage_incident.php?incident_id='.$last_id.'">Goto Incident</a></td>');
|
||||||
echo('</tr>');
|
echo('</tr>');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ if(isset($_GET["page"])){
|
|||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
if($perms[9]=="1" or $perms[10]=="1")
|
if($perms[9]=="1" or $perms[10]=="1")
|
||||||
echo('<li><a href="index.php?page=manage_incident.php">View Incidents</a></li>');
|
echo('<li><a href="index.php?page=incident_list.php">View Incidents</a></li>');
|
||||||
if($perms[10]=="1")
|
if($perms[10]=="1")
|
||||||
echo('<li><a href="index.php?page=add_incident.php">Add Incident</a></li>');
|
echo('<li><a href="index.php?page=add_incident.php">Add Incident</a></li>');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user