Пример #1
0
 public function __construct()
 {
     parent::__construct();
 }
 public function deleteFormation()
 {
     if (isset($_GET['idFormation'])) {
         $infosUser = new UserDAO();
         $infos = $infosUser->getInfoUser($_SESSION['idUser']);
         if ($infos['type'] == 'Admin') {
             $formationController = new FormationController();
             $formationController->deleteFormation($_GET['idFormation']);
             $_SESSION['success'] = 'La formation a bien été supprimée';
             $_SESSION['display_msg_success'] = true;
             $this->profile();
         } else {
             $_SESSION['error'] = 'Vous n\'avez pas les droits requis pour accéder à cette page';
             $_SESSION['display_msg_error'] = true;
             $this->profile();
         }
     } else {
         $_SESSION['error'] = '[9] La page n\'existe pas';
         $_SESSION['display_msg_error'] = true;
         $this->profile();
     }
 }