/** * * @return \ActionsAdminProfil */ public static function getInstance() { if (self::$instance === false) { self::$instance = new ActionsAdminProfil(); } return self::$instance; }
require_once "auth.php"; require_once "../fonctions/divers.php"; if (!est_autorise("acces_configuration")) { exit; } $request = \Symfony\Component\HttpFoundation\Request::createFromGlobals(); $currentProfil = new ProfilAdmin(); $currentProfil->charger_id($request->get("profil", 0)); if (!$currentProfil->id) { $currentProfil->chargerPermier(array(ProfilAdmin::ID_PROFIL_SUPERADMINISTRATEUR)); } $currentProfilDesc = new Profildesc(); $currentProfilDesc->charger($currentProfil->id); try { ActionsAdminProfil::getInstance()->action($request); } catch (TheliaAdminException $e) { $errorCode = $e->getCode(); if ($errorCode == TheliaAdminException::BAD_PROFILE_FORMULATION) { $addError = 1; } } ?> <!DOCTYPE html> <html lang="fr"> <head> <?php require_once "title.php"; ?> </head> <body>