This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/contrib/event_log/theme.php
shish 0c2ed967f8 event log extension
git-svn-id: file:///home/shish/svn/shimmie2/trunk@469 7f39781d-f577-437e-ae19-be835c7a54ca
2007-08-23 18:49:59 +00:00

37 lines
858 B
PHP

<?php
class EventLogTheme extends Themelet {
public function display_page($page, $events) {
$page->set_title("Event Log");
$page->set_heading("Event Log");
$page->add_block(new NavBlock());
$table = "
<style>
.event_log_table TD {
font-size: 0.5em;
}
.event_log_table TD.entry {
text-align: left;
}
</style>
<table border='1' class='event_log_table'>
<tr><th>ID</th><th>User</th><th>IP</th><th>Date</th><th>Event</th><th>Entry</th></tr>
";
foreach($events as $event) {
$table .= "
<tr>
<td>{$event['id']}</td>
<td>{$event['owner_id']}</td>
<td>{$event['owner_ip']}</td>
<td>{$event['date']}</td>
<td>{$event['event']}</td>
<td class='entry'>{$event['entry']}</td>
</tr>
";
}
$table .= "</table>";
$page->add_block(new Block("Log Contents", $table));
}
}
?>