Compare commits

..

27 Commits

Author SHA1 Message Date
Emre KARTAL ef76d0c267 Clean code
2 years ago
Emre KARTAL 643da050ce Fixed pagination error 🐛
2 years ago
Emre KARTAL 56b2dbc22b Fixed README.md file and performed database export, probably the last push ever
2 years ago
Emre KARTAL f721a028c8 Optimization of the code and respect of the coding standard, the project is finished
2 years ago
Emre KARTAL e2bd0457ab Fixed all issues
2 years ago
Rayhân HASSOU 09bfc508d4 next et previous page liste prive, réglages bug
2 years ago
Rayhân HASSOU 4ddfc272e5 next et previous page liste prive, réglages bug
2 years ago
Emre KARTAL b7cf2744b8 README completed and Admin finished
2 years ago
Rayhân HASSOU 786b0addfb modification et correction de bug
2 years ago
Rayhân HASSOU a60f4d6d84 ajout liste prive
2 years ago
Emre KARTAL da609c6f81 Cookie for the pagination done, improvement of the visual and css for a task done
2 years ago
Emre KARTAL 82c7a9fc22 Cookie for pagination done (some small issue though) and profile page finished, also I made the views code cleaner
2 years ago
Rayhân HASSOU 10af9c567b Merge reussi : réglage des conflits. Nouvelles fonctionnalités : Ajout,Edition d'une liste; Ajout d'une tache
2 years ago
Rayhân HASSOU 0dbc9d274e ajout liste
2 years ago
Rayhân HASSOU 9419d45429 ajout liste
2 years ago
Rayhân HASSOU cd5b95f364 ajouter tache et modifier liste marche
2 years ago
Emre KARTAL bef27714ca Management of errors during registration (unique nickname, unique email, verification of special characters, size of name and first name more than 3 letters...)
2 years ago
Rayhân HASSOU 2f4af55635 ajout progress bar + erreur bd
2 years ago
Emre KARTAL 7bc62f2ba7 Realization of a logout pop-up in javascript and automatic connection during registration
2 years ago
Emre KARTAL 9b611a7cc5 Logout, user profile page and deletion of their account have been done, also the generic front controller now works perfectly
2 years ago
Emre KARTAL 78b18d3825 Revert "Logout, user profile page and deletion of their account have been done, also the generic front controller now works perfectly"
2 years ago
Emre KARTAL 89d9495929 Revert "Logout, user profile page and deletion of their account have been done, also the generic front controller now works perfectly"
2 years ago
Emre KARTAL 1bc41c7880 Logout, user profile page and deletion of their account have been done, also the generic front controller now works perfectly
2 years ago
Emre KARTAL 6fddf5a462 [200~Logout, user profile page and deletion of their account have been done, also the generic front controller now works perfectly
2 years ago
Emre KARTAL 1996c6f195 The connection as a user works and also the error management in case of bad password or identifier
2 years ago
Emre KARTAL eb24736d32 Small push, improvement of the visual of the "erreur.php" and "PageListPublic.php" pages
2 years ago
Rayhân HASSOU c7ad29522d Merge pull request 'rayhan_affichage' (#11) from rayhan_affichage into master
2 years ago

@ -1,7 +1,9 @@
# Presentation Projet_ToDoList_Php
<div align = center>
![Image de l'application](Logo.png)
</div>
**Nom de lapplication** : ToDoList
@ -16,9 +18,33 @@
:information_source: Réaliser un projet de PHP consistant à faire une To do List, qui contiendra des visiteurs, utilisateurs ou administrateur.
# Repartition du Gitlab
La racine de notre gitlab est composé de deux dossiers essentiels au projet:
# Fonctionnalités
- Visiteur :
- Ajouter/Supprimer une liste publique
- Modifier une liste publique
- Ajouter/Supprimer des tâches dans une liste publique
- Se connecter
- S'inscrire
- Cocher une tâche d'une liste publique
- Utilisateur (en plus des fonctionnalités visiteurs) :
- Ajouter/Supprimer une liste priver
- Modifier ses listes privées
- Ajouter/Supprimer des tâches à ses listes privé
- Voir son profil
- Supprimer son compte (Toutes ces tâches sont aussi supprimées)
- Modifier son mode de passe
- voir ses informations (Nom/Prénom/mail/Nombre de liste privé réalisé)
- Cocher une tâche d'une liste privé
- Administrateur (considérer comme un utilisateur, mais avec des droits en plus) :
- Voir tous les utilisateurs
- Supprimer un utilisateur
# Répartition du Gitlab
La racine de notre gitlab est composée de deux dossiers essentiels au projet:
[**src**](src) : **Toute la partie codage du site web**
@ -44,7 +70,7 @@ Notre environnement de travail se base sur plusieurs outils :
# Technicien en charge de l'application
La composition pour le projet se voit réaliser par deux élèves de l'IUT d'aubière:
La composition pour le projet se voit réaliser par deux élèves de l'IUT d'Aubière:
<br>
⚙️ Emre KARTAL
<br>

@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : mar. 06 déc. 2022 à 22:21
-- Généré le : ven. 16 déc. 2022 à 22:44
-- Version du serveur : 10.5.15-MariaDB-0+deb11u1
-- Version de PHP : 7.4.28
@ -47,6 +47,24 @@ INSERT INTO `MaTable` (`Id`, `Nom`, `Prenom`, `Aigritude`, `Age`) VALUES
-- --------------------------------------------------------
--
-- Structure de la table `ToDoList_Admin`
--
CREATE TABLE `ToDoList_Admin` (
`idAdmin` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Déchargement des données de la table `ToDoList_Admin`
--
INSERT INTO `ToDoList_Admin` (`idAdmin`) VALUES
(50),
(58);
-- --------------------------------------------------------
--
-- Structure de la table `ToDoList_Liste`
--
@ -57,7 +75,7 @@ CREATE TABLE `ToDoList_Liste` (
`description` varchar(200) NOT NULL,
`dateCreation` date NOT NULL,
`estPublic` tinyint(1) NOT NULL,
`idUtilisateur` int(11) NOT NULL
`idUtilisateur` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
@ -65,17 +83,11 @@ CREATE TABLE `ToDoList_Liste` (
--
INSERT INTO `ToDoList_Liste` (`id`, `nom`, `description`, `dateCreation`, `estPublic`, `idUtilisateur`) VALUES
(2, 'Work', 'Mes tâches d\'octobres !', '2022-12-01', 1, 1),
(3, 'Job', 'J\'aime travailler', '2022-12-05', 1, 1),
(4, 'Fourniture Scolaire', 'Acheter les Fournitures Scolaire avant Septembre', '2022-12-06', 1, 1),
(6, 'Projet Blazor', 'Les tâches que je doit faire pour mon projet Blazor', '2022-12-06', 1, 1),
(7, 'SAE', 'Les tâches à faire pour la SAE', '2022-12-06', 1, 1),
(8, 'Supermarché', 'Acheter les courses au Supermarché', '2022-12-02', 1, 1),
(9, 'Voiture', 'Liste des choses à acheter pour ma voiture', '2022-12-01', 1, 1),
(10, 'Analyse', 'Liste des choses à réviser en analyse', '2022-12-01', 1, 1),
(11, 'Ordinateur', 'Les composants pour mon ordinateur', '2022-12-03', 1, 1),
(13, 'Test List', '', '2022-12-01', 1, 1),
(14, 'Test List 2', 'hahaa', '2022-12-02', 1, 1);
(124, 'Iut', 'Ma liste de devoirs', '2022-12-16', 1, 1),
(125, 'Serie', 'Les series à regarder', '2022-12-16', 1, 1),
(150, 'Fourniture Scolaire', 'Mes fournitures Scolaires à acheter avant septembre', '2022-12-06', 1, NULL),
(155, 'Supermarché', 'Acheter les courses au Supermarché', '2022-12-02', 1, NULL),
(156, 'Ordinateur', 'Les composants pour mon ordinateur', '2022-12-03', 1, NULL);
-- --------------------------------------------------------
@ -97,15 +109,11 @@ CREATE TABLE `ToDoList_Tache` (
--
INSERT INTO `ToDoList_Tache` (`id`, `nom`, `description`, `dateCreation`, `estValide`, `idListe`) VALUES
(1, 'PHP', 'Finir le projet de PHP et les TPs', '2022-12-06', 0, 2),
(2, 'Blazor', 'Finir le projet de Blazor', '2022-12-06', 1, 2),
(3, 'Stage', 'Postuler chez CGI et Apside', '2022-12-06', 0, 3),
(4, 'CV', 'Finir le CV', '2022-12-06', 1, 3),
(5, 'Push', 'rayhan faut penser a push ton taff', '2022-12-06', 0, 6),
(6, 'Etre le goat', 'je suis le goat', '2022-12-06', 0, 7),
(7, 'Acheter le lait ', 'parce que il faut faire comme papa', '2022-12-06', 0, 8),
(8, 'Acheter des stylos', 'parce que Arthur en a pas', '2022-12-06', 0, 4),
(9, 'Réviser prog sys', 'Je suis dans la caca', '2022-12-06', 0, 3);
(139, 'Blazor', 'Finir le projet', '2022-12-16', 0, 124),
(140, 'Sae', 'Faire le rapport', '2022-12-16', 1, 124),
(141, 'Breaking Bad', 'Le top 1', '2022-12-16', 0, 125),
(142, 'The Walking Dead', 'Meme si apres la saison 7 cest pas ouf', '2022-12-16', 0, 125),
(145, 'ProgSys', 'Finir le tp', '2022-12-16', 0, 124);
-- --------------------------------------------------------
@ -127,7 +135,11 @@ CREATE TABLE `ToDoList_Utilisateur` (
--
INSERT INTO `ToDoList_Utilisateur` (`id`, `nom`, `prenom`, `pseudo`, `email`, `motDePasse`) VALUES
(1, 'Kartal', 'Emre', 'Malleo', 'emre.kartal@etu.uca.fr', '0000');
(1, 'Kartal', 'Emre', 'Malleo', 'emre.kartal10@etu.uca.fr', '00000'),
(50, 'Rayhan', 'Hassou', 'rayhan', 'hassourayhan1@gmail.com', '$2y$10$cKfV6KB7siPhwMRbpoS/COMaZQKkYETj.HIQ5YWkrbc5qXo.9jvuK'),
(51, 'Lucas', 'Mielkarek', 'lukaka', 'lucas@gmail.com', '$2y$10$5AlX0WcLx.8r/WCxxcBeuOaeGTzftqk3jn9q2cKMZkft313y2a3.C'),
(57, 'Restitutio', 'Mathieu', 'marestituito', 'Matthieu.RESTITUITO@uca.fr', '$2y$10$RNj8XMe5UDWDuiocwwg.g../8powrKKNpQ1FmPzSBoN9JubfjYrIq'),
(58, 'Admin', 'Prof', 'Admin', 'Matthieu.RESTITUITO@admin.fr', '$2y$10$oE5jSXemC4NrKiQE9EUKYeO1RdTpbeXxj/FaayeVciBQxYdxsmNuW');
--
-- Index pour les tables déchargées
@ -139,26 +151,33 @@ INSERT INTO `ToDoList_Utilisateur` (`id`, `nom`, `prenom`, `pseudo`, `email`, `m
ALTER TABLE `MaTable`
ADD PRIMARY KEY (`Id`);
--
-- Index pour la table `ToDoList_Admin`
--
ALTER TABLE `ToDoList_Admin`
ADD KEY `idAdmin` (`idAdmin`);
--
-- Index pour la table `ToDoList_Liste`
--
ALTER TABLE `ToDoList_Liste`
ADD PRIMARY KEY (`id`),
ADD KEY `idUtilisateur` (`idUtilisateur`);
ADD KEY `ToDoList_Liste_ibfk_1` (`idUtilisateur`);
--
-- Index pour la table `ToDoList_Tache`
--
ALTER TABLE `ToDoList_Tache`
ADD PRIMARY KEY (`id`),
ADD KEY `idListe` (`idListe`);
ADD KEY `ToDoList_Tache_ibfk_1` (`idListe`);
--
-- Index pour la table `ToDoList_Utilisateur`
--
ALTER TABLE `ToDoList_Utilisateur`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `email` (`email`);
ADD UNIQUE KEY `email` (`email`),
ADD UNIQUE KEY `pseudo` (`pseudo`);
--
-- AUTO_INCREMENT pour les tables déchargées
@ -174,35 +193,41 @@ ALTER TABLE `MaTable`
-- AUTO_INCREMENT pour la table `ToDoList_Liste`
--
ALTER TABLE `ToDoList_Liste`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=157;
--
-- AUTO_INCREMENT pour la table `ToDoList_Tache`
--
ALTER TABLE `ToDoList_Tache`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=152;
--
-- AUTO_INCREMENT pour la table `ToDoList_Utilisateur`
--
ALTER TABLE `ToDoList_Utilisateur`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;
--
-- Contraintes pour les tables déchargées
--
--
-- Contraintes pour la table `ToDoList_Admin`
--
ALTER TABLE `ToDoList_Admin`
ADD CONSTRAINT `ToDoList_Admin_ibfk_1` FOREIGN KEY (`idAdmin`) REFERENCES `ToDoList_Utilisateur` (`id`);
--
-- Contraintes pour la table `ToDoList_Liste`
--
ALTER TABLE `ToDoList_Liste`
ADD CONSTRAINT `ToDoList_Liste_ibfk_1` FOREIGN KEY (`idUtilisateur`) REFERENCES `ToDoList_Utilisateur` (`id`);
ADD CONSTRAINT `ToDoList_Liste_ibfk_1` FOREIGN KEY (`idUtilisateur`) REFERENCES `ToDoList_Utilisateur` (`id`) ON DELETE CASCADE;
--
-- Contraintes pour la table `ToDoList_Tache`
--
ALTER TABLE `ToDoList_Tache`
ADD CONSTRAINT `ToDoList_Tache_ibfk_1` FOREIGN KEY (`idListe`) REFERENCES `ToDoList_Liste` (`id`);
ADD CONSTRAINT `ToDoList_Tache_ibfk_1` FOREIGN KEY (`idListe`) REFERENCES `ToDoList_Liste` (`id`) ON DELETE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

@ -10,6 +10,25 @@ RewriteEngine On
# Règles de réécriture d'url
#---------------------------------
# Visiteur
RewriteRule ^login$ index.php?action=redirectionLogin [L]
RewriteRule ^inscription$ index.php?action=redirectionInscription [L]
RewriteRule ^VueListePublic$ index.php?action=redirectionListePublic [L]
RewriteRule ^previousPage$ index.php?action=pagePrécédente [L]
RewriteRule ^nextPage$ index.php?action=pageSuivante [L]
RewriteRule ^check$ index.php?action=check [L]
# Utilisateur
RewriteRule ^logout$ index.php?action=logout [L]
RewriteRule ^MonProfil$ index.php?action=redirectionProfil [L]
RewriteRule ^supprimerCompte$ index.php?action=supprimerCompte [L]
RewriteRule ^listePrive$ index.php?action=listePrive [L]
RewriteRule ^previousPagePrive$ index.php?action=pagePrécédentePrive [L]
RewriteRule ^nextPagePrive$ index.php?action=pageSuivantePrive [L]
RewriteRule ^checkPrive$ index.php?action=checkPrive [L]
# Admin
RewriteRule ^users$ index.php?action=redirectionVueUtilisateur [L]

@ -2,108 +2,103 @@
class Validation {
static function val_form_user(string &$nom, string &$prenom, string &$pseudo, string &$mdp, string &$email, &$dVueEreur) {
static function val_form_user(string &$nom, string &$prenom, string &$pseudo, string &$mdp, string &$email, &$dVueErreur) {
//Vérification Nom
$nom = Validation::cleanString($nom);
$nom = Validation::val_string($nom);
if ($nom == NULL) {
$dVueEreur[] = "Veuillez revoir le nom*";
$dVueErreur['nom'] = "Le nom ne peut pas comporter de caractère spécial*";
}else if(strlen($nom)<3){
$dVueErreur['nom'] = "Le nom doit comporter au moins 3 caractères*";
}
//Vérification Prenom
$prenom = Validation::cleanString($prenom);
$prenom = Validation::val_string($prenom);
if ($prenom == NULL) {
$dVueEreur[] = "Veuillez revoir le prenom*";
$dVueErreur['prenom'] = "Le prenom ne peut pas comporter de caractère spécial*";
}else if(strlen($prenom)<3){
$dVueErreur['prenom'] = "Le prenom doit comporter au moins 3 caractères*";
}
// //Vérification Email
// $prenom = val_mail($prenom,$dVueEreurdVue);
// if ($prenom == NULL) {
// $dVueEreur[] = "Veuillez revoir le mail*";
// }
<<<<<<< HEAD
//Vérification Email
if (!isset($email)||$email=="") {
$dVueEreur[] = "L'email est obligatoire.";
$pseudo="";
$i++;
$email = Validation::val_mail($email);
if ($email == NULL) {
$dVueErreur['mail'] = "Format du mail non-respecter*";
}
if ($email != filter_var($email, FILTER_SANITIZE_STRING))
{
$dVueEreur[] = "Tentative d'injection de code (attaque sécurité)";
$nom="";
$i++;
}
=======
// //Vérification Pseudo
// if (!isset($pseudo)||$pseudo=="") {
// $dVueEreur[] = "pas de pseudo";
// $pseudo="";
// $i++;
// }
// val_string($pseudo,$i,$dVueEreur);
>>>>>>> master
// //Vérification Mot de Passe
// if (!isset($mdp)||$mdp=="") {
// $dVueEreur[] = "pas de mot de passe";
// $mdp="";
// $i++;
// }
<<<<<<< HEAD
//Vérification Pseudo
if (!isset($pseudo)||$pseudo=="") {
$dVueEreur[] = "Le pseudonyme est obligatoire.";
$pseudo="";
$i++;
$pseudo = Validation::val_string($pseudo);
if ($pseudo == NULL) {
$dVueErreur['pseudo'] = "Le pseudo ne peut pas comporter de caractère spécial*";
}else if(strlen($pseudo)<5){
$dVueErreur['pseudo'] = "Le pseudo doit comporter au moins 5 caractères*";
}
val_string($pseudo,$i,$dVueEreur);
//Vérification Mot de Passe
if (!isset($mdp)||$mdp=="") {
$dVueEreur[] = "Veuillez renseignez votre mot de passe.";
$mdp="";
$i++;
if (!preg_match('/^.{5,}$/', $mdp)) {
$dVueErreur['password'] = "Mot de passe trop léger : Plus de 5 caractères minimum !";
}
val_string($mdp,$i,$dVueEreur);
=======
// val_string($mdp,$i,$dVueEreur);
>>>>>>> master
if(count($dVueErreur)>0){
throw new Exception("Erreur lors de l'inscription*");
}
}
// if (!preg_match('/^.{5,}$/', $mdp)) {
// $dVueEreur[] = "Mot de passe trop léger : Plus de 5 caractères minimum !";
// $i++;
// }
// if($i>0){
// return false;
// }
// return true;
static function cleanString(string &$str) {
$str = preg_replace('/[^A-Za-z\-]/', '', $str);
if($str == null || $str == '')
{
return null;
}
return $str;
}
static function cleanPseudo(string &$str) {
$str = preg_replace('/[^A-Za-z\-\^0-9]/', '', $str);
if($str == null || $str == '')
{
return null;
}
return $str;
}
static function cleanString(string &$str) {
$str = preg_replace('/[^A-Za-z\-]/', '', $str);
static function cleanMail(string &$str) {
$str = preg_replace('/[^A-Za-z\-\^0-9\.\@]/', '', $str);
if($str == null || $str == '')
{
<<<<<<< HEAD
$dVueEreur[] = "Tentative d'injection de code (attaque sécurité)";
$str="";
$i++;
=======
return null;
>>>>>>> master
}
return $str;
}
static function val_form_add(string &$nom,string &$description,&$dVueErreur) {
$nom = Validation::cleanText($nom);
if ($nom == NULL) {
$dVueErreur['nom'] = "Veuillez entrer un nom*";
}
$description = Validation::cleanText($description);
if ($description == NULL) {
$dVueErreur['description'] = "Veuillez entrer une description*";
}
if(count($dVueErreur)>0){
throw new Exception("Problème lors de l'ajout");
}
}
static function cleanText(string &$txt) {
$txt = preg_replace('/[^A-Za-z\-\^0-9\ \à\é\^]/', '', $txt);
if($txt == null || $txt == '')
{
return null;
}
return $txt;
}
static function val_mail(string &$mail) {
if(filter_var($mail, FILTER_VALIDATE_EMAIL))
{
@ -112,6 +107,14 @@ class Validation {
return null;
}
static function val_string(string &$str) {
if(filter_var($str, FILTER_SANITIZE_STRING)!=$str)
{
return null;
}
return $str;
}
static function cleanInt(string &$int) {
$int = preg_replace('/[^0-9]/', '', $int);
if($int == null || $int == '')

@ -12,8 +12,10 @@ $dsn='mysql:host=londres.uca.local;dbname=dbemkartal1';
$vues['erreur']='vue/html/erreur.php';
$vues['inscription']='vue/html/inscription.php';
$vues['listPublic']='vue/html/PageListePublic.php';
$vues['listPrive']='vue/html/PageListePrive.php';
$vues['login']='vue/html/login.php';
$vues['NavBar']='vue/html/NavBar.php';
$vues['profil']='vue/html/profil.php';
$vues['users']='vue/html/pageUtilisateur.php';
?>

@ -6,7 +6,7 @@ class CtrlAdmin {
global $rep,$vues;
$dVueEreur = array ();
$dVueErreur = array ();
try{
$action=NULL;
@ -18,28 +18,33 @@ class CtrlAdmin {
case NULL:
$this->($dVueEreur);
$this->ConsulterUtilisateurs($dVueErreur);
break;
case "redirectionVueUtilisateur":
$this->ConsulterUtilisateurs($dVueErreur);
break;
case "SupprimerUtilisateur":
$this->SupprimerUtilisateur($dVueErreur);
break;
default:
$dVueEreur[] = "Erreur d'appel php";
require ($rep.$vues['home']);
$dVueErreur[] = "Erreur d'appel php";
require ($rep.$vues['erreur']);
break;
}
} catch (PDOException $e)
{
//si erreur BD, pas le cas ici
$dVueEreur[] = "Erreur BD!!! ";
$dVueErreur[] = "Erreur BD!!! ";
require ($rep.$vues['erreur']);
}
catch (Exception $e2)
{
$dVueEreur[] = "Erreur inattendue!!! ";
$dVueErreur[] = "Erreur inattendue!!! ";
require ($rep.$vues['erreur']);
}
@ -48,6 +53,19 @@ class CtrlAdmin {
exit(0);
}//fin constructeur
public function ConsulterUtilisateurs(array $dVueErreur){
global $rep,$vues;
$users = MdlAdmin::recupererUtilisateur();
$action=NULL;
require ($rep.$vues['users']);
}
public function SupprimerUtilisateur(array $dVueErreur){
global $rep,$vues;
$users = MdlAdmin::supprimerUtilisateur();
$this->ConsulterUtilisateurs($dVueErreur);
}
}//fin class
?>

@ -6,7 +6,7 @@ class CtrlUtilisateur {
global $rep,$vues;
$dVueEreur = array ();
$dVueErreur = array ();
try{
$action=NULL;
@ -16,30 +16,78 @@ class CtrlUtilisateur {
switch($action) {
case NULL:
$this->($dVueEreur);
$this->ConsulterListePrive($dVueErreur);
break;
case "logout":
$this->SeDeconnecter($dVueErreur);
break;
case "redirectionProfil":
$this->redirectionProfil($dVueErreur);
break;
case "supprimerCompte":
$this->supprimerCompte($dVueErreur);
break;
case "modifMdp":
$this->changerMotDePasse($dVueErreur);
break;
case "listePrive":
$this->ConsulterListePrive($dVueErreur);
break;
case "SupprimerTachePrive":
$this->SupprimerTachePrive($dVueErreur);
break;
case "AjouterTachePrive":
$this->AjouterTachePrive($dVueErreur);
break;
case "ModifierListePrive":
$this->ModifierListePrive($dVueErreur);
break;
case "checkPrive":
$this->checkPrive($dVueErreur);
break;
case "AjouterListePrive":
$this->AjouterListePrive($dVueErreur);
break;
case "SupprimerListePrive":
$this->SupprimerListePrive($dVueErreur);
break;
case "pagePrécédentePrive":
$this->listePrécédente($dVueErreur);
break;
case "pageSuivantePrive":
$this->listeSuivante($dVueErreur);
break;
default:
$dVueEreur[] = "Erreur d'appel php";
require ($rep.$vues['home']);
$dVueErreur[] = "Erreur d'appel php";
require ($rep.$vues['erreur']);
break;
}
} catch (PDOException $e)
{
//si erreur BD, pas le cas ici
$dVueEreur[] = "Erreur BD!!! ";
$dVueErreur[] = "Erreur BD!!! ";
require ($rep.$vues['erreur']);
}
catch (Exception $e2)
{
$dVueEreur[] = "Erreur inattendue!!! ";
$dVueErreur[] = "Erreur inattendue!!! ";
require ($rep.$vues['erreur']);
}
@ -48,6 +96,133 @@ class CtrlUtilisateur {
exit(0);
}//fin constructeur
function SeDeconnecter(array $dVueErreur){
global $rep,$vues;
MdlUtilisateur::déconnexion();
$action=NULL;
require ($rep.$vues['login']);
}
function redirectionProfil(array $dVueErreur){
global $rep,$vues;
$action=NULL;
$user=MdlUtilisateur::isConnected();
$nombreListe=MdlUtilisateur::recupererNombreDeListe();
require ($rep.$vues['profil']);
}
function supprimerCompte(array $dVueErreur){
global $rep,$vues;
$action=NULL;
MdlUtilisateur::suppressionUtilisateur();
require ($rep.$vues['login']);
}
function changerMotDePasse(array $dVueErreur){
global $rep,$vues;
try{
MdlUtilisateur::changerMotDePasse();
$action=NULL;
require ($rep.$vues['login']);
}
catch(Exception $e)
{
$dVueErreur[] = $e->getMessage();
require ($rep.$vues['erreur']);
}
}
function ConsulterListePrive(array $dVueErreur) {
global $rep,$vues;
$listesPrive = MdlUtilisateur::RecupererListePrive();
$taches = MdlUtilisateur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPrive']);
}
function SupprimerTachePrive(array $dVueErreur){
global $rep,$vues;
$tache = MdlUtilisateur::SupprimerTache();
$this->ConsulterListePrive($dVueErreur);
}
function SupprimerListePrive(array $dVueErreur){
global $rep,$vues;
$liste = MdlUtilisateur::SupprimerListe();
$this->ConsulterListePrive($dVueErreur);
}
public function AjouterTachePrive(array $dVueErreur){
global $rep,$vues;
try{
$tache = MdlUtilisateur::AjouterTache($dVueErreur);
$this->ConsulterListePrive($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
$listesPrive= MdlUtilisateur::RecupererListePrive();
$taches = MdlUtilisateur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPrive']);
}
}
public function ModifierListePrive(array $dVueErreur){
global $rep,$vues;
try{
$tache = MdlUtilisateur::ModifierListe($dVueErreur);
$this->ConsulterListePrive($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
$listesPrive= MdlUtilisateur::RecupererListePrive();
$taches = MdlUtilisateur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPublic']);
}
}
public function checkPrive(array $dVueErreur)
{
global $rep,$vues;
$tache = MdlUtilisateur::check();
$this->ConsulterListePrive($dVueErreur);
}
public function AjouterListePrive(array $dVueErreur){
global $rep,$vues;
try{
$tache = MdlUtilisateur::AjouterListePrive($dVueErreur);
$this->ConsulterListePrive($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
$listes = MdlUtilisateur::RecupererListePrive();
$taches = MdlUtilisateur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPrive']);
}
}
public function listePrécédente(array $dVueErreur){
if($_SESSION['pageUser'] > 1){
$_SESSION['pageUser']=$_SESSION['pageUser']-1;
}
$this->ConsulterListePrive($dVueErreur);
}
public function listeSuivante(array $dVueErreur){
$_SESSION['pageUser']=$_SESSION['pageUser']+1;
$this->ConsulterListePrive($dVueErreur);
}
}//fin class
?>

@ -6,7 +6,7 @@ class CtrlVisiteur {
global $rep,$vues;
$dVueEreur = array ();
$dVueErreur = array ();
try{
$action=NULL;
@ -18,54 +18,78 @@ class CtrlVisiteur {
//pas d'action, on réinitialise 1er appel
case NULL:
$this->ConsulterListePublic($dVueEreur);
$this->ConsulterListePublic($dVueErreur);
break;
case "validationFormulaire":
$this->ValidationFormulaire($dVueEreur);
$this->ValidationFormulaire($dVueErreur);
break;
case "seConnecter":
$this->seConnecter($dVueEreur);
$this->seConnecter($dVueErreur);
break;
case "redirectionListePublic":
$this->ConsulterListePublic($dVueEreur);
$this->ConsulterListePublic($dVueErreur);
break;
case "redirectionLogin":
$this->redirectionLogin($dVueEreur);
$this->redirectionLogin($dVueErreur);
break;
case "redirectionInscription":
$this->redirectionInscription($dVueEreur);
$this->redirectionInscription($dVueErreur);
break;
case "SupprimerTache":
$this->SupprimerTache();
$this->SupprimerTache($dVueErreur);
break;
case "SupprimerListe":
$this->SupprimerListe();
$this->SupprimerListe($dVueErreur);
break;
case "AjouterTache":
$this->AjouterTache($dVueErreur);
break;
case "AjouterListePublic":
$this->AjouterListePublic($dVueErreur);
break;
case "ModifierListe":
$this->ModifierListe($dVueErreur);
break;
case "pagePrécédente":
$this->listePrécédente($dVueErreur);
break;
case "pageSuivante":
$this->listeSuivante($dVueErreur);
break;
case "check":
$this->check($dVueErreur);
break;
//mauvaise action
default:
$dVueEreur[] = "Erreur d'appel php";
require ($rep.$vues['home']);
$dVueErreur[] = "Erreur d'appel php";
require ($rep.$vues['erreur']);
break;
}
} catch (PDOException $e)
{
//si erreur BD, pas le cas ici
$dVueEreur[] = "Erreur BD!!! ";
$dVueErreur[] = "Erreur: Connexion a la base de données impossible! ";
require ($rep.$vues['erreur']);
}
catch (Exception $e2)
catch (Exception $e)
{
$dVueEreur[] = "Erreur inattendue!!! ";
$dVueErreur[] = "Erreur venue de nulle part";
require ($rep.$vues['erreur']);
}
@ -74,61 +98,141 @@ class CtrlVisiteur {
exit(0);
}//fin constructeur
function ValidationFormulaire(array $dVueEreur) {
function ValidationFormulaire(array $dVueErreur) {
global $rep,$vues;
$val = MdlVisiteur::CreerUtilisateur();
if($val==null){
$this->redirectionInscription($dVueEreur);
}else {
try{
$val = MdlVisiteur::CreerUtilisateur($dVueErreur);
$result=MdlUtilisateur::Connection();
$action=NULL;
$this->redirectionLogin($dVueEreur);
$this->ConsulterListePublic($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
require ($rep.$vues['inscription']);
}
catch (PDOException $e)
{
$ErreurLog=$e->getMessage();
require ($rep.$vues['inscription']);
}
}
function redirectionLogin(array $dVueEreur) {
function redirectionLogin(array $dVueErreur) {
global $rep,$vues;
require ($rep.$vues['login']);
}
function redirectionInscription(array $dVueEreur) {
function redirectionInscription(array $dVueErreur) {
global $rep,$vues;
require ($rep.$vues['inscription']);
}
function seConnecter(array $dVueEreur) {
function seConnecter(array $dVueErreur) {
global $rep,$vues;
MdlVisiteur::Connection();
$action=NULL;
$this->ConsulterListePublic($dVueEreur);
try{
$result=MdlUtilisateur::Connection();
$action=NULL;
$this->ConsulterListePublic($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
require ($rep.$vues['login']);
}
}
function ConsulterListePublic(array $dVueEreur) {
function ConsulterListePublic(array $dVueErreur) {
global $rep,$vues;
$listes = MdlVisiteur::RecupererListePublic();
$taches = MdlVisiteur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPublic']);
}
function SupprimerTache(){
function SupprimerTache(array $dVueErreur){
$tache = MdlVisiteur::SupprimerTache();
$this->ConsulterListePublic($dVueErreur);
}
function SupprimerListe(array $dVueErreur){
global $rep,$vues;
$id = $_GET['idTache'];
$tache = MdlVisiteur::SupprimerTache($id);
$listes = MdlVisiteur::RecupererListePublic();
$taches = MdlVisiteur::RecupererTache();
require ($rep.$vues['listPublic']);
$liste = MdlVisiteur::SupprimerListe();
$this->ConsulterListePublic($dVueErreur);
}
public function AjouterTache(array $dVueErreur){
global $rep,$vues;
try{
$tache = MdlVisiteur::AjouterTache($dVueErreur);
$this->ConsulterListePublic($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
$listes = MdlVisiteur::RecupererListePublic();
$taches = MdlVisiteur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPublic']);
}
}
function SupprimerListe(){
public function AjouterListePublic(array $dVueErreur){
global $rep,$vues;
$id = $_GET['idListe'];
$liste = MdlVisiteur::SupprimerListe($id);
$listes = MdlVisiteur::RecupererListePublic();
$taches = MdlVisiteur::RecupererTache();
require ($rep.$vues['listPublic']);
try{
$tache = MdlVisiteur::AjouterListePublic($dVueErreur);
$this->ConsulterListePublic($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
$listes = MdlVisiteur::RecupererListePublic();
$taches = MdlVisiteur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPublic']);
}
}
public function ModifierListe(array $dVueErreur){
global $rep,$vues;
try{
$tache = MdlVisiteur::ModifierListe($dVueErreurs);
$this->ConsulterListePublic($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
$listes = MdlVisiteur::RecupererListePublic();
$taches = MdlVisiteur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPublic']);
}
}
public function check(array $dVueErreur)
{
$tache = MdlVisiteur::check();
$this->ConsulterListePublic($dVueErreur);
}
public function listePrécédente(array $dVueErreur){
if($_SESSION['page'] > 1){
$_SESSION['page']=$_SESSION['page']-1;
}
$this->ConsulterListePublic($dVueErreur);
}
public function listeSuivante(array $dVueErreur){
$_SESSION['page']=$_SESSION['page']+1;
$this->ConsulterListePublic($dVueErreur);
}
}//fin class
?>

@ -2,39 +2,68 @@
class FrontControleur {
function __construct(){
global $rep,$vues;
session_start();
if(!isset($_SESSION["pageUser"])){
$_SESSION['pageUser']=1;
}
if(!isset($_SESSION["page"])){
$_SESSION['page']=1;
}
try {
// $string_actor=' ';
// $listeActions=array(
// 'Utilisateur' => array('fqds','fdqs'),
// 'Admin' => array()
// );
// //On récupère l'action
// $action=$_REQUEST['action'];
// //On vérifie si l'action fait partie des listes d'actions
// $string_actor=fct($action,$listeActions);
// if($string_actor!=NULL){
// $mdl=new mdl.$string_actor;
// $actor=$mdl.isMdl;
// if($actor==NULL){
// require('login'.$string_actor);
// }
// else{
// $ctrl=new Ctrl.$string_actor ;
// }
// }
// else
new CtrlVisiteur();
$string_actor=' ';
$listeActions=array(
'Utilisateur' => array('logout','redirectionProfil','pageSuivantePrive','pagePrécédentePrive','supprimerCompte','modifMdp' ,'listePrive','AjouterListePrive', 'checkPrive', 'SupprimerListePrive', 'AjouterTachePrive', 'ModifierListePrive', 'SupprimerTachePrive'),
'Admin' => array('redirectionVueUtilisateur','SupprimerUtilisateur')
);
//On récupère l'action
$action=NULL;
if(isset($_REQUEST['action'])){
$action = $_REQUEST["action"];
}
//On vérifie si l'action fait partie des listes d'actions
$string_actor=FrontControleur::quelListe($action,$listeActions);
if($string_actor!=NULL){
$class= 'Mdl'.$string_actor;
$mdl=new $class();
$actor=$mdl->isConnected();
if($actor==NULL){
require($rep.$vues['login']);
}
else{
$ctrl='Ctrl'.$string_actor;
new $ctrl();
}
}
else
new CtrlVisiteur();
} 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']);
}
}
public static function quelListe($action,$listeActions){
foreach($listeActions as $a){
if(in_array($action, $a)){
return array_search($a,$listeActions);
}
}
return null;
}
}
?>
?>

@ -6,35 +6,27 @@ class MdlAdmin
public function __construct(){
}
public function connection($login,$mdp){
// $gtw=GatewayAdmin();
// $login=Validation::cleanString($login);
// $mdp=Validation::cleanString($mdp);
// if(password_verify($mdp,$gtw->getCredentials($login)){
// $_SESSION['role']='admin';
// $_SESSION['login']=$login;
// return newAdmin($login,admin);
// }
// else return NULL;
}
public function deconnexion(){
session_unset();
session_destroy();
$_SESSION = array();
public function isConnected(){
if(isset($_SESSION['id']) && isset($_SESSION['role']) && $_SESSION['role']=='admin') {
$id=Validation::cleanInt($_SESSION['id']);
$nom=Validation::cleanString($_SESSION['nom']);
$prenom=Validation::cleanString($_SESSION['prenom']);
$pseudo=Validation::cleanPseudo($_SESSION['pseudo']);
$email=Validation::cleanMail($_SESSION['email']);
return new Utilisateur($id,$nom,$prenom,$pseudo,$email);
}
else return null;
}
public function recupererUtilisateur(){
$userGtw = new UtilisateurGateway();
return $userGtw->getUtilisateurs();
}
public function isAdmin(){
if(isset($_SESSION["login"]) && isset($_SESSION["role"]))
{
$login=Nettoyer::nettoyer_string($_SESSION['login']);
$role=Nettoyer::nettoyer_string($_SESSION['role']);
return new Admin($login,$role);
} else return null;
public function supprimerUtilisateur(){
$userGtw = new UtilisateurGateway();
$userGtw->SupprimerUtilisateur($_GET['idUser']);
}
}

@ -7,42 +7,152 @@ class MdlUtilisateur
}
public static function CreerUtilisateur(){
global $dVueEreur;
public function connection(){
$gtw=new UtilisateurGateway();
$mail=Validation::cleanMail($_POST['mail']);
$mdp=$_POST['password'];
$verif_pass=$gtw->getCredentials($mail);
if(password_verify($mdp,$verif_pass)){
$userCurrent=$gtw->RechercheUtilisateurViaEmail($mail);
if($gtw->existeAdmin($userCurrent->getId())){
$_SESSION['role']='admin';
}
else{
$_SESSION['role']='user';
}
$_SESSION['id']=$userCurrent->getId();
$_SESSION['nom']=$userCurrent->getNom();
$_SESSION['prenom']=$userCurrent->getPrenom();
$_SESSION['pseudo']=$userCurrent->getPseudo();
$_SESSION['email']=$userCurrent->getMail();
return $userCurrent;
}
else throw new Exception('Mot de passe incorrect*');
}
public function isConnected(){
if(isset($_SESSION['id']) && isset($_SESSION['role'])) {
$id=Validation::cleanInt($_SESSION['id']);
$nom=Validation::cleanString($_SESSION['nom']);
$prenom=Validation::cleanString($_SESSION['prenom']);
$pseudo=Validation::cleanPseudo($_SESSION['pseudo']);
$email=Validation::cleanMail($_SESSION['email']);
return new Utilisateur($id,$nom,$prenom,$pseudo,$email);
}
else return null;
}
public static function déconnexion(){
session_unset();
session_destroy();
$_SESSION = array();
}
public static function recupererNombreDeListe(){
$listeGtw = new ListeGateway();
$id = Validation::cleanInt($_SESSION['id']);
return $listeGtw->CountListe(intval($id));
}
public function ModifierListe(&$dVueErreur){
$userGtw = new ListeGateway();
$id = $_POST['idListe'];
$nom = Validation::cleanText($_POST['nom-modif-liste']);
$description = Validation::cleanText($_POST['description-modif-liste']);
if($nom == NULL && $description==null){
return null;
}
if($description == NULL){
$userGtw->EditerNom($id, $nom);
}
else if($nom == NULL){
$userGtw->EditerDescription($id, $description);
}
else{
$userGtw->Editer($id, $nom, $description);
}
}
public static function suppressionUtilisateur(){
$userGtw = new UtilisateurGateway();
// $verif = Validation::val_form_user($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["password-Form"],$_POST["mail-Form"],$dVueEreur);
// if($verif == false){
// throw new Exception();
// }
// $hash = password_hash($_POST[password-Form], PASSWORD_DEFAULT);
$userGtw->AjouterUtilisateur($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["mail-Form"],$_POST["password-Form"]);
$id=Validation::cleanInt($_SESSION['id']);
$userGtw->SupprimerUtilisateur(intval($id));
MdlUtilisateur::déconnexion();
}
public static function RecupererListePublic(){
$userGtw = new ListeGateway();
return $userGtw->getListePublic(0,10);
public static function changerMotDePasse(){
$userGtw = new UtilisateurGateway();
$id=Validation::cleanInt($_SESSION['id']);
$mail=Validation::cleanMail($_SESSION['email']);
$mdp=$_POST['passwordCurrent'];
$newMdp=$_POST['newPassword'];
$verif_pass=$userGtw->getCredentials($mail);
if(password_verify($mdp,$verif_pass)){
if($newMdp == $_POST['confirmNewPassword']){
if (!preg_match('/^.{5,}$/', $mdp)) {
throw new Exception("Mot de passe trop faible. Veuillez recommencer !");
}
else {
$userGtw->modifMdp($id, password_hash($newMdp, PASSWORD_DEFAULT));
}
}
else throw new Exception("Erreur lors de la confirmation du mot de passe.");
}
else throw new Exception("Mot de passe Incorrect");
}
<<<<<<< HEAD:src/Modele/MdlVisiteur.php
public static function RecupererTache(){
$userGtw = new TacheGateway();
public static function AjouterListePrive(&$dVueErreur){
$listGtw = new ListeGateway();
$nom=$_POST['nom-ajout-liste'];
$description=$_POST['description-ajout-liste'];
$idCreateur =Validation::cleanInt($_SESSION['id']);
Validation::val_form_add($nom,$description,$dVueErreur);
$listGtw->Ajouter($nom, $description,0, $idCreateur);
}
return $userGtw->getTache();
public static function RecupererListePrive(){
$listeGtw = new ListeGateway();
if(isset($_SESSION["pageUser"]))
return $listeGtw->getListePrive(($_SESSION["pageUser"]-1)*5,5);
else
return $listeGtw->getListePrive(1,10);
}
public static function SupprimerTache(string $id){
$userGtw = new TacheGateway();
public static function RecupererTache(){
$taskGtw = new TacheGateway();
return $taskGtw->getTache();
}
return $userGtw->Supprimer($id);
public static function SupprimerListe(){
$listeGtw = new ListeGateway();
$taskGtw = new TacheGateway();
$id = $_GET['idListe'];
$taskGtw->SupprimerViaListe($id);
$listeGtw->Supprimer($id);
}
public static function SupprimerListe(string $id){
$userGtw = new ListeGateway();
public static function check(){
$taskGtw = new TacheGateway();
$id = $_POST['idTache'];
$taskGtw->isDone($id);
}
return $userGtw->Supprimer($id);
public static function SupprimerTache(){
$taskGtw = new TacheGateway();
$id = $_GET['idTache'];
$taskGtw->Supprimer($id);
}
=======
public function AjouterTache(&$dVueErreur){
$taskGtw = new TacheGateway();
$id = $_POST['idListe'];
$nom = $_POST['nom-ajout'];
$description = $_POST['description-ajout'];
Validation::val_form_add($nom,$description,$dVueErreur);
$taskGtw->AjouterTache($nom, $description,false,$id);
}
>>>>>>> master:src/modele/MdlUtilisateur.php
}

@ -7,39 +7,84 @@ class MdlVisiteur
}
public static function CreerUtilisateur(){
global $dVueEreur;
public static function CreerUtilisateur(&$dVueErreur){
$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);
// if(count($dVueEreur)!=0){
// return null;
// }
$userGtw->AjouterUtilisateur($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["mail-Form"],$hash);
Validation::val_form_user($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["password"],$_POST["mail"],$dVueErreur);
$userGtw->isExisteViaMail($_POST["mail"]);
$userGtw->isExisteViaPseudo($_POST["pseudo-Form"]);
$hash = password_hash($_POST["password"], PASSWORD_DEFAULT);
$userGtw->AjouterUtilisateur($_POST["nom-Form"],$_POST["prenom-Form"],$_POST["pseudo-Form"],$_POST["mail"],$hash);
}
public static function RecupererListePublic(){
$userGtw = new ListeGateway();
return $userGtw->getListePublic(0,10);
$listGtw = new ListeGateway();
if(isset($_SESSION["page"]))
return $listGtw->getListePublic(($_SESSION["page"]-1)*5,5);
else
return $listGtw->getListePublic(1,10);
}
public static function RecupererTache(){
$userGtw = new TacheGateway();
$taskGtw = new TacheGateway();
return $taskGtw->getTache();
}
public static function SupprimerTache(){
$taskGtw = new TacheGateway();
$id = $_GET['idTache'];
$taskGtw->Supprimer($id);
}
return $userGtw->getTache();
public static function SupprimerListe(){
$listGtw = new ListeGateway();
$taskGtw = new TacheGateway();
$id = $_GET['idListe'];
$taskGtw->SupprimerViaListe($id);
$listGtw->Supprimer($id);
}
public static function SupprimerTache(string $id){
$userGtw = new TacheGateway();
public function AjouterTache(&$dVueErreur){
$taskGtw = new TacheGateway();
$id = $_POST['idListe'];
$nom = $_POST['nom-ajout'];
$description = $_POST['description-ajout'];
Validation::val_form_add($nom,$description,$dVueErreur);
$taskGtw->AjouterTache($nom, $description,false,$id);
}
public function ModifierListe(&$dVueErreur){
$listGtw = new ListeGateway();
$id = $_POST['idListe'];
$nom = Validation::cleanText($_POST['nom-modif-liste']);
$description = Validation::cleanText($_POST['description-modif-liste']);
return $userGtw->Supprimer($id);
if($nom == NULL && $description==null){
return null;
}
if($description == NULL){
$listGtw->EditerNom($id, $nom);
}
else if($nom == NULL){
$listGtw->EditerDescription($id, $description);
}
else{
$listGtw->Editer($id, $nom, $description);
}
}
public static function SupprimerListe(string $id){
$userGtw = new ListeGateway();
public function AjouterListePublic(&$dVueErreur){
$listGtw = new ListeGateway();
$nom=$_POST['nom-ajout-liste'];
$description=$_POST['description-ajout-liste'];
Validation::val_form_add($nom,$description,$dVueErreur);
$listGtw->Ajouter($nom, $description,1, 1);
}
return $userGtw->Supprimer($id);
public static function check(){
$taskGtw = new TacheGateway();
$id = Validation::cleanInt($_POST['idTache']);
$taskGtw->isDone($id);
}
}

@ -7,37 +7,44 @@ class ListeGateway{
$this->con=new Connection($dsn,$user,$pass);
}
public function Ajouter(string $nom, Date $dateCreation, bool $estValide, int $idCreateur, bool $estPublic){
$query='INSERT INTO ToDoList_Liste(nom, dateCreation,estValide, createur, estPublic) VALUES(:nom, :dateCreation, :estValide, :idCreateur, :estPublic)';
$this->con->executeQuery($query, array('nom' => array($nom, PDO::PARAM_STRING)),
array('dateCreation' => array($dateCreation, PDO::PARAM_STRING)),
array('estValide' => array($estValide, PDO::PARAM_BOOL)),
array('idCreateur' => array($idCreateur, PDO::PARAM_INT)),
array('estPublic' => array($estPublic, PDO::PARAM_INT)));
public function Ajouter(string $nom, string $description, bool $estPublic, string $createur){
$query='INSERT INTO ToDoList_Liste(nom, description, dateCreation,estPublic, idUtilisateur) VALUES(:nom,:description,CURRENT_DATE, :estPublic, :createur);';
$this->con->executeQuery($query, array(
'nom' => array($nom, PDO::PARAM_STR),
'description' => array($description, PDO::PARAM_STR),
'estPublic' => array($estPublic, PDO::PARAM_INT),
'createur' => array($createur, PDO::PARAM_STR),
));
}
public function Editer(Liste $Liste){
$query='UPDATE ToDoList_Liste SET nom=:nom WHERE id=:id';
$this->con->executeQuery($query, array('nom' => array($Liste->getNom(), PDO::PARAM_STRING)), array('id' => array($Liste->getId()),PDO::PARAM_INT));
public function Editer(string $id, string $nom, string $description){
$query='UPDATE ToDoList_Liste SET nom=:nom, description=:description WHERE id=:id;';
$this->con->executeQuery($query, array(
'nom' => array($nom, PDO::PARAM_STR),
'id' => array($id,PDO::PARAM_INT),
'description' => array($description, PDO::PARAM_STR))
);
}
public function Supprimer(int $id){
$query='DELETE FROM ToDoList_Liste WHERE id=:id';
$this->con->executeQuery($query,array('id' => array($id, PDO::PARAM_INT)));
public function CountListe($id){
$query="SELECT count(*) as nombreListe FROM ToDoList_Liste WHERE idUtilisateur=:id";
$this->con->executeQuery($query, array('id' => array($id, PDO::PARAM_INT)));
return $this->con->getResults()[0]['nombreListe'];
}
public function getListe(int $offset, int $limit){
$query = "SELECT * FROM ToDoList_Liste LIMITS $offset,$limit";
$this->con->executeQuery($query);
$listes=$this->con->getResults();
return $listes;
public function EditerNom(string $id, string $nom){
$query='UPDATE ToDoList_Liste SET nom=:nom WHERE id=:id;';
$this->con->executeQuery($query, array('nom' => array($nom, PDO::PARAM_STR),'id' => array($id, PDO::PARAM_INT)));
}
public function EditerDescription(string $id, string $description){
$query='UPDATE ToDoList_Liste SET description=:description WHERE id=:id;';
$this->con->executeQuery($query, array('description' => array($description, PDO::PARAM_STR), 'id' => array($id, PDO::PARAM_INT)));
}
public function getTacheListe(Liste $liste){
$query = 'SELECT tache FROM ToDoList_Liste WHERE id=:id ';
$this->con->executeQuery($query, array('id' => array($liste->getId, PDO::PARAM_INT)));
$results=$this->con->getResults();
return $results;
public function Supprimer(string $id){
$query="DELETE FROM ToDoList_Liste WHERE id=:id";
$this->con->executeQuery($query,array('id' => array($id, PDO::PARAM_INT)));
}
public function getListePublic($offset,$limit){
@ -49,5 +56,14 @@ class ListeGateway{
}
return $listes;
}
public function getListePrive($offset,$limit){
$query = "SELECT * FROM ToDoList_Liste WHERE !estPublic LIMIT $offset, $limit";
$this->con->executeQuery($query);
$listes = [];
foreach ($this->con->getResults() as $liste) {
$listes[] = new Liste($liste["id"],$liste["nom"],$liste["description"],$liste["dateCreation"],$liste["estPublic"],$liste["idUtilisateur"]);
}
return $listes;
}
}
?>

@ -6,27 +6,44 @@ class TacheGateway{
$this->con=new Connection($dsn,$user,$pass);
}
public function Ajouter(string $nom, string $description, Date $dateCreation, bool $estValide, int $idCreateur){
$query='INSERT INTO ToDoList_Tache(nom, description, dateCreation,estValide, createur) VALUES(:nom, :description, :dateCreation, :estValide, :idCreateur)';
$this->con->executeQuery($query, array('nom' => array($nom, PDO::PARAM_STRING)),
array('description' => array($description, PDO::PARAM_STRING)),
array('dateCreation' => array($dateCreation, PDO::PARAM_STRING)),
array('estValide' => array($estValide, PDO::PARAM_BOOL)),
array('idCreateur' => array($idCreateur, PDO::PARAM_INT)));
public function AjouterTache(string $nom, string $description, bool $estValide, string $idListe){
$query='INSERT INTO ToDoList_Tache(nom, description, dateCreation,estValide, idListe) VALUES(:nom, :description, CURRENT_DATE, :estValide, :idListe);';
$this->con->executeQuery($query, array(
'nom' => array($nom, PDO::PARAM_STR),
'description' => array($description, PDO::PARAM_STR),
'estValide' => array($estValide, PDO::PARAM_BOOL),
'idListe' => array($idListe, PDO::PARAM_INT)));
}
public function Editer(string $id, string $nom, string $description){
$query='UPDATE ToDoList_Tache SET nom=:nom, description =:description WHERE id=:id;';
$this->con->executeQuery($query, array('nom' => array($nom, PDO::PARAM_STR), 'description' => array($description, PDO::PARAM_STR), 'id' => array($id, PDO::PARAM_INT)));
}
public function EditerNom(string $id, string $nom){
$query='UPDATE ToDoList_Tache SET nom=:nom WHERE id=:id;';
$this->con->executeQuery($query, array('nom' => array($nom, PDO::PARAM_STR), 'id' => array($id, PDO::PARAM_INT)));
}
public function Editer(Tache $tache, string $nom, string $description){
$query='UPDATE ToDoListe_Tache SET nom=:nom, description =:description WHERE id=:id';
$this->con->executeQuery($query, array('nom' => array($tache->getNom(), PDO::PARAM_STRING)), array('description' => array($tache->getdescription(), PDO::PARAM_STRING)), array('id' => array($tache->getId(),PDO::PARAM_INT)));
public function EditerDescription(string $id, string $description){
$query='UPDATE ToDoList_Tache SET description=:description WHERE id=:id;';
$this->con->executeQuery($query, array('description' => array($description, PDO::PARAM_STR), 'id' => array($id, PDO::PARAM_INT)));
}
public function Supprimer(string $id){
$query='DELETE FROM ToDoList_Tache WHERE id=:id';
$query='DELETE FROM ToDoList_Tache WHERE id=:id;';
$this->con->executeQuery($query,array('id' => array($id, PDO::PARAM_INT)));
}
// Si une liste est supprimée on supprime toutes ces tâches grâce à cette fonction
public function SupprimerViaListe(string $id){
$query='DELETE FROM ToDoList_Tache WHERE idListe=:id;';
$this->con->executeQuery($query,array('id' => array($id, PDO::PARAM_INT)));
}
public function getTache(){
$query='SELECT * FROM ToDoList_Tache';
$query='SELECT * FROM ToDoList_Tache;';
$this->con->executeQuery($query);
$taches = [];
foreach ($this->con->getResults() as $tache) {
@ -34,5 +51,10 @@ class TacheGateway{
}
return $taches;
}
public function isDone(string $id){
$query = 'UPDATE ToDoList_Tache SET estValide = !estValide WHERE id=:id;';
$this->con->executeQuery($query, array('id' => array($id, PDO::PARAM_STR)));
}
}
?>

@ -8,7 +8,7 @@ class UtilisateurGateway{
}
public function AjouterUtilisateur(string $nom,string $prenom, string $pseudo, string $email, string $mdp){
$query='INSERT INTO ToDoList_Utilisateur(nom,prenom,pseudo,email,motDePasse) values (:nom,:prenom,:pseudo,:email,:mdp);';
$query="INSERT INTO ToDoList_Utilisateur(nom,prenom,pseudo,email,motDePasse) values (:nom,:prenom,:pseudo,:email,:mdp)";
$this->con->executeQuery($query, array(
'nom' => array($nom, PDO::PARAM_STR),
'prenom' => array($prenom, PDO::PARAM_STR),
@ -18,25 +18,85 @@ class UtilisateurGateway{
}
public function SupprimerUtilisateur(int $id){
$query='DELETE FROM ToDoList_Utilisateur WHERE id=:id;';
$query="DELETE FROM ToDoList_Utilisateur WHERE id=:id";
$this->con->executeQuery($query, array(
'id' => array($id, PDO::PARAM_INT)));
}
public getCredential(string $id){
$query = 'SELECT motDePasse FROM ToDoList_Utilisateur WHERE id=:id';
public function existeAdmin(int $id){
$query="SELECT * FROM ToDoList_Admin WHERE idAdmin=:id";
$this->con->executeQuery($query, array(
'id' => array($id, PDO::PARAM_INT)));
$results=$this->con->getResults();
if($results!=null){
return true;
}else{
return false;
}
}
public function getUtilisateurs(){
$query = "SELECT * FROM ToDoList_Utilisateur";
$this->con->executeQuery($query);
$listesUsers = [];
foreach ($this->con->getResults() as $user) {
$listesUsers[] = new Utilisateur($user["id"],$user["nom"],$user["prenom"],$user["pseudo"],$user["email"]);
}
return $listesUsers;
}
// Vérifie que le mail n'existe pas
public function isExisteViaMail($mail){
$query="SELECT * FROM ToDoList_Utilisateur WHERE email=:mail";
$this->con->executeQuery($query, array('mail' => array($mail, PDO::PARAM_STR)));
$results=$this->con->getResults();
if($results!=null){
throw new PDOException("Erreur l'email existe déjà*");
}else{
return null;
}
}
if(this->con->executeQuery($query, array('id' => array($id, PDO::PARAM_INT)))){
return (this->con->getResults[0]['motDePasse'])
// Vérifie que le pseudo n'existe pas
public function isExisteViaPseudo($pseudo){
$query="SELECT * FROM ToDoList_Utilisateur WHERE pseudo=:pseudo";
$this->con->executeQuery($query, array('pseudo' => array($pseudo, PDO::PARAM_STR)));
$results=$this->con->getResults();
if($results!=null){
throw new PDOException("Erreur le pseudo existe déjà*");
}else{
return null;
}
else{
/* pas sur de ça*/
throw new PDOexception;
}
// Récupère le mot de passe pour la connexion via le mail en paramètres
public function getCredentials(string $mail){
$query = 'SELECT motDePasse FROM ToDoList_Utilisateur WHERE email=:mail';
$this->con->executeQuery($query, array('mail' => array($mail, PDO::PARAM_STR)));
$results=$this->con->getResults();
if($results!=null){
return $results[0]['motDePasse'];
}else{
throw new Exception("Identifiant introuvable*");
}
}
public function RechercheUtilisateurViaEmail(string $pseudo){
public function modifMdp($id, $mdp){
$query = "UPDATE ToDoList_Utilisateur SET motDePasse=:mdp WHERE id=:id";
$this->con->executeQuery($query, array(
'mdp' => array($mdp, PDO::PARAM_STR),
'id' => array($id, PDO::PARAM_INT)));
}
public function RechercheUtilisateurViaEmail(string $mail){
$query = 'SELECT * FROM ToDoList_Utilisateur WHERE email=:mail';
$this->con->executeQuery($query, array('mail' => array($mail, PDO::PARAM_STR)));
$results=$this->con->getResults();
if($results!=null){
return new Utilisateur($results[0]['id'],$results[0]['nom'],$results[0]['prenom'],$results[0]['pseudo'],$results[0]['email']);
}else{
throw new Exception("Identifiant introuvable*");
}
}
}
?>
?>

@ -1,65 +0,0 @@
<?php
class Admin
{
private $id;
private $nom;
private $prenom;
private $pseudo;
private $email;
public function __construct($id, $nom, $prenom, $pseudo, $email, $motDePasse, $isAdmin){
$this->id = $id;
$this->nom = $nom;
$this->prenom = $prenom;
$this->pseudo = $pseudo;
$this->email = $email;
}
//Nom
public function getId(){
return $this->id;
}
public function setId($id){
$this->nom = $id;
}
//Nom
public function getNom(){
return $this->nom;
}
public function setNom($nom){
$this->nom = $nom;
}
//Prenom
public function getPrenom(){
return $this->prenom;
}
public function setPrenom($prenom){
$this->prenom = $prenom;
}
//Pseudo
public function getPseudo(){
return $this->pseudo;
}
public function setPseudo($pseudo){
$this->pseudo = $pseudo;
}
//mail
public function getMail(){
return $this->email;
}
public function setEmail($email){
$this->email = $email;
}
}
?>

@ -7,15 +7,13 @@ class Utilisateur
private $prenom;
private $pseudo;
private $email;
private $isAdmin;
public function __construct($id, $nom, $prenom, $pseudo, $email, $motDePasse, $isAdmin){
public function __construct($id, $nom, $prenom, $pseudo, $email){
$this->id = $id;
$this->nom = $nom;
$this->prenom = $prenom;
$this->pseudo = $pseudo;
$this->email = $email;
$this->isAdmin = $isAdmin;
}
//Nom

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

@ -12,6 +12,9 @@ body {
font-weight: bold;
align-items: center;
justify-content: center;
-webkit-user-select: none; /* Safari */
-ms-user-select: none; /* IE 10 and IE 11 */
user-select: none;
}
body::before {
@ -23,7 +26,6 @@ body::before {
z-index: -1;
}
/* Model */
.model {
@ -282,7 +284,11 @@ body::before {
transition: background .5s;
}
.ErreurText{
color: red;
font-size: 0.7rem;
font-weight: bold;
}
.button{
border-color: #38b6ff;

@ -0,0 +1,3 @@
input[type="checkbox"]:checked + label {
text-decoration: line-through;
}

@ -1,36 +1,59 @@
<div class="header">
<div class="menu-bar">
<div class="menu-bar" >
<section class="fixed-top">
<nav class="navbar navbar-expand-lg bg-info ">
<img src="./vue/Images/LogoForHome.png" width="200">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<style>
.fa {
color: white;
font-size: 26px;
}
.nav-link:hover {
border-bottom: 1px solid #fff;
}
</style>
<ul class="navbar-nav ml-auto">
<?php
if(isset($_SESSION["idUtilisateur"]) and $_SESSION["idUtilisateur"]){ ?>
<h4><a class="nav-item nav-link text-light" href="index.php?action=showPrivateList&userid=<?= $_SESSION["idUtilisateur"] ?>">Mes listes</a></h4>
<h4><a class="nav-item nav-link text-light" href="index.php?action=logout">Se deconnecter</a></h4>
<?php
} else {
?> <h5><a class="nav-item nav-link text-light" href="login">Se connecter</a></h5>
<h5><a class="nav-item nav-link text-light" href="inscription">S'inscrire</a></h5>
<img src="./vue/Images/LogoForHome.png" width="200">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<style>
.fa {
color: white;
font-size: 26px;
}
.nav-link:hover {
border-bottom: 1px solid #fff;
}
</style>
<div class="custom-control custon-switch mr-5">
<input type="checkbox" class="custom-control-input" id="selector">
<label class="custom-control-label" for="selector">Dark Mode</label>
</input>
</div>
<ul class="navbar-nav ml-auto">
<?php
}
?>
</ul>
</div>
</nav>
if(isset($_SESSION['id'])){ ?>
<h5><a class="nav-item nav-link text-light" href="VueListePublic">Listes Publiques</a></h5>
<h5><a class="nav-item nav-link text-light" href="listePrive">Mes listes</a></h5>
<h5><a class="nav-item nav-link text-light" href="MonProfil">Mon Profil</a></h5>
<?php if($_SESSION['role']=='admin'){?>
<h5><a class="nav-item nav-link text-warning" href="users">Les utilisateurs</a></h5>
<?php } ?>
<h5><button class="nav-item btn btn-outline-light" onclick="myFunction()">Se déconnecter</button></h5>
<script>
function myFunction() {
let text = "Voulez-vous vraiment vous déconnecter?!\n";
if (confirm(text) == true) {
location.replace("logout")
} else {
}
}
</script>
<?php
} else {
?> <h5><a class="nav-item btn btn-outline-light" href="login">Se connecter</a></h5>
<h5><a class="nav-item nav-link text-light" href="inscription">S'inscrire</a></h5>
<?php
}
?>
</ul>
</div>
</nav>
</section>
</div>
</div>

@ -0,0 +1,356 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="./vue/Images/gif.gif" type="../Images/gif">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home Page</title>
<!-- CSS only -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https:/stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./vue/css/task.css">
<!-- JavaScript Bundle with Popper -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body style="-webkit-user-select: none; /* Safari */
-ms-user-select: none; /* IE 10 and IE 11 */
user-select: none;">
<?php require($rep.$vues['NavBar']); ?>
<br>
<br>
<br>
<button class="btn btn-default" data-toggle="modal" data-target="#formulaireAjoutListe">
Ajouter une liste
<img src="./vue/Images/plus.png" width="20" />
</button>
<div class="container">
<div class="modal fade" id="formulaireAjoutListe">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Ajout d'une liste</h4>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body row">
<form class="col" method="POST">
<div class="form-group">
<?php
if(isset($dVueErreur['nom'])){?>
<center><p class="text-danger"> <?php echo $dVueErreur['nom']?></p></center><?php
}
?>
<label for="nom" class="form-control-label">Nom</label>
<input type="text" class="form-control" name ="nom-ajout-liste" id="nom" placeholder="Entrez un nom">
</div>
<div class="form-group">
<?php
if(isset($dVueErreur['description'])){?>
<center><p class="text-danger"> <?php echo $dVueErreur['description']?></p></center><?php
}
?>
<label for="description" class="form-control-label">Description</label>
<input type="text" class="form-control" name="description-ajout-liste" id="description" placeholder="Entrez une description">
</div>
<button type="submit" class="btn btn-primary pull-right">Ajouter</button>
<input type="hidden" name="action" value="AjouterListePrive">
</form>
</div>
</div>
</div>
</div>
</div>
<?php
foreach($listesPrive as $liste){
if($liste->getIdUtilisateur() == $_SESSION['id']){
$done = 0;
$total = 0;
?>
<!-- Modifier couleur -->
<script>
$(document).ready(function(){
$("#selector").change(function(){
$("body").toggleClass("bg-secondary");
$("nav").toggleClass("navbar-dark bg-dark");
$(".custom-control-label").toggleClass("text-white");
});
});
</script>
<!-- Affichage des listesPrive -->
<div class="container py-2 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col col-lg-8 col-xl-6">
<div class="card rounded-3">
<div class="card-body p-4">
<div>
<p class="mb-2">
<span class="h2 me-2 text-info"><?= $liste->getNom()?>
<a href="index.php?action=SupprimerListePrive&idListe=<?= $liste->getId() ?>">
<button class="btn btn-default">
<img src="./vue/Images/trash.png" width="20" />
</button>
</a>
<button data-toggle="modal" data-target="#formulaireModif<?= $liste->getId()?>" class="btn btn-default">
<img src="./vue/Images/edit.png" width="20" />
</button>
<button data-toggle="modal" data-target="#formulaireAjout<?= $liste->getId()?>" class="btn btn-default">
<img src="./vue/Images/plus.png" width="20" />
</button>
</span>
</p>
<p><span class="h5 me-2"><?= $liste->getDescription()?></span>
<p class="text-muted pb-2"><?= $liste->getDateCreation()?> by <strong><?= $_SESSION['pseudo'] ?></strong> </p>
</div>
<!-- Fenetre modal -->
<div class="container">
<div class="modal fade" id="formulaireAjout<?= $liste->getId()?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Ajout d'une tache</h4>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body row">
<form class="col" method="POST">
<div class="form-group">
<?php
if(isset($dVueErreur['nom'])){?>
<center><p class="text-danger"> <?php echo $dVueErreur['nom']?></p></center><?php
}
?>
<label for="nom" class="form-control-label">Nom</label>
<input type="text" class="form-control" name ="nom-ajout" id="nom" placeholder="Entrez un nom">
</div>
<div class="form-group">
<?php
if(isset($dVueErreur['description'])){?>
<center><p class="text-danger"> <?php echo $dVueErreur['description']?></p></center><?php
}
?>
<label for="description" class="form-control-label">Description</label>
<input type="text" class="form-control" name="description-ajout" id="description" placeholder="Entrez une description">
</div>
<button type="submit" class="btn btn-primary pull-right">Ajouter</button>
<input type="hidden" name="action" value="AjouterTachePrive">
<input type="hidden" name="idListe" value="<?= $liste->getId() ?>">
</form>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="modal fade" id="formulaireModif<?= $liste->getId()?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Modification</h4>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body row">
<form class="col" method="POST">
<div class="form-group">
<?php
if(isset($dVueErreur['nom'])){?>
<center><p class="text-danger"> <?php echo $dVueErreur['nom']?></p></center><?php
}
?>
<label for="nom" class="form-control-label">Nouveau nom</label>
<input type="text" class="form-control" name ="nom-modif-liste" id="nom" placeholder="<?= $liste->getNom() ?>">
</div>
<div class="form-group">
<?php
if(isset($dVueErreur['description'])){?>
<center><p class="text-danger"> <?php echo $dVueErreur['description']?></p></center><?php
}
?>
<label for="description" class="form-control-label">Nouvelle description</label>
<input type="text" class="form-control" name="description-modif-liste" id="description" placeholder="<?= $liste->getDescription() ?>">
</div>
<button type="submit" class="btn btn-primary pull-right">Modifier</button>
<input type="hidden" name="action" value="ModifierListePrive">
<input type="hidden" name="idListe" value="<?= $liste->getId() ?>">
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Tache -->
<ul class="list-group rounded-0">
<?php
foreach($taches as $tache){
if($tache->getIdListe() == $liste->getId()){
if($tache->getEstValide() == 1){
$done = $done + 1;
}
$total = $total + 1;
?>
<li class="list-group-item border-0 d-flex align-items-center ps-0">
<form name="action" action="checkPrive" method="POST">
<input class="form-check-input me-3" id="task-<?= $tache->getId() ?>" type="checkbox" onChange="submit();"
<?php if($tache->getEstValide() == 1) echo "checked" ?>>
<label for="task-<?= $tache->getId() ?>"> <?= $tache->getNom() ?> : <?= $tache->getDescription() ?></label>
<input type="hidden" name="idTache" value="<?= $tache->getId() ?>" >
</form>
<a href="index.php?action=SupprimerTachePrive&idTache=<?= $tache->getId() ?>">
<button class="btn btn-default">
<img src="./vue/Images/trash.png" width="20" />
</button>
</a>
</li>
<?php
}
}
?>
</ul>
</div>
<div class="progress">
<?php
if($total != 0){
$pourcentage = $done * 100 / $total;
} else{
$pourcentage = 0;
}
?>
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo"$pourcentage" ?>%;"></div>
</div>
</div>
</div>
</div>
</div>
<?php
}
}
?>
<nav aria-label="Page navigation example">
<center>
<p>Page n°<?php echo $_SESSION['pageUser'] ?></p>
</center>
<ul class="pagination justify-content-center">
<li class="page-item">
<a class="page-link" href="previousPagePrive">Previous</a>
</li>
<li class="page-item">
<a class="page-link" href="nextPagePrive">Next</a>
</li>
</ul>
</nav>
</body>
<!-- Footer -->
<footer class="text-center text-lg-start bg-light sticky-bottom">
<br>
<!-- Section: Links -->
<section class="">
<div class="container text-center text-md-start mt-5">
<!-- Grid row -->
<div class="row mt-3">
<!-- Grid column -->
<div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4">
<!-- Content -->
<h6 class="text-uppercase fw-bold mb-4">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-wallet2" viewBox="0 0 16 16">
<path d="M12.136.326A1.5 1.5 0 0 1 14 1.78V3h.5A1.5 1.5 0 0 1 16 4.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 13.5v-9a1.5 1.5 0 0 1 1.432-1.499L12.136.326zM5.562 3H13V1.78a.5.5 0 0 0-.621-.484L5.562 3zM1.5 4a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5h-13z"/>
</svg> Project
</h6>
<p>
2nd year project, consisting of making a To do List in php
, which contains visitors or users, who can add,
delete, see tasks...
</p>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-2 col-lg-2 col-xl-2 mx-auto mb-4">
<!-- Links -->
<h6 class="text-uppercase fw-bold mb-4">
Products
</h6>
<p>
<img src="https://img.shields.io/badge/HTML-000?style=for-the-badge&logo=html5&logoColor=orange&color=f8f9fa">
</img>
</p>
<p>
<img src="https://img.shields.io/badge/CSS-000?style=for-the-badge&logo=Css3&logoColor=blue&color=f8f9fa">
</img>
</p>
<p>
<img src="https://img.shields.io/badge/PHP-000?style=for-the-badge&logo=php&logoColor=purple&color=f8f9fa">
</img>
</p>
<p>
<img src="https://img.shields.io/badge/JavaScript-000?style=for-the-badge&logo=javascript&logoColor=yellow&color=f8f9fa">
</img>
</p>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4">
<!-- Links -->
<h6 class="text-uppercase fw-bold mb-4">Contact</h6>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="currentColor" class="bi bi-envelope" viewBox="0 0 16 16">
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"/>
</svg>
emre.kartal@etu.uca.fr
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="currentColor" class="bi bi-envelope" viewBox="0 0 16 16">
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"/>
</svg>
rayhan.hassou@etu.uca.fr
</p>
<p><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pin" viewBox="0 0 16 16">
<path d="M4.146.146A.5.5 0 0 1 4.5 0h7a.5.5 0 0 1 .5.5c0 .68-.342 1.174-.646 1.479-.126.125-.25.224-.354.298v4.431l.078.048c.203.127.476.314.751.555C12.36 7.775 13 8.527 13 9.5a.5.5 0 0 1-.5.5h-4v4.5c0 .276-.224 1.5-.5 1.5s-.5-1.224-.5-1.5V10h-4a.5.5 0 0 1-.5-.5c0-.973.64-1.725 1.17-2.189A5.921 5.921 0 0 1 5 6.708V2.277a2.77 2.77 0 0 1-.354-.298C4.342 1.674 4 1.179 4 .5a.5.5 0 0 1 .146-.354zm1.58 1.408-.002-.001.002.001zm-.002-.001.002.001A.5.5 0 0 1 6 2v5a.5.5 0 0 1-.276.447h-.002l-.012.007-.054.03a4.922 4.922 0 0 0-.827.58c-.318.278-.585.596-.725.936h7.792c-.14-.34-.407-.658-.725-.936a4.915 4.915 0 0 0-.881-.61l-.012-.006h-.002A.5.5 0 0 1 10 7V2a.5.5 0 0 1 .295-.458 1.775 1.775 0 0 0 .351-.271c.08-.08.155-.17.214-.271H5.14c.06.1.133.191.214.271a1.78 1.78 0 0 0 .37.282z"/>
</svg> Groupe 4</p>
</div>
<!-- Grid column -->
</div>
<!-- Grid row -->
</div>
</section>
<!-- Section: Links -->
<!-- Copyright -->
<div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05);">
© 2021 Copyright:
<a class="text-reset fw-bold" href="#">ToDoList.com</a>
</div>
<!-- Copyright -->
</footer>
</html>

@ -6,61 +6,210 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home Page</title>
<!-- CSS only -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https:/stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- JavaScript Bundle with Popper -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="./vue/css/task.css">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.slim.min.js"></script>
<!-- Popper JS -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<?php require($rep.$vues['NavBar']); ?>
<body style="-webkit-user-select: none; /* Safari */
-ms-user-select: none; /* IE 10 and IE 11 */
user-select: none;">
<?php require($rep.$vues['NavBar']); ?>
<br>
<br>
<br>
<button class="btn btn-default" data-toggle="modal" data-target="#formulaireAjoutListe">
Ajouter une liste
<img src="./vue/Images/plus.png" width="20" />
</button>
<div class="container">
<div class="modal fade" id="formulaireAjoutListe">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Ajout d'une liste</h4>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body row">
<form class="col" method="POST">
<div class="form-group">
<?php
if(isset($dVueErreur['nom'])){?>
<center><p class="text-danger"> <?php echo $dVueErreur['nom']?></p></center><?php
}
?>
<label for="nom" class="form-control-label">Nom</label>
<input type="text" class="form-control" name ="nom-ajout-liste" id="nom" placeholder="Entrez un nom">
</div>
<div class="form-group">
<?php
if(isset($dVueErreur['description'])){?>
<center><p class="text-danger"> <?php echo $dVueErreur['description']?></p></center><?php
}
?>
<label for="description" class="form-control-label">Description</label>
<input type="text" class="form-control" name="description-ajout-liste" id="description" placeholder="Entrez une description">
</div>
<button type="submit" class="btn btn-primary pull-right">Ajouter</button>
<input type="hidden" name="action" value="AjouterListePublic">
</form>
</div>
</div>
</div>
</div>
</div>
<?php
foreach($listes as $liste){
$done = 0;
$total = 0;
?>
<!-- Modifier couleur -->
<script>
$(document).ready(function(){
$("#selector").change(function(){
$("body").toggleClass("bg-secondary");
$("nav").toggleClass("navbar-dark bg-dark");
$(".custom-control-label").toggleClass("text-white");
});
});
</script>
<!-- Affichage des listes -->
<div class="container py-2 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col col-lg-8 col-xl-6">
<div class="card rounded-3">
<div class="card-body p-4">
<div>
<p class="mb-2">
<span class="h2 me-2 text-info"><?= $liste->getNom()?>
<a href="index.php?action=SupprimerListe&idListe=<?= $liste->getId() ?>">
<button class="btn btn-default">
<img src="./vue/Images/trash.png" width="25" />
<img src="./vue/Images/trash.png" width="20" />
</button>
</a>
<button type="submit" class="btn btn-default">
<img src="./vue/Images/edit.png" width="25" />
<button data-toggle="modal" data-target="#formulaireModif<?= $liste->getId()?>" class="btn btn-default">
<img src="./vue/Images/edit.png" width="20" />
</button>
<button data-toggle="modal" data-target="#formulaireAjout<?= $liste->getId()?>" class="btn btn-default">
<img src="./vue/Images/plus.png" width="20" />
</button>
</span>
</p>
<p><span class="h5 me-2"><?= $liste->getDescription()?></span>
<p class="text-muted pb-2"><?= $liste->getDateCreation()?></p>
<p><span class="h5 me-2"><?= $liste->getDescription()?></span>
<p class="text-muted pb-2"><?= $liste->getDateCreation()?></p>
</div>
<!-- Fenetre modal -->
<div class="container">
<div class="modal fade" id="formulaireAjout<?= $liste->getId()?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Ajout d'une tache</h4>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body row">
<form class="col" method="POST" >
<div class="form-group">
<label for="nom" class="form-control-label">Nom</label>
<input type="text" class="form-control" name ="nom-ajout" id="nom" placeholder="Entrez un nom" required autofocus>
</div>
<div class="form-group">
<label for="description" class="form-control-label">Description</label>
<input type="text" class="form-control" name="description-ajout" id="description" placeholder="Entrez une description" required autofocus>
</div>
<button type="submit" class="btn btn-primary pull-right">Ajouter</button>
<input type="hidden" name="action" value="AjouterTache">
<input type="hidden" name="idListe" value="<?= $liste->getId() ?>">
</form>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="modal fade" id="formulaireModif<?= $liste->getId()?>">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Modification</h4>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body row">
<form class="col" method="POST">
<div class="form-group">
<label for="nom" class="form-control-label">Nouveau nom</label>
<input type="text" class="form-control" name ="nom-modif-liste" id="nom" placeholder="<?= $liste->getNom() ?>">
</div>
<div class="form-group">
<label for="description" class="form-control-label">Nouvelle description</label>
<input type="text" class="form-control" name="description-modif-liste" id="description" placeholder="<?= $liste->getDescription() ?>">
</div>
<button type="submit" class="btn btn-primary pull-right">Modifier</button>
<input type="hidden" name="action" value="ModifierListe">
<input type="hidden" name="idListe" value="<?= $liste->getId() ?>">
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Tache -->
<ul class="list-group rounded-0">
<?php
foreach($taches as $tache){
if($tache->getIdListe() == $liste->getId()){
if($tache->getEstValide() == 1){
$done = $done + 1;
}
$total = $total + 1;
?>
<li class="list-group-item border-0 d-flex align-items-center ps-0">
<input class="form-check-input me-3" type="checkbox" value="" aria-label="..."/>
<?= $tache->getNom() ?> : <?= $tache->getDescription() ?>
<form name="action" action="check" method="POST">
<input class="form-check-input me-3" id="task-<?= $tache->getId() ?>" type="checkbox" onChange="submit();"
<?php if($tache->getEstValide() == 1) echo "checked" ?>>
<label for="task-<?= $tache->getId() ?>"> <?= $tache->getNom() ?> : <?= $tache->getDescription() ?></label>
<input type="hidden" name="idTache" value="<?= $tache->getId() ?>" >
</form>
<a href="index.php?action=SupprimerTache&idTache=<?= $tache->getId() ?>">
<button class="btn btn-default">
<img src="./vue/Images/trash.png" width="25" />
</button>
</a>
<button type="submit" class="btn btn-default">
<img src="./vue/Images/edit.png" width="25" />
</button>
<button class="btn btn-default">
<img src="./vue/Images/trash.png" width="20" />
</button>
</a>
</li>
<?php
}
@ -68,6 +217,16 @@
?>
</ul>
</div>
<div class="progress">
<?php
if($total != 0){
$pourcentage = $done * 100 / $total;
} else{
$pourcentage = 0;
}
?>
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo"$pourcentage" ?>%;"></div>
</div>
</div>
</div>
</div>
@ -76,21 +235,23 @@
}
?>
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<div aria-label="Page navigation example" class="NavPage">
<center>
<p>Page n°<?php echo $_SESSION['page'] ?></p>
</center>
<ul class="pagination justify-content-center ">
<li class="page-item">
<a class="page-link" href="#">Previous</a>
</li>
<a class="page-link" href="previousPage">Previous</a>
</li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
<a class="page-link" href="nextPage">Next</a>
</li>
</ul>
</nav>
</div>
</body>
<!-- Footer -->
<footer class="text-center text-lg-start bg-light ">
<footer class="text-center text-lg-start bg-light sticky-bottom">
<br>
<!-- Section: Links -->
<section class="">
@ -120,28 +281,20 @@
Products
</h6>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-filetype-html" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5Zm-9.736 7.35v3.999h-.791v-1.714H1.79v1.714H1V11.85h.791v1.626h1.682V11.85h.79Zm2.251.662v3.337h-.794v-3.337H4.588v-.662h3.064v.662H6.515Zm2.176 3.337v-2.66h.038l.952 2.159h.516l.946-2.16h.038v2.661h.715V11.85h-.8l-1.14 2.596H9.93L8.79 11.85h-.805v3.999h.706Zm4.71-.674h1.696v.674H12.61V11.85h.79v3.325Z"/>
</svg>
<a href="#!" class="text-reset">Html</a>
<img src="https://img.shields.io/badge/HTML-000?style=for-the-badge&logo=html5&logoColor=orange&color=f8f9fa">
</img>
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-filetype-css" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM3.397 14.841a1.13 1.13 0 0 0 .401.823c.13.108.289.192.478.252.19.061.411.091.665.091.338 0 .624-.053.859-.158.236-.105.416-.252.539-.44.125-.189.187-.408.187-.656 0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357 2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384.125-.101.296-.152.512-.152.143 0 .266.023.37.068a.624.624 0 0 1 .246.181.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566 1.21 1.21 0 0 0-.5-.41 1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15-.225.099-.4.24-.527.421-.127.182-.19.395-.19.639 0 .201.04.376.122.524.082.149.2.27.352.367.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326.505.505 0 0 1-.085.29.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399.814.814 0 0 1 .475-.137c.15 0 .283.032.398.097a.7.7 0 0 1 .272.26.85.85 0 0 1 .12.381h.765v-.072a1.33 1.33 0 0 0-.466-.964 1.441 1.441 0 0 0-.489-.272 1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223-.25.148-.44.359-.572.632-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976.131.271.322.48.572.626.25.145.554.217.914.217.293 0 .554-.055.785-.164.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363.7.7 0 0 1-.272.25.874.874 0 0 1-.401.087.845.845 0 0 1-.478-.132.833.833 0 0 1-.299-.392 1.699 1.699 0 0 1-.102-.627v-.495ZM6.78 15.29a1.176 1.176 0 0 1-.111-.449h.764a.578.578 0 0 0 .255.384c.07.049.154.087.25.114.095.028.201.041.319.041.164 0 .301-.023.413-.07a.559.559 0 0 0 .255-.193.507.507 0 0 0 .085-.29.387.387 0 0 0-.153-.326c-.101-.08-.256-.144-.463-.193l-.618-.143a1.72 1.72 0 0 1-.539-.214 1 1 0 0 1-.351-.367 1.068 1.068 0 0 1-.123-.524c0-.244.063-.457.19-.639.127-.181.303-.322.527-.422.225-.1.484-.149.777-.149.304 0 .564.05.779.152.217.102.384.239.5.41.12.17.187.359.2.566h-.75a.56.56 0 0 0-.12-.258.624.624 0 0 0-.246-.181.923.923 0 0 0-.37-.068c-.216 0-.387.05-.512.152a.472.472 0 0 0-.184.384c0 .121.047.22.143.3a.97.97 0 0 0 .404.175l.621.143c.217.05.406.12.566.211.16.09.285.21.375.358.09.148.135.335.135.56 0 .247-.063.466-.188.656a1.216 1.216 0 0 1-.539.439c-.234.105-.52.158-.858.158-.254 0-.476-.03-.665-.09a1.404 1.404 0 0 1-.478-.252 1.13 1.13 0 0 1-.29-.375Z"/>
</svg>
<a href="#!" class="text-reset">Css</a>
<img src="https://img.shields.io/badge/CSS-000?style=for-the-badge&logo=Css3&logoColor=blue&color=f8f9fa">
</img>
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-filetype-php" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.6 11.85H0v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38.574.574 0 0 1-.238.241.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181.123.122.185.295.185.522Zm4.48 2.666V11.85h-.79v1.626H4.153V11.85h-.79v3.999h.79v-1.714h1.682v1.714h.79Zm.703-3.999h1.6c.288 0 .533.06.732.179.2.117.354.276.46.477.105.201.158.427.158.677 0 .25-.054.476-.161.677-.106.199-.26.357-.463.474a1.452 1.452 0 0 1-.733.173H8.12v1.342h-.791V11.85Zm2.06 1.714a.795.795 0 0 0 .084-.381c0-.227-.061-.4-.184-.521-.123-.122-.294-.182-.513-.182h-.66v1.406h.66a.794.794 0 0 0 .375-.082.574.574 0 0 0 .237-.24Z"/>
</svg>
<a href="#!" class="text-reset">Php</a>
<img src="https://img.shields.io/badge/PHP-000?style=for-the-badge&logo=php&logoColor=purple&color=f8f9fa">
</img>
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-filetype-js" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2H8v-1h4a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM3.186 15.29a1.176 1.176 0 0 1-.111-.449h.765a.578.578 0 0 0 .255.384c.07.049.153.087.249.114.095.028.202.041.319.041.164 0 .302-.023.413-.07a.559.559 0 0 0 .255-.193.507.507 0 0 0 .085-.29.387.387 0 0 0-.153-.326c-.101-.08-.255-.144-.462-.193l-.619-.143a1.72 1.72 0 0 1-.539-.214 1.001 1.001 0 0 1-.351-.367 1.068 1.068 0 0 1-.123-.524c0-.244.063-.457.19-.639.127-.181.303-.322.528-.422.224-.1.483-.149.776-.149.305 0 .564.05.78.152.216.102.383.239.5.41.12.17.186.359.2.566h-.75a.56.56 0 0 0-.12-.258.624.624 0 0 0-.247-.181.923.923 0 0 0-.369-.068c-.217 0-.388.05-.513.152a.472.472 0 0 0-.184.384c0 .121.048.22.143.3a.97.97 0 0 0 .405.175l.62.143c.218.05.406.12.566.211.16.09.285.21.375.358.09.148.135.335.135.56 0 .247-.063.466-.188.656a1.216 1.216 0 0 1-.539.439c-.234.105-.52.158-.858.158-.254 0-.476-.03-.665-.09a1.404 1.404 0 0 1-.478-.252 1.13 1.13 0 0 1-.29-.375Zm-3.104-.033A1.32 1.32 0 0 1 0 14.791h.765a.576.576 0 0 0 .073.27.499.499 0 0 0 .454.246c.19 0 .33-.055.422-.164.092-.11.138-.265.138-.466v-2.745h.79v2.725c0 .44-.119.774-.357 1.005-.236.23-.564.345-.984.345a1.59 1.59 0 0 1-.569-.094 1.145 1.145 0 0 1-.407-.266 1.14 1.14 0 0 1-.243-.39Z"/>
</svg>
<a href="#!" class="text-reset">JavaScript</a>
<img src="https://img.shields.io/badge/JavaScript-000?style=for-the-badge&logo=javascript&logoColor=yellow&color=f8f9fa">
</img>
</p>
</div>
<!-- Grid column -->
@ -181,4 +334,7 @@
</div>
<!-- Copyright -->
</footer>
</html>

@ -1,18 +1,30 @@
<html>
<head><title>Erreur</title>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="./vue/Images/gif.gif" type="../Images/gif">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Erreur Page</title>
<!-- CSS only -->
<link rel="stylesheet" href="./vue/css/style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https:/stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- JavaScript Bundle with Popper -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<h1>ERREUR !!!!!</h1>
<?php
if (isset($dVueEreur)) {
foreach ($dVueEreur as $value){
echo $value;
}
}
?>
</body> </html>
<body>
<div class="model">
<h1>Un problème est survenue !</h1>
<?php
if (isset($dVueErreur)) {
foreach ($dVueErreur as $value){
echo $value;
}
}
?>
<a href="VueListePublic">Revenir</a>
</div>
</body>
</html>

@ -1,68 +1,87 @@
<!DOCTYPE html>
<html>
<head>
<title>Page d'inscription</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="./Vue/Images/gif.gif" type="../Images/gif">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS only -->
<link rel="stylesheet" href="./vue/css/style.css">
<link rel="stylesheet" href="./vue/css/reset.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<div class="main">
<div class="model">
<div class="main-logo">
<img src="./vue/Images/Logo.png" alt="logo">
<head>
<title>Page d'inscription</title>
<link rel="shortcut icon" href="./vue/Images/gif.gif" type="../Images/gif">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS only -->
<link rel="stylesheet" href="./vue/css/style.css">
<link rel="stylesheet" href="./vue/css/reset.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<div class="main">
<div class="model">
<div class="main-logo">
<img src="./vue/Images/Logo.png" alt="logo">
</div>
<div class="login-card-header">
<h1>Inscrivez-vous</h1>
</div>
<?php
if(isset($ErreurLog)){?>
<center><p class="ErreurText"> <?php echo $ErreurLog?></p></center><?php
}
?>
<form method="POST" class="login-card-form">
<div class="row">
<div class="col-md-6 mb-4">
<?php
if(isset($dVueErreur['nom'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['nom']?></p></center><?php
}
?>
<div>
<input type="text" name="nom-Form" placeholder="Nom" required autofocus>
</div>
<div class="login-card-header">
<h1>Inscrivez-vous</h1>
</div>
<div class="col-md-6 mb-4">
<?php
if(isset($dVueErreur['prenom'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['prenom']?></p></center><?php
}
?>
<div>
<input type="text" name="prenom-Form" placeholder="Prenom" required autofocus>
</div>
</div>
<form method="POST" class="login-card-form">
<div class="row">
<div class="col-md-6 mb-4">
<div class="form-outline">
<input type="text" name="nom-Form" placeholder="Nom" required autofocus>
</div>
</div>
<div class="col-md-6 mb-4">
<div class="form-outline">
<input type="text" name="prenom-Form" placeholder="Prenom" required autofocus>
</div>
</div>
</div>
<div class="form-item">
<input type="text" name="pseudo-Form" placeholder="Pseudo" required autofocus>
</div>
<div class="form-item">
<input type="text" name="mail-Form" placeholder="Mail" required autofocus>
</div>
<div class="form-item">
<input type="password" name="password-Form" placeholder="Password" required >
</div>
<button type="submit" class="btn btn-primary">S'inscrire</button>
<!-- action !!!!!!!!!! -->
<input type="hidden" name="action" value="validationFormulaire">
<?php
if (isset($dVueEreur)) {
foreach ($dVueEreur as $value){
echo $value;
}
}
?>
<p class="text-center text-muted mt-5 mb-0">Déjà un compte?
<a href="login" class="fw-bold text-body"><u>Connectez-vous</u></a></p>
</form>
</div>
<div class="form-item">
<?php
if(isset($dVueErreur['pseudo'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['pseudo']?></p></center><?php
}
?>
<input type="text" name="pseudo-Form" placeholder="Pseudo" required autofocus>
</div>
</div>
<div class="form-item">
<?php
if(isset($dVueErreur['mail'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['mail']?></p></center><?php
}
?>
<input type="text" name="mail" placeholder="Mail" required autofocus>
</div>
<div class="form-item">
<?php
if(isset($dVueErreur['password'])){?>
<center><p class="ErreurText"> <?php echo $dVueErreur['password']?></p></center><?php
}
?>
<input type="password" name="password" placeholder="Password" required >
</div>
<button type="submit" class="btn btn-primary">S'inscrire</button>
<!-- action !!!!!!!!!! -->
<input type="hidden" name="action" value="validationFormulaire">
<p class="text-center text-muted mt-5 mb-0">Déjà un compte?
<a href="login" class="fw-bold text-body"><u>Connectez-vous</u></a></p>
</form>
</div>
</body>
</div>
</body>
</html>

@ -6,14 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<!-- CSS only -->
<link rel="stylesheet" href="./vue/css/style.css">
<link rel="stylesheet" href="./vue/css/reset.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@48,300,0,0" />
</head>
<body>
<div class="main">
<a class="button" href="VueListePublic">Sortir</a>
<a class="button" href="VueListePublic">Sortir</a>
<div class="model">
<div class="main-logo">
<img src="./vue/Images/Logo.png" alt="logo">
@ -21,7 +20,12 @@
<div class="login-card-header">
<h1>Se Connecter</h1>
</div>
<form class="login-card-form">
<?php
if(isset($ErreurLog)){?>
<center><p class="ErreurText"> <?php echo $ErreurLog?></p></center><?php
}
?>
<form method="POST" class="login-card-form">
<div class="form-item">
<span class="form-item-icon material-symbols-rounded">mail</span>
<input type="text" name="mail" placeholder="Enter Mail" required autofocus>
@ -49,7 +53,7 @@
</form>
<div class="login-card-footer">
Pas de compte ?
<a href="index.php?action=redirectionInscription">Creer un compte</a>
<a href="inscription">Creer un compte</a>
</div>
</div>
<div class="social">
@ -61,24 +65,22 @@
<rect x="4" y="4" width="16" height="16" rx="4"></rect>
<circle cx="12" cy="12" r="3"></circle>
<line x1="16.5" y1="7.5" x2="16.5" y2="7.501"></line>
</svg>
</svg>
</a>
<a href="#">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-google" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M17.788 5.108a9 9 0 1 0 3.212 6.892h-8"></path>
</svg>
</svg>
</a>
<a href="#">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-twitter" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"></path>
</svg>
</svg>
</a>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,144 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="./vue/Images/gif.gif" type="../Images/gif">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home Page</title>
<!-- CSS only -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https:/stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./vue/css/task.css">
<!-- JavaScript Bundle with Popper -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body style="-webkit-user-select: none; /* Safari */
-ms-user-select: none; /* IE 10 and IE 11 */
user-select: none;">
<?php require($rep.$vues['NavBar']); ?>
<br>
<br>
<br>
<section class="vh-100" style="background-color: white;">
<div class="container py-5 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col col-xl-10">
<div class="card" style="border-radius: 15px;">
<div class="card-body p-5">
<ul class="list-group mb-0">
<?php
foreach($users as $user){
?>
<li
class="list-group-item d-flex justify-content-between align-items-center border-start-0 border-top-0 border-end-0 border-bottom rounded-0 mb-2">
<div class="d-flex align-items-center">
<?= $user->getNom() ?> : <?= $user->getPrenom() ?>
</div>
<a href="index.php?action=SupprimerUtilisateur&idUser=<?= $user->getId() ?>">
<button class="btn btn-default">
<img src="./vue/Images/trash.png" width="20" />
</button>
</a>
</li>
<?php } ?>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
<!-- Footer -->
<footer class="text-center text-lg-start bg-light ">
<br>
<!-- Section: Links -->
<section class="">
<div class="container text-center text-md-start mt-5">
<!-- Grid row -->
<div class="row mt-3">
<!-- Grid column -->
<div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4">
<!-- Content -->
<h6 class="text-uppercase fw-bold mb-4">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-wallet2" viewBox="0 0 16 16">
<path d="M12.136.326A1.5 1.5 0 0 1 14 1.78V3h.5A1.5 1.5 0 0 1 16 4.5v9a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 13.5v-9a1.5 1.5 0 0 1 1.432-1.499L12.136.326zM5.562 3H13V1.78a.5.5 0 0 0-.621-.484L5.562 3zM1.5 4a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5h-13z"/>
</svg> Project
</h6>
<p>
2nd year project, consisting of making a To do List in php
, which contains visitors or users, who can add,
delete, see tasks...
</p>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-2 col-lg-2 col-xl-2 mx-auto mb-4">
<!-- Links -->
<h6 class="text-uppercase fw-bold mb-4">
Products
</h6>
<p>
<img src="https://img.shields.io/badge/HTML-000?style=for-the-badge&logo=html5&logoColor=orange&color=f8f9fa">
</img>
</p>
<p>
<img src="https://img.shields.io/badge/CSS-000?style=for-the-badge&logo=Css3&logoColor=blue&color=f8f9fa">
</img>
</p>
<p>
<img src="https://img.shields.io/badge/PHP-000?style=for-the-badge&logo=php&logoColor=purple&color=f8f9fa">
</img>
</p>
<p>
<img src="https://img.shields.io/badge/JavaScript-000?style=for-the-badge&logo=javascript&logoColor=yellow&color=f8f9fa">
</img>
</p>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4">
<!-- Links -->
<h6 class="text-uppercase fw-bold mb-4">Contact</h6>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="currentColor" class="bi bi-envelope" viewBox="0 0 16 16">
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"/>
</svg>
emre.kartal@etu.uca.fr
</p>
<p>
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="currentColor" class="bi bi-envelope" viewBox="0 0 16 16">
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z"/>
</svg>
rayhan.hassou@etu.uca.fr
</p>
<p><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pin" viewBox="0 0 16 16">
<path d="M4.146.146A.5.5 0 0 1 4.5 0h7a.5.5 0 0 1 .5.5c0 .68-.342 1.174-.646 1.479-.126.125-.25.224-.354.298v4.431l.078.048c.203.127.476.314.751.555C12.36 7.775 13 8.527 13 9.5a.5.5 0 0 1-.5.5h-4v4.5c0 .276-.224 1.5-.5 1.5s-.5-1.224-.5-1.5V10h-4a.5.5 0 0 1-.5-.5c0-.973.64-1.725 1.17-2.189A5.921 5.921 0 0 1 5 6.708V2.277a2.77 2.77 0 0 1-.354-.298C4.342 1.674 4 1.179 4 .5a.5.5 0 0 1 .146-.354zm1.58 1.408-.002-.001.002.001zm-.002-.001.002.001A.5.5 0 0 1 6 2v5a.5.5 0 0 1-.276.447h-.002l-.012.007-.054.03a4.922 4.922 0 0 0-.827.58c-.318.278-.585.596-.725.936h7.792c-.14-.34-.407-.658-.725-.936a4.915 4.915 0 0 0-.881-.61l-.012-.006h-.002A.5.5 0 0 1 10 7V2a.5.5 0 0 1 .295-.458 1.775 1.775 0 0 0 .351-.271c.08-.08.155-.17.214-.271H5.14c.06.1.133.191.214.271a1.78 1.78 0 0 0 .37.282z"/>
</svg> Groupe 4</p>
</div>
<!-- Grid column -->
</div>
<!-- Grid row -->
</div>
</section>
<!-- Section: Links -->
<!-- Copyright -->
<div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05);">
© 2021 Copyright:
<a class="text-reset fw-bold" href="#">ToDoList.com</a>
</div>
<!-- Copyright -->
</footer>
</html>

@ -0,0 +1,125 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="./vue/Images/gif.gif" type="../Images/gif">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Profil Page</title>
<!-- CSS only -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https:/stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- JavaScript Bundle with Popper -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<section style="background-color: white;">
<div class="container py-5">
<div class="row">
<div class="col">
<nav aria-label="breadcrumb" class="bg-info rounded-3 p-3 mb-4">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="VueListePublic">Home</a></li>
<li class="breadcrumb-item"><a href="#">User</a></li>
<li class="breadcrumb-item active" aria-current="page">User Profile</li>
</ol>
</nav>
</div>
</div>
<div class="col-lg-15">
<div class="card mb-1">
<div class="card-body">
<div class="col-sm-15 text-center">
<p class="mb-0">Nom Prénom</p>
</div>
<div class="col-sm-14 text-center">
<p class="text-muted mb-0"><?php echo $user->getNom().' '.$user->getPrenom()?></p>
</div>
<hr>
<div class="col-sm-15 text-center">
<p class="mb-0">Pseudo</p>
</div>
<div class="col-sm-14 text-center">
<p class="text-muted mb-0"><?php echo $user->getPseudo()?></p>
</div>
<hr>
<div class="col-sm-15 text-center">
<p class="mb-0">Email</p>
</div>
<div class="col-sm-14 text-center">
<p class="text-muted mb-0"><?php echo $user->getMail()?></p>
</div>
<hr>
<div class="col-sm-15 text-center">
<p class="mb-0">Nombre de liste</p>
</div>
<div class="col-sm-14 text-center">
<p class="text-muted mb-0"><?php echo $nombreListe ?></p>
</div>
</div>
</div>
<div class="text-center">
<br>
<a type="button" class="btn btn-outline-info waves-effect" href="#" data-toggle="modal" data-target="#modalModifier">
Changer mot de passe
</a>
<a type="button" class="btn btn-outline-danger waves-effect" href="#" data-toggle="modal" data-target="#modalSupp">
Supprimer le compte
</a>
<!-- Modal Modifier -->
<div class="modal fade" id="modalModifier" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modification du mot de passe</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form class="col" method="POST">
<div class="form-group">
<input type="password" class="form-control" name ="passwordCurrent" placeholder="Mot de passe actuel" required autofocus>
</div>
<div class="form-group">
<input type="password" class="form-control" name="newPassword" id="description" placeholder="Nouveau mot de passe" required autofocus>
</div>
<div class="form-group">
<input type="password" class="form-control" name="confirmNewPassword" id="description" placeholder="Confirmer le mot de passe" required autofocus>
</div>
<button type="submit" class="btn btn-primary pull-right">Terminer</button>
<input type="hidden" name="action" value="modifMdp">
</form>
</div>
</div>
</div>
</div>
<!-- Modal Supprimer -->
<div class="modal fade" id="modalSupp" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Suppression du compte</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
Êtes-vous sûr de vouloir supprimer votre compte ?
</div>
<div class="modal-footer">
<a href="supprimerCompte" class="btn btn-danger">Supprimer quand même</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
</html>
Loading…
Cancel
Save