summaryrefslogtreecommitdiff
path: root/inc/mod/pages.php
diff options
context:
space:
mode:
authorMichael Save <savethenternet@tinyboard.org>2013-03-16 18:27:24 +1100
committerMichael Save <savethenternet@tinyboard.org>2013-03-16 18:27:24 +1100
commit64ae123739c39567447bfc16fc95deb556786671 (patch)
treecc0abc28878bb0382c547c338c5f10eee7fc0a22 /inc/mod/pages.php
parent1816218c64da5881c681808893ce8a9dc7eb54db (diff)
Mod log in ?/IP (ie. ban history)
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']);
}