summaryrefslogtreecommitdiff
path: root/inc/mod/pages.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/mod/pages.php')
-rw-r--r--inc/mod/pages.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 4d588030..db51324a 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -600,6 +600,15 @@ function mod_page_ip($ip) {
$args['notes'] = $query->fetchAll(PDO::FETCH_ASSOC);
}
+ if (hasPermission($config['mod']['modlog_ip'])) {
+ $query = prepare("SELECT `username`, `mod`, `ip`, `board`, `time`, `text` FROM `modlogs` LEFT JOIN `mods` ON `mod` = `mods`.`id` WHERE `text` LIKE :search ORDER BY `time` DESC LIMIT 20");
+ $query->bindValue(':search', '%' . $ip . '%');
+ $query->execute() or error(db_error($query));
+ $args['logs'] = $query->fetchAll(PDO::FETCH_ASSOC);
+ } else {
+ $args['logs'] = array();
+ }
+
mod_page(sprintf('%s: %s', _('IP'), $ip), 'mod/view_ip.html', $args, $args['hostname']);
}