prepare("SELECT pseudo, perm FROM admin WHERE id = ?"); $req_user->execute(array($_SESSION['id'])); $user_exist = $req_user->rowcount(); $user = $req_user->fetch(); } else { $user_exist = 0; } echo ''; if($user_exist != 1) { if($page != "index") { header('Location: index.php'); } } else { $content = '
  • Index
  • ' .'
  • Stats
  • '; switch ($user['perm']) { case 1: $content = $content."
  • Com'ville
  • " ."
  • Com'Photo
  • "; break; case 2: $content = $content ."
  • Com'ville
  • " .'
  • Planning
  • ' ."
  • Com'Photo
  • "; break; case 3: $content = $content ."
  • Com'ville
  • " ."
  • Planning
  • " ."
  • Com'Photo
  • " ."
  • Mots croises
  • " ."
  • Gestion des accès
  • " ."
  • Enigma
  • " ."
  • Matomo
  • " ."
  • /!\DANGER ZONE/!\
  • "; break; } $content = $content.'
  • Se déconnecter
  • '; } ?>