posts_delete(posts_check_id($_POST['post'])); } elseif (isset($_POST['del_all'])) { posts_delete_last(posts_check_id($_POST['post']), date(Config::DATETIME_FORMAT, time() - 60 * 60)); } } } // Delete bans. foreach ($bans as $ban) { if (isset($_POST['delete_' . $ban['id']])) { bans_delete_by_id($ban['id']); $reload_bans = true; } } // Unban specified ip. if (isset($_POST['unban']) && $_POST['unban'] !== '') { $ip = bans_check_range_beg($_POST['unban']); if ($ip === FALSE) { // Cleanup. DataExchange::releaseResources(); Logging::close_log(); display_error_page($smarty, kotoba_last_error()); exit(1); } bans_delete_by_ip($ip); $reload_bans = true; } } if ($reload_bans) { $bans = bans_get_all(); } $bans_decoded = array();
session_destroy(); exit(1); } // Check permission and write message to log file. $is_admin = FALSE; if (is_admin()) { $is_admin = TRUE; } elseif (!is_mod()) { // Cleanup. DataExchange::releaseResources(); display_error_page($smarty, new NotModError()); exit(1); } call_user_func(Logging::$f['HARD_BAN_USE']); if (isset($_POST['new_range_beg']) && isset($_POST['new_range_end'])) { $new_range_beg = bans_check_range_beg($_POST['new_range_beg']); if ($new_range_beg === FALSE) { // Cleanup. DataExchange::releaseResources(); Logging::close_log(); display_error_page($smarty, kotoba_last_error()); exit(1); } $new_range_end = bans_check_range_end($_POST['new_range_end']); if ($new_range_end === FALSE) { // Cleanup. DataExchange::releaseResources(); Logging::close_log(); display_error_page($smarty, kotoba_last_error()); exit(1); }