-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystem_log.php
executable file
·49 lines (42 loc) · 1.44 KB
/
system_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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
require("template/header.php");
echo "<div class='newsbox'>";
echo "<div class='newstitle'>System Log</div>";
echo "<div class='newscontent'>";
if ($theSentry->login())
{
if ($theSentry->hasPermission(1))
{
// Display current log
$log_data = $theDB->fetchQuery("select distinct s.time,u.username,s.message from system_log s,users u where s.user_id = u.user_id order by s.log_id DESC");
if (!$log_data)
{
echo 'No log entries<br/>'.$theDB->lastError();
}
else
{
print "<table width=100%>";
for ($i=0; $i<count($log_data); $i++)
{
print "<tr>";
print "<td style='border:1px solid #999999; background:#eeeeee;' width=20%>".$log_data[$i]['time']."</td>";
print "<td style='border:1px solid #999999; background:#eeeeee;' width=10%>".$log_data[$i]['username']."</td>";
print "<td style='border:1px solid #999999; background:#eeeeee;' width=70%>".$log_data[$i]['message']."</td>";
print "</tr>";
}
print "</table>";
}
}
else
{
echo "Sorry - you don't have permission to view this page";
}
}
else
{
echo "You need to be logged in to view this page - use the links above...";
}
// End the page
echo "</div></div>";
require("template/footer.html");
?>