the banned IP * 'reason' => why the IP was banned * 'date' => when the ban started * 'end' => when the ban will end * ) */ public function display_bans(Page $page, $bans) { global $database, $user; $h_bans = ""; $prefix = ($database->get_driver_name() == DatabaseDriver::SQLITE ? "bans." : ""); foreach ($bans as $ban) { $h_bans .= " {$ban[$prefix.'ip']} {$ban[$prefix.'reason']} {$ban['banner_name']} ".substr($ban[$prefix.'added'], 0, 10)." ".substr($ban[$prefix.'expires'], 0, 10)." {$ban['mode']} ".make_form(make_link("ip_ban/remove"))." "; } $today = date('Y-m-d'); $html = " Show All Active / Show EVERYTHING

".make_form(make_link("ip_ban/list/1"), "GET")." $h_bans ".make_form(make_link("ip_ban/add"))."
IPReasonByFromUntilTypeAction
{$user->name} {$today} block
"; $page->set_title("IP Bans"); $page->set_heading("IP Bans"); $page->add_block(new NavBlock()); $page->add_block(new Block("Edit IP Bans", $html)); } }