Compare commits

...

65 Commits
emre ... master

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
Rayhân HASSOU 1fc3033846 reglage des conflits
2 years ago
Rayhân HASSOU f0f966a2bb affichage des listes publiques et supression des taches/listes
2 years ago
Emre KARTAL 4d0b02b9f8 Ajout du fichier .htaccess (Réecriture Url), Renommer tout les dossier et Classe sous forme Coding Standard, class Validation presque finie (mais fonctionne), trier tout les classes dans des sous-dossier (+ajout dans l autoloader), Page Inscription fonctionne mais ne fait pas la gestion des erreurs! Il me reste à finir le login et Inscription erreur
2 years ago
Emre KARTAL 0a40a33175 Arborescence du projet améliorer, Front Controlleur générique fait et créer les modeles visiteurs,utilisateurs et admin
2 years ago
Emre KARTAL 08ea2c146d Le CONTROLLER FONCTIONNEEEEEEEEEEEEEEEEEEE
2 years ago
Emre KARTAL de3fbfb47e Amélioration du code, vue, Controlleur...
2 years ago
Emre KARTAL d672c5132c Amélioration du visuel, Navbar réaliser pour qu il s adapte à l utilisateur et le visiteur, le modele et controleur est maintenant bien structurer, le problème reste l autoload
2 years ago
Emre KARTAL 5e1bdf09de Correction des erreurs, je te laisse voir l ancien push
2 years ago
Emre KARTAL 27f0e15458 Ajout d'un modele pour Utilisateur, j ai commencer à pouvoir inscrire une personne et que le formulaire d'inscription est bien vérifier, j ai changer les vues (design, nom, css...), J ai changer presque tout les classes de façon plus optimiser, j ai ajouter le FrontControleur.php!
2 years ago
Rayhân HASSOU 7d758156fd Ajout de la classe Liste et liste Gateway, affiachage de tache ne fonctionne pas
2 years ago
Emre KARTAL e45ee52b3c Transférer les fichiers vers 'doc/Diagrammes'
2 years ago
Emre KARTAL 1c059a4fd2 Supprimer 'doc/Diagrammes/DiagrammeClasse (1).drawio'
2 years ago
Emre KARTAL 97ceaa6925 Transférer les fichiers vers 'doc/Diagrammes'
2 years ago
Emre KARTAL d61ea1b0ab Supprimer 'doc/Diagrammes/DiagrammeClasse.drawio'
2 years ago
Emre KARTAL f2d0dd6e54 J ai fait le UserGateway (possible qu il lui manque des méthodes), la classe TacheGateway est à refaire(je peut le faire), les problèmes que je rencontre sont :Faut-il l attribut id dans les classe, l attribut mot de passe pour l utilisateur comment hasher et dehasher le mdp et comme faire le frontController! Du coup je poserais des question aux profs! (Si t tout lu t un goat)
2 years ago
Emre KARTAL 7b4d66976a Transférer les fichiers vers 'doc'
2 years ago
Emre KARTAL 2d33f22155 Supprimer 'doc/Mld/Mld.drawio'
2 years ago
Emre KARTAL d0621eb53f Supprimer 'doc/Mld/Mld.png'
2 years ago
Emre KARTAL b8bc2156ca Supprimer 'doc/Maquette/Inscription.pdf'
2 years ago
Emre KARTAL eb62c61f2a Amélioration de la page home seh maintenant c est style et j en ai marre d être le goat sérieux 💪
2 years ago
Emre KARTAL 2f754ae7a8 J ai mis un navbar sur la page Home
2 years ago
Rayhân HASSOU fdc0578914 ajout gateway
2 years ago
Emre KARTAL 90932e4563 Amélioration des pages + debut de la page home
2 years ago
Rayhân HASSOU cca15a1572 ajout de classe
2 years ago
Emre KARTAL e1c9f9873a Réglage des problème du MVC
2 years ago
Emre KARTAL 2c9cf5e805 Amélioration des vues et ajout de la page login
2 years ago
Emre KARTAL 802b7cab86 Amélioration de la page de l inscription avec l ajout d un checkbox styler
2 years ago
Rayhân HASSOU 5efdb0aa09 Merge pull request 'ajout des diagrammes et changement des couleurs' (#8) from rayhan into master
2 years ago
Rayhân HASSOU 78c906a6d3 ajout des diagrammes et changement des couleurs
2 years ago
Emre KARTAL 6fecace1ae Amélioration de la page login +Autoloader commencer
2 years ago
Emre KARTAL 0c09742cb9 Vue de la page login presque terminer mais non fonctionnel
2 years ago
Emre KARTAL 28a8f1f5c2 Mld et Maquette ajouter
2 years ago
Emre KARTAL fe1a90e777 Supprimer 'src/Vue/aSupp'
2 years ago
Rayhân HASSOU 666adfb7d2 Merge pull request 'ajout des dossiers html/css/javascript et ajout des vues pour la partie inscription' (#1) from rayhan into master
2 years ago
Rayhân HASSOU 52c2586699 ajout des dossiers html/css/javascript et ajout des vues pour la partie inscription
2 years ago
Emre KARTAL caa6c1e841 Modification README.md
2 years ago
Emre KARTAL 20c1af6fad Amélioration du README.md
2 years ago
Emre KARTAL f64e9d535f Evolution du markdown + ajout des dossier + Logo du site
2 years ago

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

@ -1,3 +1,82 @@
# Projet_ToDoList_Php # Presentation Projet_ToDoList_Php
Projet de PHP consistant à faire une To do List. <div align = center>
![Image de l'application](Logo.png)
</div>
**Nom de lapplication** : ToDoList
</br>
**Thème de lapplication** : Répertorier les tâches à accomplir.
</br>
**Récapitulation de notre application** :
</br>
:information_source: Réaliser un projet de PHP consistant à faire une To do List, qui contiendra des visiteurs, utilisateurs ou administrateur.
# 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**
[**doc**](doc) : **Documentation de l'application, englobant la phase avant le commencement de l'application (Maquette, Diagramme de classe UML, Diagramme de classe)**
# Environnement de Travail
Notre environnement de travail se base sur plusieurs outils :
<div align = center>
---
&nbsp; ![HTML](https://img.shields.io/badge/HTML-000?style=for-the-badge&logo=html5&logoColor=white&color=orange)
&nbsp; ![CSS](https://img.shields.io/badge/CSS-000?style=for-the-badge&logo=css3&logoColor=white&color=darkblue)
&nbsp; ![PHP](https://img.shields.io/badge/PHP-000?style=for-the-badge&logo=Php&logoColor=white&color=purple)
&nbsp; ![PHPMYADMIN](https://img.shields.io/badge/phpMyAdmin-000?style=for-the-badge&logo=PhpMyAdmin&logoColor=blue&color=orange)
---
</div>
# 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:
<br>
⚙️ Emre KARTAL
<br>
⚙️ Rayhan HASSOU
<br>
<div align = center>
© Groupe 4
</div>

@ -0,0 +1,235 @@
-- phpMyAdmin SQL Dump
-- version 5.0.4deb2
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- 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
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `dbemkartal1`
--
-- --------------------------------------------------------
--
-- Structure de la table `MaTable`
--
CREATE TABLE `MaTable` (
`Id` int(11) NOT NULL,
`Nom` varchar(40) NOT NULL,
`Prenom` varchar(40) NOT NULL,
`Aigritude` int(11) NOT NULL,
`Age` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='J''en ai marre d''être le goat';
--
-- Déchargement des données de la table `MaTable`
--
INSERT INTO `MaTable` (`Id`, `Nom`, `Prenom`, `Aigritude`, `Age`) VALUES
(1, 'Kartal', 'Emre', 2, 18),
(2, 'Hassou', 'Rayhan', 4, 15),
(3, 'Skeleton', 'Armure', 150, 5),
(10, 'Khedair', 'Rami', 17, 20);
-- --------------------------------------------------------
--
-- 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`
--
CREATE TABLE `ToDoList_Liste` (
`id` int(11) NOT NULL,
`nom` varchar(50) NOT NULL,
`description` varchar(200) NOT NULL,
`dateCreation` date NOT NULL,
`estPublic` tinyint(1) NOT NULL,
`idUtilisateur` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Déchargement des données de la table `ToDoList_Liste`
--
INSERT INTO `ToDoList_Liste` (`id`, `nom`, `description`, `dateCreation`, `estPublic`, `idUtilisateur`) VALUES
(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);
-- --------------------------------------------------------
--
-- Structure de la table `ToDoList_Tache`
--
CREATE TABLE `ToDoList_Tache` (
`id` int(11) NOT NULL,
`nom` varchar(50) NOT NULL,
`description` varchar(200) NOT NULL,
`dateCreation` date NOT NULL,
`estValide` tinyint(1) NOT NULL,
`idListe` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Déchargement des données de la table `ToDoList_Tache`
--
INSERT INTO `ToDoList_Tache` (`id`, `nom`, `description`, `dateCreation`, `estValide`, `idListe`) VALUES
(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);
-- --------------------------------------------------------
--
-- Structure de la table `ToDoList_Utilisateur`
--
CREATE TABLE `ToDoList_Utilisateur` (
`id` int(11) NOT NULL,
`nom` varchar(50) NOT NULL,
`prenom` varchar(50) NOT NULL,
`pseudo` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`motDePasse` varchar(150) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Déchargement des données de la table `ToDoList_Utilisateur`
--
INSERT INTO `ToDoList_Utilisateur` (`id`, `nom`, `prenom`, `pseudo`, `email`, `motDePasse`) VALUES
(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
--
--
-- Index pour la table `MaTable`
--
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 `ToDoList_Liste_ibfk_1` (`idUtilisateur`);
--
-- Index pour la table `ToDoList_Tache`
--
ALTER TABLE `ToDoList_Tache`
ADD PRIMARY KEY (`id`),
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 `pseudo` (`pseudo`);
--
-- AUTO_INCREMENT pour les tables déchargées
--
--
-- AUTO_INCREMENT pour la table `MaTable`
--
ALTER TABLE `MaTable`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;
--
-- AUTO_INCREMENT pour la table `ToDoList_Liste`
--
ALTER TABLE `ToDoList_Liste`
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=152;
--
-- AUTO_INCREMENT pour la table `ToDoList_Utilisateur`
--
ALTER TABLE `ToDoList_Utilisateur`
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`) 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`) ON DELETE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2022-11-29T17:20:13.880Z" agent="5.0 (Windows)" version="20.6.0" etag="gG6WG0mNFjTJEFq49oK-"><diagram id="m6SvVhZh1tycoRW3iEHN" name="Page-1">7ZvbcpswEIafhst2LDC2cxmTtJ3JoZm6h5neKSCDGoFcIcdOnr4rEGBQ0ubQWL7QjGeCflZC2v2E2cXxgijffhR4lV3whDDPHyVbLzjxfB+h8Qz+KOWuViZTLaSCJtqoExb0nmhxpNU1TUjZM5ScM0lXfTHmRUFi2dOwEHzTN1ty1r/qCqfEEBYxZqb6gyYyq9WZP+30T4SmWXNlNDmqz+S4MdYrKTOc8M2OFJx6QSQ4l/VRvo0IU85r/FL3+/DI2XZighTyKR2WLLj6vYh/Tj9/vQ389Nfl5dnZOz3KLWZrveCvOM6InrG8a9xQbmjOcAGt+ZIXcqHPjKAdZ5Ql5/iOr9U0Sonjm6Y1z7ig92CPGZxCIMBpIXWUg1HPYqF66jEFKcHmqlkbGkgXeNszPMelbGbDGcOrkl5X81MdcyxSWsy5lDzXRpuMSrJY4VjZbABcNRGZN5PUPiFCku2jzkZtCIF9wnMixR2Y6A5t1DX2Lc+bDiI01lq2A1BriDW4aTt2F1s40OF9Rqh9I9SeP2EqSms4SNUB9NcSXKFVDRjALbKKpeA3JOKMC9ALXtNBGRtImNG0gCYjS9VN+ZXCBjvWck6TRI08LyEgtEjPK7OTcad80e5REofuS1btoww6EhhhvuK0kJW7wjl8wIHR6H3ohTDXCNqoa8NHmQsZ8QKmj2kVTQL4bIhCaC64xBJft3D/D1Ie33gmPhqX4Im0BG8FS2DAUsDucSDsG4SJbRDGBggnpIwFXUnKCwfE3oE4sg3ExAQCSxIJgh0RVohAvm0k0NRgAjz0HWKZeFHgHR+Zz5MOizfHIrSNhUmF5wc0OaeldEBYAGJmG4iZAcTDLLhk83nJZjg+uGTzyCWbB3RjmB12stlQ6LJNyyRYzzaRWY906aZNIqynm8gsW7p80yoS9vNN3+WbB4iF9XwTmUXrKuGs7hVkLRwU+4fCes6JzHqlwQEpkmP1qhhaMcNlSeO+dwRfFwlJtCvr7iQx3hsP0jW4BF+LmPxtcrUdpKkpeYGTd5waPuDTRhOEwXflbX+6DzlaX+FKYdhll0HYzy4DfxCrepm6l7/zAnow0Hg0SFOng4FqPxgDVXFvl/0KFMz6wzdJGS0fvju4KsTrqhDh9Il7/+2qEMiVIQ7puwIdeB2iubG5OoRtFKwXInyzELGCJTkabNBgvQjRPDPu0lCSdcIdDfun4QDqD2aieZpjyhwNFmiwXnbwQ4OGCy5P4Lm9LF0hygYS1osO/iEXHXQW/M+iw2Ne3lPVYTLIJsNBsJ5cdUCDgUaDgV5cdYBm9+v92rz7H4jg9A8=</diagram></mxfile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2022-11-18T08:53:01.103Z" agent="5.0 (X11)" etag="T0h4_q4_bEF78AhTsrVm" version="20.5.3" type="device"><diagram id="YT-LZJT85HNrmgPDGNfd" name="Page-1">7Vpdj5s4FP010T5NhG0+H5NMp6NVV5o2/XxaEfAEq4BZYyZJf/2aYBKw6ZBOSUh3q5Ey+GJsc+65514ME7RItq+Zn0V/0RDHE2iE2wm6nUDoAlP8loZdZYCGCSrLmpGwsjUMS/INS6MhrQUJcd7qyCmNOcnaxoCmKQ54y+YzRjftbo80bs+a+WusGZaBH+vWTyTkkbwv6Bzt95iso3pmYHvVmcSvO8s7ySM/pJuGCb2aoAWjlFdHyXaB4xK8GpfqurvvnD0sjOGUn3KBh2i0zJbv33zdBm9v7nPjLXt/I0d58uNC3rBcLN/VCGwiwvEy84OyvRFenqB5xJNYtIA49POswv2RbLGYaq6vq54EM463DZNc52tME8zZTnSpzzoSM8maG1O2N0cX2HWfqAH/wehLt68PYx+REQcSnB8ACnYAZcdi2nlInsThujz8kGNWm8UsjTMdnWvTiqkW9VLFIYJIWXlYJPEs4JSJPiW0RJD2jb/C8QPNCSc0FV1WlHOaNDrMYrIuT3CquJEWPCYpXhzCyBjGlV7bkxDpnkRdjjyXH5Hmx1mYkPQ/BTLyRgbZ7FcVnIazUp5L/GIafBVACJPUf2BXzTtSzrtHqYEio0UallLzPHw4bCn7d8EzprZtO229sTT8QA0Ww7HPyVM7PXQhKCd8oEQs7ChthtX2las4IacFC7C8qinnfQMBZSDuszXmzwxUd6SPjzlu9dk7/YDUy3lgazxY4mOuLrVSZUUci8QuGvOerDNA0FjIbAEIgB41AHaEjeqxwcLG1eH6g6R5wAjDo0IFvTZU1thIgRPqlobCpDTFL9KQKhj7y4Iq1vojoVeTGohaHYBaw4gQUhKGqZZNp4qQaSoDwdNEaCiBAV1l2Sg8qJ9N+ojg/ibCWYig13ULNlmgyczbl+R+UqpiusrLf0WK964KonFlFaH+4vjCuqpXbh8pYWXOFg/hArM9pFAAl4+LnKtUvOMjZ12JEtWR0KtE8LqUCA2kRCo1Lq5EetE7EhHM30QYlQiORoRlkWWMJGVGMoq0/OEkJrnPcTHus5AKugVH11P9YegsYdQbHbUbryQ8Dl6oWY1+1fDwNAfLUoPTgu+rjfiqag4TtB+CzY5N6cvGSD3Zle+znWMXDbTJC1XynryLpgwE1HA6cxTAro0M7VXBR5KTKkf8ku8WBgg+9TXCyBvcUC/ypHh1aJaRFauYBNf1xHQzeoaHen30MxleQMN2n5uNL2VjatXN223z5O3upwvsk0sIeGW7f0qxh4yBSojDAi8lnldTI3pX5eDBakTLvJiD53fvgsW3L//cf/hEPucPf/8JNu86v06QW3kymTVbJA3iIsQH47rVpTvfNehBM5y2qyNYJlU/j/YMAf3UUdx/5v0b+1m9N6YGVF9webriD1SPIVshivlSxsGegS77VrOTlfpW8/+AladuJvWy0oPtOsQ+GylNz5o6NgCmK5ZqWshrv+SHljN1XQA8w3VNy62TyQ8z1nanyHJM4CKhl+JPiTk4BY4jUq7tuKbhIfuCdBbN4+dlVffjR3ro1b8=</diagram></mxfile>

@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2022-11-29T22:01:04.454Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" etag="p4d9js68z-fKG3dQp_s_" version="20.6.0" type="device"><diagram id="EhPrNy5HpteiR21U6QY4" name="Page-1">7V3bcqO4Fv0a1+nz0C5AXOzH2O65VCVTqXFPz8yjYpSYGgw+gHOZrz/iIgzawhbEQNqtrlSXJUCA1tZmr8WWmKDl7vXnCO+3d6FL/Imhua8TtJoYBtIMY5L+ae5bXqObppnXPEWeW9QdK9bev6So1Irag+eSuLZjEoZ+4u3rlZswCMgmqdXhKApf6rs9hn79rHv8REDFeoN9WPun5ybbvHZmOMf6X4j3tGVn1u15vmWH2c7FncRb7IYvlSr0ZYKWURgm+a/d65L4ae+xfsmP+6lha3lhEQkSqQNstJz/decmm/Wfs8/z3Rdz6X0uWnnG/qG44W9e7CXkEMXFVSdvrCviF2/n44CWFo9hkKyLLRotY997CujvDb0WEtGKZxIlHu3Fm2JDEu5p7Wbr+e4tfgsP6RXHCd78w0qLbRh5/9JmsU836bSCbo6SwiAMu7bHOj2yOHVEYrrPPesGvay6xXFS7LMJfR/vY+8hu+B0lx2OnrxgESZJuGMNhYfAJW5RKtHKCkkU/lPinx5fdBu9S/LaiIdeokzHBwl3JIne6C7sgJlWWAYbG6WpvBwtTbeLum3FysyiDhfG/VQ2Xp7vdzoYcPBEb7g8ITLr50Mzwekcwelo79dOh30KcoATski7LK5aHf1RuddjVWaLLezSAHYJzNH3MlPcJrujxfAwMbv0yWMisMqd57ppc4t4jzde8PQ1tdLVZ/1Yc5sduELHmt+LfkGZySQ4wQ/lMPDxA/HvQzqAvDBtP8r3XexDL0iyzrMWE2uV1UTJMgzoFWMvMxdCrfWFpBYraVuNoxka3FsdxnPWNWs2rhrMbTFFANNbL06IrJ8xlJ/p5mc0xPkZpEn6Gd02uzgagz+hKXm+ERzNDHoauj9vkrT3k/PuJDe+uucwoedIq0J67KOfAb+lTogEAm9S9xoL2l9LbWql/sNY0rJ+LJ91KSdsrvCf2rscD7qI4+Hhv5jnMQHGv9HhSJ+26Ib+v04iis7VYd4XmpYxMpoWQJPe8P3hwfc2JaYLyhEUopKIOrOREbVFiH6jOLmTJZrczInCtQuuumaODKwDgF3Rp/kyymHFWZjMoE23KGhloUUdQ6qLQTsD0ALwFENri6o1MkWbA1D/SDzfi3GqCAF8lSB0WaJWCjKlIDSTtAfdPjHMm4majiQUoY9C1KBUqYhaa/8zP+l/RidqTPXnmdqVodwXfqNTMx0O0nt6R1cI4bgDdXTGpkPZ7D4mBze8OqD7gnB8cqZDQf7LDnvXx6/HHavjUzUdKmYAY8XV2sI6NlfToWo2SU0I6UdrvqJB3BuOtqwf7gtHKJJ9xZut9HtRRbc70m3wXlSTpb8d34t+TwkYMxgcKLrdPiHDOel7xufbUMVVb0a74zk+/4YC7orEm8jbV161LI3JjabQbY3u6KTbgOqYep12GWzHZ+MGlM6aXoKrgdsS3NEZOCMPioFfFNexKbgBg2QAKwncm3QeAi1tfBzH3qYOcj0EJa9e8lf6m46ZvPR3ZcvqtVp4Y4WA3kvloLT4d9F6VjgelpXYcfmlEhdMgOAYFL2d8BBtyImOKPqBMsYn0gXQCoCWAD9WFxGfPuSe69d7goPdp3ZaYXyGwzE+xFpmjeR3Whx3tA7YlG5xTRk211TeGaCpi2XIw6RGbToNoP1RfG/TcVw3u7OKQelLMjbf6PFXpwZ4MSmnOHhSzm84O/CNhjyJovnP2tSesVfeBQDMBrvaCNslfHyMST+ISciwLb0FG/l6ddxX3EDDyGdehvZjOkOr4mho2TrtbGjhnkQe7YzUbC7tSNh7pbOexBrVkSDgSJyujgQkfYCm+nYkUEe+IkfSYCdHR2I6yKkB8PH9SINg/DNlfC/4DQCndOPL6sYGP2I1S5I80sF+1o6+c93YUHmhXZiOcRmhuDeiA3XFL65HjelTKjqQ/wKIf1wt4gySaGydCUERcX3Y79OILvqkgJQG0h5bU0JQMFxGhIKYpdvRNjX3KP0rYKWBlc257g9YKBYuQxrfqeHZAkWdMcnxYJQQByshEI/ZQxHjLiqSQLjP8HBxvM0C3pz2s1VTZs1qYo3inyb4k8uR+SaILi7jlQJ/exlvzjfF+N9A7BtBGS9bFUGRuWHIHEgCsizJB3tpOtdL5pBKHO00yc88+Wgam8whKPgVZE7FF9Igjs/joAp4j+OYRPlKCApLeSzHp3JQNCuwjLznPPtD4SmP5/gMDsplJTVXOErjOD6HM6FY9pVEOxryqIdlGyDR2KmTJhTLlOrZBUnp2TK9IQnVMQDfULLK1LTsiXSaVr+ZE03AvVts4d92Wt3FFg3VmzL5hUx7FltMKMlV1jdRksswkguyJSSXMsXjB5NcTKgHAoNUkkvDyG4juQgNrC/JxYRCWi655IsmUF5weCb4kJdUOCKNq0CFEeLaXzQCtbQ1WebZaiS6w57/KV9SIX0fuwuTFcmIvYJYGmKBODMwxFBoq0BcDOB9sfhJCfNewdwKZoFmMzDMUINbkxXZMKAVS5QHUyTcDIwmVOBKvl8J+evjljpqBbI8yAJRZ1iQLajOfQu9KHt/rkC+DMgCvWdgkKFyB+AbUO+pzpZJp8/oY2o+TeC9V/MxAUPnhRppzce05lPGfkrZh62TMJDsw04n+MqR0nyG0Xwc8A0SQVyPkMCx8NMqr0/ysSQSBZXk0zCq20g+QvvqS/KxoJC3/o8XpBnZEfn0G8vRZsujZr8rccpdqRrclXRShS2y4At0ISH4/UUtEplzVxm1XD4YmYEJsvwjQToYoU3Re9fKf0a9YcNGU25ht74jEygfZsrSa7aSj4pJeo1JwPcXLdnvol3/9xctKHqqmETisWS3jUkGzfy1JCbndl2vxjSrK9boU92Zt37IfICVbFii0PkFKBqgHmopG955zYzOT0V+Os2MXxWn4SlI7SSlzuVuxShrvmgdXHRxplNP7JNH0B/5VVzW+0H1+NQ4CULeEYoHiV4ZIANOwzLHtVRA/e3Oiy4Ba7AHnq3FnHUvDtSa1R3o3LiYA9WGc6CM9350BzrjojGYjCZvlvwkQsTnKfVtloKp4DRQj0Jf+NmuLd6nPw87/6cI71LX9bL1ErKm8VVa/xLhfd1k5QIiMZzFAbZR7yNH8K1zQ5hIqp0Itt/31UkD9loS+R2/eNaZWyGtPbfKq+7wa23HtozrErBypu/MBZzGFMB6ikK9D1WopqaoMsFfQdoaUtHqqcNCCqXUFNIbd+e1UkkUnhm5FE1wHhbPrgshZph0WR9RmzqzOqOcajo6ExRlJRBhlfGaZqNqPN+boioRStkNFjBQKKUhc2odVVWt/rp3zgdDsnGVw7NFXR84rILq7LcDiT9GQGXxtKrsnepLDxHsPUZUUDX8Nah8fkC56jOY8pxEZ65yPF8NJcNObyh+TEAd/eMBCrWtLGGOVmUrB/xP6OEUsNxIBct/mwJtf1BgmYpb+/Zq+Cj4nqNC89ww/QBoSqQ9XjpGtgwQI8/fFyNbllmJkdPMA41NmB0lYZJFdB88okZgVbJZxxjaBBEFP3u35xjagSJb73asafx6+KbZxY5rqTZp4R4n6Zv3rMbQzGsicSb4GCLPErqb3MAL2jtQAcT7PT0QJtB9l2va50Oq8WFGvaw+tz/8KvYOFPVuNkkoEGiP7Drf4QjHLZfuUabNidOfKgjTiCZNXymm8V0ukuA991ygh7fNcn5fHDGY1tZhrdFBnvYf5iFudM3QgL554G8NOQIhLPSSK3Gnpz8Rok1ti70pfKudsat9sA8WcUf06GqhLHcXukTwPBxFydQ1nn5pokRMTZQaOeclYQnHSYtRGCbVPqa3tc26hFb+Hw==</diagram></mxfile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

@ -0,0 +1,34 @@
#--------------------------------
# Config
#--------------------------------
Options +FollowSymlinks
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]

BIN
src/config/.DS_Store vendored

Binary file not shown.

@ -0,0 +1,51 @@
<?php
class Autoload
{
private static $_instance = null;
public static function charger()
{
if(null !== self::$_instance) {
throw new RuntimeException(sprintf('%s is already started', __CLASS__));
}
self::$_instance = new self();
if(!spl_autoload_register(array(self::$_instance, '_autoload'), false)) {
throw RuntimeException(sprintf('%s : Could not start the autoload', __CLASS__));
}
}
public static function shutDown()
{
if(null !== self::$_instance) {
if(!spl_autoload_unregister(array(self::$_instance, '_autoload'))) {
throw new RuntimeException('Could not stop the autoload');
}
self::$_instance = null;
}
}
private static function _autoload($class)
{
global $rep;
$filename = $class.'.php';
$dir =array('modele/','./','config/','controller/','modele/metier/','modele/gateway/');
foreach ($dir as $d){
$file=$rep.$d.$filename;
//echo $file;
if (file_exists($file))
{
include $file;
}
}
}
}
?>

@ -0,0 +1,31 @@
<?php
class Connection extends PDO {
private $stmt;
public function __construct(string $dsn, string $username, string $password) {
parent::__construct($dsn,$username,$password);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
/** * @param string $query
* @param array $parameters *
* @return bool Returns `true` on success, `false` otherwise
*/
public function executeQuery(string $query, array $parameters = []) : bool{
$this->stmt = parent::prepare($query);
foreach ($parameters as $name => $value) {
$this->stmt->bindValue($name, $value[0], $value[1]);
}
return $this->stmt->execute();
}
public function getResults() : array {
return $this->stmt->fetchall();
}
}

@ -0,0 +1,127 @@
<?php
class Validation {
static function val_form_user(string &$nom, string &$prenom, string &$pseudo, string &$mdp, string &$email, &$dVueErreur) {
//Vérification Nom
$nom = Validation::val_string($nom);
if ($nom == NULL) {
$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::val_string($prenom);
if ($prenom == NULL) {
$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
$email = Validation::val_mail($email);
if ($email == NULL) {
$dVueErreur['mail'] = "Format du mail non-respecter*";
}
//Vérification Pseudo
$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*";
}
if (!preg_match('/^.{5,}$/', $mdp)) {
$dVueErreur['password'] = "Mot de passe trop léger : Plus de 5 caractères minimum !";
}
if(count($dVueErreur)>0){
throw new Exception("Erreur lors de l'inscription*");
}
}
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 cleanMail(string &$str) {
$str = preg_replace('/[^A-Za-z\-\^0-9\.\@]/', '', $str);
if($str == null || $str == '')
{
return null;
}
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))
{
return $mail;
}
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 == '')
{
return null;
}
return intval($int);
}
}
?>

@ -0,0 +1,21 @@
<?php
//gen
$rep=__DIR__.'/../';
//BD
$user='emkartal1';
$pass='achanger';
$dsn='mysql:host=londres.uca.local;dbname=dbemkartal1';
//Vues
$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';
?>

@ -0,0 +1,71 @@
<?php
class CtrlAdmin {
function __construct() {
global $rep,$vues;
$dVueErreur = array ();
try{
$action=NULL;
if(isset($_REQUEST['action'])){
$action = $_REQUEST["action"];
}
switch($action) {
case NULL:
$this->ConsulterUtilisateurs($dVueErreur);
break;
case "redirectionVueUtilisateur":
$this->ConsulterUtilisateurs($dVueErreur);
break;
case "SupprimerUtilisateur":
$this->SupprimerUtilisateur($dVueErreur);
break;
default:
$dVueErreur[] = "Erreur d'appel php";
require ($rep.$vues['erreur']);
break;
}
} catch (PDOException $e)
{
//si erreur BD, pas le cas ici
$dVueErreur[] = "Erreur BD!!! ";
require ($rep.$vues['erreur']);
}
catch (Exception $e2)
{
$dVueErreur[] = "Erreur inattendue!!! ";
require ($rep.$vues['erreur']);
}
//fin
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
?>

@ -0,0 +1,228 @@
<?php
class CtrlUtilisateur {
function __construct() {
global $rep,$vues;
$dVueErreur = array ();
try{
$action=NULL;
if(isset($_REQUEST['action'])){
$action = $_REQUEST["action"];
}
switch($action) {
case NULL:
$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:
$dVueErreur[] = "Erreur d'appel php";
require ($rep.$vues['erreur']);
break;
}
} catch (PDOException $e)
{
//si erreur BD, pas le cas ici
$dVueErreur[] = "Erreur BD!!! ";
require ($rep.$vues['erreur']);
}
catch (Exception $e2)
{
$dVueErreur[] = "Erreur inattendue!!! ";
require ($rep.$vues['erreur']);
}
//fin
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
?>

@ -0,0 +1,238 @@
<?php
class CtrlVisiteur {
function __construct() {
global $rep,$vues;
$dVueErreur = array ();
try{
$action=NULL;
if(isset($_REQUEST['action'])){
$action = $_REQUEST["action"];
}
switch($action) {
//pas d'action, on réinitialise 1er appel
case NULL:
$this->ConsulterListePublic($dVueErreur);
break;
case "validationFormulaire":
$this->ValidationFormulaire($dVueErreur);
break;
case "seConnecter":
$this->seConnecter($dVueErreur);
break;
case "redirectionListePublic":
$this->ConsulterListePublic($dVueErreur);
break;
case "redirectionLogin":
$this->redirectionLogin($dVueErreur);
break;
case "redirectionInscription":
$this->redirectionInscription($dVueErreur);
break;
case "SupprimerTache":
$this->SupprimerTache($dVueErreur);
break;
case "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:
$dVueErreur[] = "Erreur d'appel php";
require ($rep.$vues['erreur']);
break;
}
} catch (PDOException $e)
{
//si erreur BD, pas le cas ici
$dVueErreur[] = "Erreur: Connexion a la base de données impossible! ";
require ($rep.$vues['erreur']);
}
catch (Exception $e)
{
$dVueErreur[] = "Erreur venue de nulle part";
require ($rep.$vues['erreur']);
}
//fin
exit(0);
}//fin constructeur
function ValidationFormulaire(array $dVueErreur) {
global $rep,$vues;
try{
$val = MdlVisiteur::CreerUtilisateur($dVueErreur);
$result=MdlUtilisateur::Connection();
$action=NULL;
$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 $dVueErreur) {
global $rep,$vues;
require ($rep.$vues['login']);
}
function redirectionInscription(array $dVueErreur) {
global $rep,$vues;
require ($rep.$vues['inscription']);
}
function seConnecter(array $dVueErreur) {
global $rep,$vues;
try{
$result=MdlUtilisateur::Connection();
$action=NULL;
$this->ConsulterListePublic($dVueErreur);
}
catch (Exception $e)
{
$ErreurLog=$e->getMessage();
require ($rep.$vues['login']);
}
}
function ConsulterListePublic(array $dVueErreur) {
global $rep,$vues;
$listes = MdlVisiteur::RecupererListePublic();
$taches = MdlVisiteur::RecupererTache();
$action=NULL;
require ($rep.$vues['listPublic']);
}
function SupprimerTache(array $dVueErreur){
$tache = MdlVisiteur::SupprimerTache();
$this->ConsulterListePublic($dVueErreur);
}
function SupprimerListe(array $dVueErreur){
global $rep,$vues;
$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']);
}
}
public function AjouterListePublic(array $dVueErreur){
global $rep,$vues;
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
?>

@ -0,0 +1,69 @@
<?php
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('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;
}
}
?>

@ -0,0 +1,17 @@
<?php
//si controller pas objet
// header('Location: controller/controller.php');
//si controller objet
//chargement config
require_once(__DIR__.'/config/config.php');
//chargement autoloader pour autochargement des classes
require_once(__DIR__.'/config/Autoload.php');
Autoload::charger();
$cont = new FrontControleur();
?>

@ -0,0 +1,32 @@
<?php
class MdlAdmin
{
public function __construct(){
}
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 supprimerUtilisateur(){
$userGtw = new UtilisateurGateway();
$userGtw->SupprimerUtilisateur($_GET['idUser']);
}
}

@ -0,0 +1,158 @@
<?php
class MdlUtilisateur
{
public function __construct(){
}
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();
$id=Validation::cleanInt($_SESSION['id']);
$userGtw->SupprimerUtilisateur(intval($id));
MdlUtilisateur::déconnexion();
}
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");
}
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);
}
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 RecupererTache(){
$taskGtw = new TacheGateway();
return $taskGtw->getTache();
}
public static function SupprimerListe(){
$listeGtw = new ListeGateway();
$taskGtw = new TacheGateway();
$id = $_GET['idListe'];
$taskGtw->SupprimerViaListe($id);
$listeGtw->Supprimer($id);
}
public static function check(){
$taskGtw = new TacheGateway();
$id = $_POST['idTache'];
$taskGtw->isDone($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);
}
}

@ -0,0 +1,90 @@
<?php
class MdlVisiteur
{
public function __construct(){
}
public static function CreerUtilisateur(&$dVueErreur){
$userGtw = new UtilisateurGateway();
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(){
$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(){
$taskGtw = new TacheGateway();
return $taskGtw->getTache();
}
public static function SupprimerTache(){
$taskGtw = new TacheGateway();
$id = $_GET['idTache'];
$taskGtw->Supprimer($id);
}
public static function SupprimerListe(){
$listGtw = new ListeGateway();
$taskGtw = new TacheGateway();
$id = $_GET['idListe'];
$taskGtw->SupprimerViaListe($id);
$listGtw->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);
}
public function ModifierListe(&$dVueErreur){
$listGtw = 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){
$listGtw->EditerNom($id, $nom);
}
else if($nom == NULL){
$listGtw->EditerDescription($id, $description);
}
else{
$listGtw->Editer($id, $nom, $description);
}
}
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);
}
public static function check(){
$taskGtw = new TacheGateway();
$id = Validation::cleanInt($_POST['idTache']);
$taskGtw->isDone($id);
}
}

@ -0,0 +1,69 @@
<?php
class ListeGateway{
private $con;
public function __construct(){
global $dsn,$user,$pass;
$this->con=new Connection($dsn,$user,$pass);
}
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(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 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 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 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){
$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;
}
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;
}
}
?>

@ -0,0 +1,60 @@
<?php
class TacheGateway{
private $con;
public function __construct(){
global $dsn,$user,$pass;
$this->con=new Connection($dsn,$user,$pass);
}
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 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;';
$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;';
$this->con->executeQuery($query);
$taches = [];
foreach ($this->con->getResults() as $tache) {
$taches[] = new Tache($tache["id"],$tache["nom"],$tache["description"],$tache["dateCreation"],$tache["estValide"],$tache["idListe"]);
}
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)));
}
}
?>

@ -0,0 +1,102 @@
<?php
class UtilisateurGateway{
private $con;
public function __construct(){
global $dsn,$user,$pass;
$this->con=new Connection($dsn,$user,$pass);
}
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)";
$this->con->executeQuery($query, array(
'nom' => array($nom, PDO::PARAM_STR),
'prenom' => array($prenom, PDO::PARAM_STR),
'pseudo' => array($pseudo, PDO::PARAM_STR),
'email' => array($email, PDO::PARAM_STR),
'mdp' => array($mdp, PDO::PARAM_STR)));
}
public function SupprimerUtilisateur(int $id){
$query="DELETE FROM ToDoList_Utilisateur WHERE id=:id";
$this->con->executeQuery($query, array(
'id' => array($id, PDO::PARAM_INT)));
}
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;
}
}
// 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;
}
}
// 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 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*");
}
}
}
?>

@ -0,0 +1,70 @@
<?php
class Liste
{
private $id;
private $nom;
private $description;
private $dateCreation;
private $estPublic;
private $idUtilisateur;
public function __construct($id, $nom, $description, $dateCreation, $estPublic, $idUtilisateur){
$this->id = $id;
$this->nom = $nom;
$this->description = $description;
$this->dateCreation = $dateCreation;
$this->estPublic = $estPublic;
$this->idUtilisateur = $idUtilisateur;
}
//Id
public function getId(){
return $this->id;
}
public function setId($id){
$this->id=$id;
}
//Nom
public function getNom(){
return $this->nom;
}
public function getDescription(){
return $this->description;
}
public function setNom($nom){
$this->nom=$nom;
}
//DateCreation
public function getDateCreation(){
return $this->dateCreation;
}
public function setDateCreation($dateCreation){
$this->dateCreation = $dateCreation;
}
//EstPublic
public function getEstPublic(){
return $this->estPublic;
}
public function setEstPublic($estPublic){
$this->estPublic = $estPublic;
}
//idUtilisateur
public function getIdUtilisateur(){
return $this->idUtilisateur;
}
public function setIdUtilisateur($idUtilisateur){
$this->idUtilisateur = $idUtilisateur;
}
}

@ -0,0 +1,75 @@
<?php
class Tache
{
private $id;
private $nom;
private $description;
private $dateCreation;
private $estValide;
private $idListe;
public function __construct($id, $nom, $description,$dateCreation, $estValide,$idListe){
$this->id = $id;
$this->nom = $nom;
$this->description = $description;
$this->dateCreation = $dateCreation;
$this->estValide = $estValide;
$this->idListe = $idListe;
}
//Id
public function getid(){
return $this->id;
}
public function setId($id){
$this->id=$id;
}
//Nom
public function getNom(){
return $this->nom;
}
public function setNom($nom){
$this->nom=$nom;
}
//Description
public function getDescription(){
return $this->description;
}
public function setDescription($description){
$this->description=$description;
}
//DateCreation
public function getDateCreation(){
return $this->dateCreation;
}
public function setDateCreation($dateCreation){
$this->dateCreation = $dateCreation;
}
//EstValide
public function getEstValide(){
return $this->estValide;
}
public function setEstValide($estValide){
$this->estValide = $estValide;
}
//idList
public function getIdListe(){
return $this->idListe;
}
public function setIdListe($idListe){
$this->idListe = $idListe;
}
}

@ -0,0 +1,65 @@
<?php
class Utilisateur
{
private $id;
private $nom;
private $prenom;
private $pseudo;
private $email;
public function __construct($id, $nom, $prenom, $pseudo, $email){
$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;
}
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

@ -0,0 +1,82 @@
/***
The new CSS reset - version 1.7.2 (last updated 23.6.2022)
GitHub page: https://github.com/elad2412/the-new-css-reset
***/
/*
Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property
- The "symbol *" part is to solve Firefox SVG sprite bug
*/
*:where(:not(html, iframe, canvas, img, svg, video):not(svg *, symbol *)) {
display: revert;
}
/* Preferred box-sizing value */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Reapply the pointer cursor for anchor tags */
a, button {
cursor: revert;
}
/* Remove list styles (bullets/numbers) */
ol, ul, menu {
list-style: none;
}
/* For images to not be able to exceed their container */
img {
max-width: 100%;
}
/* removes spacing between cells in tables */
table {
border-collapse: collapse;
}
/* Safari - solving issue when using user-select:none on the <body> text input doesn't working */
input, textarea {
-webkit-user-select: auto;
}
/* revert the 'white-space' property for textarea elements on Safari */
textarea {
white-space: revert;
}
/* minimum style to allow to style meter element */
meter {
-webkit-appearance: revert;
appearance: revert;
}
/* reset default text opacity of input placeholder */
::placeholder {
color: unset;
}
/* fix the feature of 'hidden' attribute.
display:revert; revert to element instead of attribute */
:where([hidden]) {
display: none;
}
/* revert for bug in Chromium browsers
- fix for the content editable attribute will work properly.
- webkit-user-select: auto; added for Safari in case of using user-select:none on wrapper element*/
:where([contenteditable]:not([contenteditable="false"])) {
-moz-user-modify: read-write;
-webkit-user-modify: read-write;
overflow-wrap: break-word;
-webkit-line-break: after-white-space;
-webkit-user-select: auto;
}
/* apply back the draggable feature - exist only in Chromium and Safari */
:where([draggable="true"]) {
-webkit-user-drag: element;
}

@ -0,0 +1,324 @@
@import url("./Vue/css/reset.css");
@import url('https://fonts.googleapis.com/css2?family-Poppins:wght@400;600&display-swap');
body {
font-family: 'Poppins', sans-serif;
min-height: 100vh;
background: linear-gradient(to right, #B7FBFB,#38B6FF);
display: flex;
font-family: sans-serif;
background-color: #81d4fa;
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 {
content: '';
position: absolute;
background: rgba(255,255,255, .15);
inset: 0;
transform: rotate(-5deg);
z-index: -1;
}
/* Model */
.model {
width: 450px;
background: rgba(255,255,255, .5);
padding: 4rem;
border-radius: 10px;
position: relative;
}
.model::before {
content: '';
position: absolute;
background: rgba(255,255,255, .20);
inset: 0;
transform: rotate(-5deg);
z-index: -1;
border-radius: 10px;
}
.main-logo {
margin-bottom: 2rem;
}
.main-logo img {
width: 200px;
}
.main-logo, .login-card-header,.login-card-footer {
text-align: center;
}
.BoutonVisiteur {
display: flex;
align-items: center;
color: rgba(0, 0, 0, .4);
width: 150px;
height: 50px;
background: rgba(255,255,255,.3);
padding: 1rem 1.5rem;
border-radius: 30px;
}
.BoutonVisiteur:hover {
background: white;
transform: scale(1.1);
}
.model a{
text-decoration: none;
color: #35339a;
}
.model a:hover {
text-decoration: underline;
}
.login-card-header {
margin-bottom: 2rem;
}
.login-card-header h1 {
font-size: 2rm;
font-weight: 600;
margin-bottom: .5rem;
}
.login-card-header h1 + div {
font-size: calc(1rem * .8);
opacity: .8;
}
.login-card-form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.login-card-form .form-item {
position: relative;
}
.login-card-form .form-item .form-item-icon {
position: absolute;
top:.82rem;
left: 1.4rem;
font-size: 1.3rem;
opacity: .4;
}
/*CheckBox*/
.check {
cursor: pointer;
position: relative;
margin: auto;
width: 18px;
height: 18px;
-webkit-tap-highlight-color: transparent;
transform: translate3d(0, 0, 0);
}
.check:before {
content: "";
position: absolute;
top: -20px;
left: -15px;
width: 48px;
height: 48px;
border-radius: 50%;
background: rgba(34,50,84,0.03);
opacity: 0;
transition: opacity 0.2s ease;
}
.check svg {
position: relative;
z-index: 1;
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
stroke: #c8ccd4;
stroke-width: 1.5;
transform: translate3d(0, 0, 0);
transition: all 0.2s ease;
}
.check svg path {
stroke-dasharray: 60;
stroke-dashoffset: 0;
}
.check svg polyline {
stroke-dasharray: 22;
stroke-dashoffset: 66;
}
.check:hover:before {
opacity: 1;
}
.check:hover svg {
stroke: #4285f4;
}
#cbx:checked + .check svg {
stroke: #4285f4;
}
#cbx:checked + .check svg path {
stroke-dashoffset: 60;
transition: all 0.3s linear;
}
#cbx:checked + .check svg polyline {
stroke-dashoffset: 42;
transition: all 0.2s linear;
transition-delay: 0.15s;
}
.login-card-form .form-item-other {
display: flex;
align-items: center;
justify-content: space-between;
font-size: calc(1rem*.8);
margin-bottom: .5rem;
}
.login-card-footer {
margin-top: 1.5rem;
font-size: calc(1rem*.8);
}
.model input[type="text"],
.model input[type="password"],
.model input[type="email"] {
border: none;
outline: none;
background: rgba(255,255,255,.3);
padding: 1rem 1.5rem;
padding-left: calc(1rem * 3.5);
border-radius: 100px;
width: 100%;
transition: background .5s;
}
.model input:focus {
background: white;
}
.model input[type="checkbox"] {
width: 16px;
height: 16px;
accent-color: black;
}
.login-card-form button:hover {
background-color: rgba(84,192,255,.85);
cursor: pointer;
}
/* Les réseaux social **/
.social {
display: flex;
flex-direction: column;
gap: 1.5rem;
text-align: center;
margin-top: 3rem;
}
.social > div {
opacity: .8;
text-transform: uppercase;
letter-spacing: 1px;
font-size: calc(1rem * .8);
}
.lesLogo {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
}
.lesLogo a {
display: flex;
align-items: center;
justify-content: center;
color: black;
width: 50px;
height: 50px;
background: rgba(255, 255, 255, .6);
border-radius: 100px;
transition: all .5s;
}
.lesLogo a:hover {
background: white;
transform: scale(1.1);
}
/* Button */
.mon-button{
font-family: 'Poppins', sans-serif;
font-weight: bold;
border-color: transparent;
background-color: transparent;
color: #35339a;
}
.mon-button:hover{
text-decoration: underline 1px;
}
.button-body{
background: #38b6ff;
color: white;
padding: 1rem;
border-radius: 100px;
text-transform: uppercase;
letter-spacing: 2px;
transition: background .5s;
}
.ErreurText{
color: red;
font-size: 0.7rem;
font-weight: bold;
}
.button{
border-color: #38b6ff;
height: 2rem;
width: 5rem;
margin-left: 1rem;
margin-bottom: 1rem;
font-size: 90%;
align-items: center;
border-radius: 12px;
background-color: #38b6ff;
color: white;
display: flex;
justify-content: center;
}
.button:hover {
background-color: #6fc7fa;
}
/* Responsive */
@media (max-width: 768px) {
body {
padding: 2rem 0;
}
.login-card {
width: 300px;
padding: 2rem;
}
}

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

@ -0,0 +1,63 @@
<div class="header">
<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>
<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
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>

@ -0,0 +1,340 @@
<!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="./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 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="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()?></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">
<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="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
}
?>
<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="previousPage">Previous</a>
</li>
<li class="page-item">
<a class="page-link" href="nextPage">Next</a>
</li>
</ul>
</div>
</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>

@ -0,0 +1,30 @@
<!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>
<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>

@ -0,0 +1,87 @@
<!DOCTYPE html>
<html>
<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>
<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>
</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 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>
</div>
</body>
</html>

@ -0,0 +1,86 @@
<html lang="en">
<head>
<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">
<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>
<div class="model">
<div class="main-logo">
<img src="./vue/Images/Logo.png" alt="logo">
</div>
<div class="login-card-header">
<h1>Se Connecter</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="form-item">
<span class="form-item-icon material-symbols-rounded">mail</span>
<input type="text" name="mail" placeholder="Enter Mail" required autofocus>
</div>
<div class="form-item">
<span class="form-item-icon material-symbols-rounded">lock</span>
<input type="password" name="password" placeholder="Enter Password" required >
</div>
<div class="form-item-other">
<div class="checkbox">
<input type="checkbox" id="cbx" style="display: none;">
<label for="cbx" class="check">
<svg width="18px" height="18px" viewBox="0 0 18 18">
<path d="M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"></path>
<polyline points="1 9 7 14 15 4"></polyline>
</svg>
</label>
<label for="rememberMeCheckBox">Se souvenir de moi</label>
</div>
<a href="#">Oublie de mot de passe</a>
</div>
<button type="submit" class="button-body">Se connecter</button>
<!-- action !!!!!!!!!! -->
<input type="hidden" name="action" value="seConnecter">
</form>
<div class="login-card-footer">
Pas de compte ?
<a href="inscription">Creer un compte</a>
</div>
</div>
<div class="social">
<div>Autre plateforme</div>
<div class="lesLogo">
<a href="#">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-instagram" 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>
<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>
</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>
</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>
</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