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']); $oe = ($n++ % 2 == 0) ? "even" : "odd"; $h_bans .= "
IP | Reason | By | Until | Action |
---|---|---|---|---|
{$user->name} |