You are not authorized to view this page. Please
login as an admin.
';
require_once 'footer.php';
exit;
}
// Fetch users from the database
$pdo = db();
$stmt = $pdo->query('SELECT id, name, email, role, created_at FROM users ORDER BY created_at DESC');
$users = $stmt->fetchAll(PDO::FETCH_ASSOC);
include 'sidebar.php';
?>