$pagetitle = "Erreur";
     $msg = "Aucun identifiant saisie";
     break;
 }
 $data = ModelUsers::getId(array("mail" => myGet('mail')));
 if (COUNT(ModelUsers::selectWhere($data)) == 0) {
     $view = "error";
     $pagetitle = "Erreur";
     $msg = "L'utilisateur n'existe pas";
     break;
 }
 $u = ModelUsers::select($data);
 $i = $u->idUser;
 $m = $u->mail;
 $pwd = $u->password;
 if (is_null(myGet('mail') || is_null(myGet('ConnectPassword'))) || $pwd != hash('sha256', myGet('ConnectPassword') . Conf::getSeed())) {
     $m = "";
     $ConnectPassword = "";
     $submit = "Connexion";
     $act = "connected";
     $label = "Mauvais mot de passe";
     $view = "connect";
     $pagetitle = "Connection";
     break;
 }
 $admini = ModelUsers::isAdmin($data);
 $logValide = ModelUsers::selectWhere($data);
 if (COUNT($logValide) == 1) {
     $_SESSION['mail'] = myGet('mail');
     $_SESSION['ConnectPassword'] = myGet('ConnectPassword');
     if (COUNT($admini) != 0) {
     $login = $_GET['login'];
     // Chargement de la vue
     $view = 'done';
     $doned = 'supprimé';
     $pagetitle = "Suppression de " . $_GET['login'] . " effectuée";
     break;
 case "connect":
     $l = "";
     $mdp = "";
     $view = 'connect';
     break;
 case "connected":
     $data = array('login' => $_GET['log'], 'mdp' => hash('sha256', Conf::getSeed() . $_GET['mdp']));
     if (count(ModelUtilisateur::selectWhere($data)) == 1) {
         $_SESSION['log'] = $_GET['log'];
         $_SESSION['mdp'] = hash('sha256', Conf::getSeed() . $_GET['mdp']);
     } else {
         $view = 'error';
         $pagetitle = 'Erreur avec l\'utilisateur';
         $raison = "login ou mot de passe invalide";
         break;
     }
     // Initialisation des variables pour la vue
     if (Session::is_user('admin')) {
         $controller = 'utilisateur';
         $pagetitle = 'Liste des utilisateurs';
         $view = 'list';
     } else {
         $controller = 'game';
         $pagetitle = 'Liste des jeux';
         $view = 'all';