-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogs.php
50 lines (41 loc) · 1001 Bytes
/
logs.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
<?php
require_once "class_list.php";
$log = isset($_GET['log']) ? $_GET['log'] : "err";
?>
<html>
<head>
<title>Logs viewer</title>
<style>
body {
background-color: #000;
color: #FFFFFF;
font-family: Consolas, Monaco, Lucida Console, monospace;
font-size: 12px;
}
.log {
margin: 5px;
padding: 5px;
float: left;
white-space: pre;
overflow-x: hidden;
}
h3 {
margin: 0;
padding: 0;
}
</style>
<script type="application/javascript">
setTimeout(function () { document.location = document.location; }, 2000);
</script>
</head>
<body>
<h1>Logs viewer</h1>
<div class="log"><h3><?php echo $log ?></h3><?php
$contents = Logger::getLog($log);
$lines = array_reverse(explode("\n", $contents));
foreach($lines as $line) {
echo "$line\n";
}
?></div>
</body>
</html>