diff --git a/src/.htaccess b/src/.htaccess index 94a2b2f..27e9040 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -15,4 +15,4 @@ RewriteRule ^inscription$ index.php?action=redirectionInscription [L] RewriteRule ^VueListePublic$ index.php?action=redirectionListePublic [L] RewriteRule ^logout$ index.php?action=logout [L] RewriteRule ^MonProfil$ index.php?action=redirectionProfil [L] -RewriteRule ^supprimerCompte$ index.php?action=supprimerCompte [L] \ No newline at end of file +RewriteRule ^supprimerCompte$ index.php?action=supprimerCompte [L] diff --git a/src/controller/FrontControleur.php b/src/controller/FrontControleur.php index 31a8138..2ea2737 100644 --- a/src/controller/FrontControleur.php +++ b/src/controller/FrontControleur.php @@ -2,9 +2,10 @@ class FrontControleur { function __construct(){ + global $rep,$vues; session_start(); try { - global $rep,$vues; + $string_actor=' '; $listeActions=array( 'Utilisateur' => array('logout','redirectionProfil','supprimerCompte'), @@ -38,6 +39,12 @@ class FrontControleur { } catch (Exception $e) { $dVueEreur[] = "Erreur inattendue!!! "; require ($rep.$vues['erreur']); + } catch (PDOException $e) + { + //si erreur BD, pas le cas ici + $dVueErreur[] = "Erreur: Connexion a la base de données impossible! "; + require ($rep.$vues['erreur']); + } } diff --git a/src/modele/MdlUtilisateur.php b/src/modele/MdlUtilisateur.php index 528c794..963f054 100644 --- a/src/modele/MdlUtilisateur.php +++ b/src/modele/MdlUtilisateur.php @@ -51,27 +51,4 @@ class MdlUtilisateur MdlUtilisateur::déconnexion(); } - public static function RecupererListePublic(){ - $userGtw = new ListeGateway(); - return $userGtw->getListePublic(0,10); - } - - public static function RecupererTache(){ - $userGtw = new TacheGateway(); - - return $userGtw->getTache(); - } - - public static function SupprimerTache(string $id){ - $userGtw = new TacheGateway(); - - return $userGtw->Supprimer($id); - } - - public static function SupprimerListe(string $id){ - $userGtw = new ListeGateway(); - - return $userGtw->Supprimer($id); - } - } diff --git a/src/modele/MdlVisiteur.php b/src/modele/MdlVisiteur.php index b5a2bdb..4a3b07f 100644 --- a/src/modele/MdlVisiteur.php +++ b/src/modele/MdlVisiteur.php @@ -10,12 +10,12 @@ class MdlVisiteur public static function CreerUtilisateur(){ global $dVueEreur; $userGtw = new UtilisateurGateway(); - Validation::val_form_user($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["password-Form"],$_POST["mail-Form"],$dVueEreur); - $hash = password_hash($_POST["password-Form"], PASSWORD_DEFAULT); + Validation::val_form_user($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["password"],$_POST["mail"],$dVueEreur); + $hash = password_hash($_POST["password"], PASSWORD_DEFAULT); // if(count($dVueEreur)!=0){ // return null; // } - $userGtw->AjouterUtilisateur($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["mail-Form"],$hash); + $userGtw->AjouterUtilisateur($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["mail"],$hash); } public static function RecupererListePublic(){ diff --git a/src/vue/html/NavBar.php b/src/vue/html/NavBar.php index 4848b29..21cf3c7 100644 --- a/src/vue/html/NavBar.php +++ b/src/vue/html/NavBar.php @@ -1,38 +1,51 @@
+ +
diff --git a/src/vue/html/PageListePublic.php b/src/vue/html/PageListePublic.php index a5218d8..987faf9 100644 --- a/src/vue/html/PageListePublic.php +++ b/src/vue/html/PageListePublic.php @@ -14,8 +14,10 @@ - - + +
+
+
diff --git a/src/vue/html/inscription.php b/src/vue/html/inscription.php index fa40c52..f9c2070 100644 --- a/src/vue/html/inscription.php +++ b/src/vue/html/inscription.php @@ -38,10 +38,10 @@
- +
- +
diff --git a/src/vue/html/login.php b/src/vue/html/login.php index 10d4323..ed8db71 100644 --- a/src/vue/html/login.php +++ b/src/vue/html/login.php @@ -25,7 +25,7 @@ if(isset($ErreurLog)){?>

+ ?>
mail