unban(); else if ($ip_user) unban_ip($ip_user->address()); } else { if ($user) $user->ban(); else if ($ip_user) ban_ip($ip_user->address()); } goto_back_link(); exit; } else { if (isset($_GET["p"])) { try { $pid = (int)safe_get("p"); $post = get_single_post($pid); } catch(post_not_found $e) { // ignore } } } if ($user != null && $user->is_anonymous()) throw new bad_parameters(); forward_back_link(); } catch(user_not_found $e) { $error = "user not found"; } output_head("", loc("cp_ban_title")); ?>