forked from lucasfrag/Kali-Linux-Tools-Interface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
selected-report.php
93 lines (75 loc) · 2.77 KB
/
selected-report.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html>
<?php
include("assets/includes/head.php");
$id = $_GET['id'];
?>
<body>
<?php
include("assets/includes/header.php")
?>
<!-- Page content -->
<div class="container-fluid mt--7">
<!-- Table -->
<div class="row">
<div class="col">
<div class="card shadow">
<div class="card-header bg-transparent">
<h2 class="mb-0">Reports</h2>
</div>
<div class="card-body">
<div class="row">
<div class="col">
<?php
$con = getConnectionDB() or die ("Could not connect to database.");
$sql = $con->prepare("SELECT * FROM reports WHERE id = $id;");
$sql->execute();
$resultados = $sql->fetchAll(PDO::FETCH_ASSOC);
// FOREACH BEGINS
foreach ($resultados as $resultado) {
$name = $resultado['name'];
$tools = $resultado['tools'];
$command = $resultado['command'];
$output = $resultado['output'];
$solution = $resultado['solution'];
$dataOld = $resultado['dataHour'];
$dataHour = date ("d F Y - H:i", strtotime($dataOld));
?>
<h1><?php echo $name; ?></h1>
<span>
<?php echo $tools; ?> </span><br><br>
Scan carried out on <span><?php echo $dataHour; ?>hrs <br><br>
Command executed:<b> <?php echo $command; ?></b>
<br>
</span>
<br>
<div class="row mt-3">
<div class="col">
<div class="terminal" id="terminal" >
<div class="card card-body text-white bg-dark">
<h2 class="card-title text-white"><i class="ni ni-bold-right"></i> Terminal</h2>
<p class="card-text"><pre class="text-white"><?php echo $output; ?></pre></p>
</div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col">
<div class="solution" id="solution" >
<div class="card card-body text-white bg-success">
<h2 class="card-title text-white"><i class="ni ni-bold-right"></i> Solution</h2>
<p class="card-text"><?php echo $solution; ?></p>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<?php
include("assets/includes/footer.php")
?>
</body>
</html>