-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtableRows.php
71 lines (65 loc) · 5.23 KB
/
tableRows.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
<?php
$db = new SQLite3("db.sqlite3");
$results = $db->query("SELECT * FROM ports");
while ($row = $results->fetchArray()) {
echo '
<tr>
<td class="font-weight-bold">' . htmlspecialchars($row["port"]) .'</td>
<td>';
if ($row["status"] == "Open") {
echo '<a href="#" class="btn btn-success btn-sm btn-icon-split disabled">
<span class="icon text-white-50">
<i class="fas fa-check"></i>
</span>
<span class="text">' . htmlspecialchars($row["status"]) .'</span>
</a>';
} else {
echo '<a href="#" class="btn btn-danger btn-sm btn-icon-split disabled">
<span class="icon text-white-50">
<i class="fas fa-times"></i>
</span>
<span class="text">' . htmlspecialchars($row["status"]) .'</span>
</a>';
}
echo '
</td>
<td class="font-weight-bold">' . htmlspecialchars($row["service"]) .'</td>
<td class="font-weight-bold">' . htmlspecialchars($row["devicename"]) .'</td>
<td><a href="http://' . htmlspecialchars($row["deviceip"]) .'" target="_blank" class="font-weight-bold">' . htmlspecialchars($row["deviceip"]) .'</a></td>
<td><a href="https://' . htmlspecialchars($row["domain"]) .'" target="_blank" class="font-weight-bold">' . htmlspecialchars($row["domain"]) .'</a></td>
<td><a href="' . htmlspecialchars($row["domainproviderlink"]) .'" target="_blank" class="font-weight-bold">' . htmlspecialchars($row["domanprovider"]) .'</a></td>
<td><a href="http://' . htmlspecialchars($row["deviceip"]) . ':' . htmlspecialchars($row["port"]) . '" target="_blank" class="btn btn-info btn-sm btn-icon-split font-weight-bold">
<span class="icon text-white-50">
<i class="fas fa-search"></i>
</span>
<span class="text">Visit Port in Browser</span>
</a>
<a href="#" class="btn btn-warning btn-sm btn-icon-split" data-toggle="modal" data-target="#editModal-' . htmlspecialchars($row["id"]) . '">
<span class="icon text-white-50">
<i class="fas fa-eraser"></i>
</span>
<span class="text">Edit</span>
</a>
<form class="vanilla" action="actions/deleteEntry.php" method="post">
<input type="hidden" name="csrf_token" value="<?php echo generate_token();?>" />
<button type="submit" class="btn btn-danger btn-sm btn-icon-split" id="id" name="id" value="' . htmlspecialchars($row["id"]) . '">
<span class="icon text-white-50">
<i class="fas fa-trash"></i>
</span>
<span class="text">Delete</span>
</button>
</form>
<form class="vanilla" action="actions/copyEntry.php" method="post">
<input type="hidden" name="csrf_token" value="<?php echo generate_token();?>" />
<button class="btn btn-primary btn-sm btn-icon-split" id="id" name="id" value=' . htmlspecialchars($row["id"]) . '>
<span class="icon text-white-50">
<i class="fas fa-copy"></i>
</span>
<span class="text">Copy</span>
</button>
</form>
</td>
</tr>
';
}
?>