forked from esjoo/SchedLab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.php
28 lines (25 loc) · 803 Bytes
/
log.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
<link rel="stylesheet" href="style/protocol.css">
<?php
include "header.php";
include "db.php";
?>
<h1 id="demofont3">Log Records</h1>
<div class="color">
<table>
<tr><th><h6 id="demofont4">Time</h6></th><th><h6 id="demofont4">User</h6></th><th><h6 id="demofont4">Action</h6></th></tr>
<?php
$sql = "SELECT logs.Timestamp, users.UserName, logs.Action
FROM logs
LEFT JOIN users
ON logs.UserAction=users.UserID
ORDER BY logs.Timestamp";
$result = mysqli_query($conn, $sql);
// Show action
while ($row = mysqli_fetch_row($result)) {
echo "<tr><th>".$row[0]."</th><th>".$row[1]."</th><th>".$row[2]."</th></tr>";
}
?>
</table>
<?php
include "closeDB.php";
?>