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 = ""; $n = 0; $prefix = ($database->engine->name == "sqlite" ? "bans." : ""); $prefix2 = ($database->engine->name == "sqlite" ? "users." : ""); foreach($bans as $ban) { $end_human = date('Y-m-d', $ban[$prefix.'end_timestamp']); $h_bans .= " {$ban[$prefix.'ip']} {$ban[$prefix.'reason']} {$ban['banner_name']} {$end_human} ".make_form(make_link("ip_ban/remove"))." "; } $html = " Show All

$h_bans ".make_form(make_link("ip_ban/add"))."
IPReasonByUntilAction
{$user->name}
"; $page->set_title("IP Bans"); $page->set_heading("IP Bans"); $page->add_block(new NavBlock()); $page->add_block(new Block("Edit IP Bans", $html)); } } ?>