-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.php
54 lines (48 loc) · 1.08 KB
/
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
49
50
51
52
53
54
<?php
include("lib/common.php");
if($loguser['powerlevel'] < 1)
Kill("Access denied.");
//$here = "http://helmet.kafuka.org/nikoboard";
$full = GetFullURL();
$here = substr($full, 0, strrpos($full, "/"))."/";
$there = "./"; //"/";
$logR = Query("select * from reports order by time desc");
while($item = Fetch($logR))
{
//print $item['text'];
$blar = $item['text'];
$blar = htmlspecialchars($blar);
$blar = str_replace("[g]", "", $blar);
$blar = str_replace("[b]", "", $blar);
$blar = str_replace("[/]", "", $blar);
$blar = str_replace("->", "→", $blar);
//$blar = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\">\\0</a>", $blar);
$blar = str_replace($here, $there, $blar);
$cellClass = ($cellClass + 1) % 2;
$log .= format(
"
<tr>
<td class=\"cell2\">
{1}
</td>
<td class=\"cell{0}\">
{2}
</td>
</tr>
", $cellClass, str_replace(" ", " ", TimeUnits(time() - $item['time'])), $blar);
}
write(
"
<table>
<tr class=\"header1\">
<th>
Time
</th>
<th>
Event
</th>
</tr>
{0}
</table>
", $log);
?>