prepare('SELECT isAdmin FROM users WHERE UserId = :userId LIMIT 1'); $stmt->execute([':userId' => $userId]); $row = $stmt->fetch(PDO::FETCH_ASSOC); if ($row && isset($row['isAdmin'])) { $adminLevel = (int)$row['isAdmin']; } function requireAdminLevel(int $requiredLevel, int $actualLevel) { if ($actualLevel < $requiredLevel) { header("Location: /home"); exit(); } } if ($adminLevel === 0 && stripos($currentPage, 'home') === false) { header('Location: /home'); exit(); } ?> Afterworld CSM
Customer Moderation Panel
Hi (go back) | (logout)