diff --git a/mod.php b/mod.php index 02208713..df3cf528 100644 --- a/mod.php +++ b/mod.php @@ -268,40 +268,67 @@ 'mod'=>true ) ); - } elseif(preg_match('/^\/log$/', $query)) { + } elseif(preg_match('/^\/log(\/(\d+))?$/', $query, $match)) { if(!hasPermission($config['mod']['modlog'])) error($config['error']['noaccess']); + $page = isset($match[2]) ? $match[2] : 1; + $boards = Array(); $_boards = listBoards(); foreach($_boards as &$_b) { $boards[$_b['id']] = $_b['uri']; } - $body = '
' . _('User') . ' | ' . _('IP address') . ' | ' . _('Ago') . ' | ' . _('Board') . ' | ' . _('Action') . ' |
---|
' . _('User') . ' | ' . + '' . _('IP address') . ' | ' . + '' . _('Ago') . ' | ' . + '' . _('Board') . ' | ' . + '' . _('Action') . ' | ' . + '
---|---|---|---|---|
' . $log['username'] . ' | ' . - '' . $log['ip'] . ' | ' . - '' . ago($log['time']) . ' | ' . - '' . - ($log['board'] ? - (isset($boards[$log['board']]) ? - '' . sprintf($config['board_abbreviation'], $boards[$log['board']]) . ' | ' - : 'deleted?') - : '-') . - '' . $log['text'] . ' | ' . - '
' . + ($log['username'] ? + '' . $log['username'] . '' + : 'deleted?') . + ' | ' . + '' . $log['ip'] . ' | ' . + '' . ago($log['time']) . ' | ' . + '' . + ($log['board'] ? + (isset($boards[$log['board']]) ? + '' . sprintf($config['board_abbreviation'], $boards[$log['board']]) . ' | ' + : 'deleted?') + : '-') . + '' . $log['text'] . ' | ' . + '
'; + for($x = 0; $x < $count['count'] / $config['mod']['modlog_page']; $x ++) { + $body .= '[' . ($x + 1) . '] '; + } + $body .= '
'; + } echo Element('page.html', Array( 'config'=>$config,