From 78f3ea783394dba14b51b27f7f2db3974ce8b8b3 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Fri, 13 Apr 2012 09:29:08 +1000 Subject: View IP adress page, ban form. --- inc/mod/ban.php | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 inc/mod/ban.php (limited to 'inc/mod/ban.php') diff --git a/inc/mod/ban.php b/inc/mod/ban.php new file mode 100644 index 00000000..236b2b14 --- /dev/null +++ b/inc/mod/ban.php @@ -0,0 +1,77 @@ +bindValue(':ip', $mask); + $query->bindValue(':mod', $mod['id']); + if ($reason !== '') + $query->bindValue(':reason', $reason); + else + $query->bindValue(':reason', null, PDO::PARAM_NULL); + + if ($length > 0) + $query->bindValue(':expires', time() + $length); + else + $query->bindValue(':expires', null, PDO::PARAM_NULL); + + if ($board) + $query->bindValue(':board', $board); + else + $query->bindValue(':board', null, PDO::PARAM_NULL); + + $query->execute() or error(db_error($query)); +} -- cgit v1.3