Ajout de toutes les fonctionalités demendées

main
Allan POINT 3 years ago
parent 63e255b531
commit 8fbf2d47b8

@ -4,9 +4,8 @@ class Connection extends PDO {
private $stmt; private $stmt;
public function __construct(string $dsn, string $username, string $password) { public function __construct(string $dsn, string $username, string $password) {
parent::__construct($dsn,$username,$password);
parent::__construct($dsn,$username,$password); $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} }

@ -63,27 +63,25 @@ class CompteGateway
* Retour : Un tableau contenant tout les compte avec le pseudonyme <pseudo> (devrais avoir une taille entre 0 et 1) * Retour : Un tableau contenant tout les compte avec le pseudonyme <pseudo> (devrais avoir une taille entre 0 et 1)
* Finalité : Récupérer un Compte <pseudo> en base de données et l'instancier. * Finalité : Récupérer un Compte <pseudo> en base de données et l'instancier.
*/ */
public function getCompteParPseudo(string $pseudo) : iterable public function getCompteParPseudo(string $pseudo) : ?Compte
{ {
$gw = new ListeGateway($this->conn()); $gw = new ListeGateway($this->conn);
$requete = "SELECT * FROM _Compte WHERE pseudonyme=:pseudo"; $requete = "SELECT * FROM _Compte WHERE pseudonyme=:pseudo";
if(!$this->conn->executeQuerry($requete, [":pseudo" => [$pseudo, PDO::PARAM_STR]])) if(!$this->conn->executeQuery($requete, [":pseudo" => [$pseudo, PDO::PARAM_STR]]))
{ {
return array(); return array();
} }
$comptesSQL = $this->conn->getResults(); $comptesSQL = $this->conn->getResults();
$comptes = array(); if(sizeof($comptesSQL) != 0)
$listes = array();
foreach($comptesSQL as $compte)
{ {
$comptes[] = new Compte( $compte = new Compte(
$compte["pseudonyme"], $comptesSQL[0]["pseudonyme"],
$compte["dateCreation"], $comptesSQL[0]["dateCreation"],
$gw->getListeParCreateur($compte["pseudonyme"]), $gw->getListeParCreateur(1, 10, $comptesSQL[0]["pseudonyme"]),
$compte["motDePasse"], $comptesSQL[0]["motDePasse"],
); );
return $comptes; return $compte;
} }
return null;
} }
} }

@ -31,6 +31,16 @@ class ListeGateway
":createur" => [$l->getCreateur(), PDO::PARAM_STR] ":createur" => [$l->getCreateur(), PDO::PARAM_STR]
]); ]);
} }
public function inserer2(string $nom, string $createur)
{
$requette = "INSERT INTO _TodoList(nom, dateCreation, createur)
VALUES(:nom, NOW(), :createur)";
return $this->conn->executeQuery($requette, [
":nom" => [$nom, PDO::PARAM_STR],
":createur" => [$createur, PDO::PARAM_STR]
]);
}
/* /*
* Paramètres : l => TodoList à supprimer de la base de données * Paramètres : l => TodoList à supprimer de la base de données
@ -39,11 +49,18 @@ class ListeGateway
*/ */
public function supprimer(TodoList $l) : bool public function supprimer(TodoList $l) : bool
{ {
$requete = "DELETE FROM _TodoList WHERE listeID=:id"; $requette = "DELETE FROM _TodoList WHERE listeID=:id";
return $this->conn->executeQuery($requete,[ return $this->conn->executeQuery($requette,[
":id"=>[$l->getID(), PDO::PARAM_INT] ":id"=>[$l->getID(), PDO::PARAM_INT]
]); ]);
} }
public function supprimerAvecListID(int $id)
{
$requette = "DELETE FROM _TodoList WHERE listeID=:id";
return $this->conn->executeQuery($requette, [
":id" => [$id, PDO::PARAM_INT]
]);
}
/* /*
* Paramètres : l => TodoList à éditer en base de données * Paramètres : l => TodoList à éditer en base de données
@ -52,14 +69,26 @@ class ListeGateway
*/ */
public function modifier(TodoList $l) : bool public function modifier(TodoList $l) : bool
{ {
$requete="UPDATE _TodoList SET $requette="UPDATE _TodoList SET
nom=:n, public=:p"; nom=:n WHERE listeID=:id";
return $this->conn->executeQuery($requete, [ return $this->conn->executeQuery($requette, [
":n" => [$l->getNom(), PDO::PARAM_STR], ":n" => [$l->getNom(), PDO::PARAM_STR],
":id" => [$l->getID(), PDO::PARAM_INT]
]); ]);
} }
public function modiferNomListe(int $id, string $nom) : bool
{
$requette = "UPDATE _TodoList
SET nom=:n
WHERE listeID=:id";
return $this->conn->executeQuery($requette, array(
":n" => [$nom, PDO::PARAM_STR],
":id" => [$id, PDO::PARAM_INT]
));
}
/* /*
* Paramètres : page => Numéro de la page à afficher * Paramètres : page => Numéro de la page à afficher
* nbTache => Nombre de tâches à afficher par pages * nbTache => Nombre de tâches à afficher par pages
@ -140,10 +169,10 @@ class ListeGateway
{ {
$gwTache = new TacheGateway($this->conn); $gwTache = new TacheGateway($this->conn);
$lites = array(); $lites = array();
$requete = "SELECT * FROM _TodoList WHERE Createur = :c LIMIT :p+:n, :n"; $requete = "SELECT * FROM _TodoList WHERE Createur = :c LIMIT :p, :n";
$isOK=$this->conn->executeQuery($requete, [ $isOK=$this->conn->executeQuery($requete, [
":c" => [$createur, PDO::PARAM_STR], ":c" => [$createur, PDO::PARAM_STR],
":p" => [$page-1, PDO::PARAM_INT], ":p" => [($page-1)*$nbListes, PDO::PARAM_INT],
":n" => [$nbListes, PDO::PARAM_INT] ":n" => [$nbListes, PDO::PARAM_INT]
]); ]);
if(!$isOK) if(!$isOK)
@ -152,7 +181,7 @@ class ListeGateway
} }
$res = $this->conn->getResults(); $res = $this->conn->getResults();
$listes = array();
foreach($res as $liste) foreach($res as $liste)
{ {
$listes[] = new TodoList( $listes[] = new TodoList(

@ -33,6 +33,22 @@ class TacheGateway
]); ]);
} }
public function insererSimple(string $nom, string $comm, int $id) : bool
{
$requette = "INSERT INTO _Tache(NomTache, TacheFaite, Commentaire, listID) VALUES(
:nom, :fait, :commentaire, :id
)";
return $this->conn->executeQuery($requette, [
":nom" => [$nom, PDO::PARAM_STR],
":fait"=> [false, PDO::PARAM_BOOL],
":commentaire" => [$comm, PDO::PARAM_STR],
":id" => [$id, PDO::PARAM_INT]
]);
}
/* /*
* Paramètre : tacheAModifier => Tache à éditer en base de données * Paramètre : tacheAModifier => Tache à éditer en base de données
* Retour : True si la requete c'est correctement éxécuter. Sinon false * Retour : True si la requete c'est correctement éxécuter. Sinon false
@ -47,12 +63,35 @@ class TacheGateway
WHERE WHERE
tacheID = :id"; tacheID = :id";
return $this->conn->executeQuery($requette,[ return $this->conn->executeQuery($requette,[
':nom' => [$tacheAModifier->nom, PDO::PRAM_STR], ':nom' => [$tacheAModifier->getNom(), PDO::PRAM_STR],
':commentaire' => [$tacheAModifier->commentaire, PDO::PARAM_STR], ':commentaire' => [$tacheAModifier->getCommentaire(), PDO::PARAM_STR],
':fait' => [$tacheAModifier->estFait, PDO::PARAM_BOOL] ':fait' => [$tacheAModifier->estFait(), PDO::PARAM_BOOL]
]); ]);
} }
public function modifierDoneTache(int $idTache, bool $done)
{
$requette = "UPDATE _Tache SET
TacheFaite = :d
WHERE
tacheID = :id";
return $this->conn->executeQuery($requette, array(
":d" => [$done, PDO::PARAM_BOOL],
":id" => [$idTache, PDO::PARAM_INT]
));
}
public function modifierNomCommTache(int $id, string $nom, string $comm)
{
$requette = "UPDATE _Tache
SET NomTache = :n, Commentaire = :c
WHERE tacheID = :id";
return $this->conn->executeQuery($requette, array(
":n" => [$nom, PDO::PARAM_STR],
":c" => [$comm, PDO::PARAM_STR],
":id" => [$id, PDO::PARAM_INT]
));
}
/* /*
* Paramètre : tacheASupprimer => Tache à supprimer en base de données * Paramètre : tacheASupprimer => Tache à supprimer en base de données
* Retour : True si la requete c'est correctement éxécuter. Sinon false * Retour : True si la requete c'est correctement éxécuter. Sinon false
@ -62,11 +101,19 @@ class TacheGateway
{ {
$requette = "DELETE FROM _Tache WHERE tacheID=:id"; $requette = "DELETE FROM _Tache WHERE tacheID=:id";
return $this->conn->executeQuery($requette, return $this->conn->executeQuery($requette,
[':id', [$tacheASupprimer->tacheID]] [':id', [$tacheASupprimer->tacheID, PDO::PARAM_INT]]
); );
} }
public function supprimerAvecTacheID(int $id)
{
$requette = "DELETE FROM _Tache WHERE tacheID=:id";
return $this->conn->executeQuery($requette,[
':id' => [$id, PDO::PARAM_INT]
]);
}
/* /*
* Paramètre : l => Identifiant de la TodoList. * Paramètre : l => Identifiant de la TodoList.
* page => Numéro de la page à retourner * page => Numéro de la page à retourner
@ -76,10 +123,10 @@ class TacheGateway
*/ */
public function getTachesParIDListe(int $l, int $page, int $nbTache) : iterable public function getTachesParIDListe(int $l, int $page, int $nbTache) : iterable
{ {
$requete = "SELECT * FROM _Tache WHERE listID=:id ORDER BY NomTache LIMIT :p+:n, :n"; $requete = "SELECT * FROM _Tache WHERE listID=:id ORDER BY NomTache LIMIT :p, :n";
if(!$this->conn->executeQuery($requete,[ if(!$this->conn->executeQuery($requete,[
":id" => [$l->getID(), PDO::PARAM_INT], ":id" => [$l, PDO::PARAM_INT],
":p" => [$page-1, PDO::PARAM_INT], ":p" => [($page-1)*$nbTache, PDO::PARAM_INT],
":n" => [$nbTache, PDO::PARAM_INT] ":n" => [$nbTache, PDO::PARAM_INT]
])) ]))
{ {
@ -99,4 +146,18 @@ class TacheGateway
} }
return $taches; return $taches;
} }
public function getListeParIDTache(?int $tache) //: ?int
{
if(is_null($tache))
{
throw new Exception("Le numero de tache ne doit pas être === à null");
}
$requette = "SELECT listID FROM _Tache WHERE tacheID = :id";
if(!$this->conn->executeQuery($requette, array(":id"=>[$tache, PDO::PARAM_INT])))
{
throw new Exception("Problème lors de la récupération de la liste de la tache $tache");
}
return $this->conn->getResults()[0][0];
}
} }

@ -2,13 +2,9 @@
class Validation class Validation
{ {
public static function netoyerNomTache(string $nom) : ?string public static function netoyerString(?string $str) : ?string
{ {
return filter_var($nom, FILTER_SANITIZE_STRING, FILTER_NULL_ON_FAILURE); return filter_var($str, FILTER_SANITIZE_STRING, FILTER_NULL_ON_FAILURE);
}
public static function netoyerCommentaireTache(string $comm) : ?string
{
return filter_var($comm, FILTER_SANITIZE_STRING, FILTER_NULL_ON_FAILURE);
} }
public static function validerEffectuationTache($estFait) : bool public static function validerEffectuationTache($estFait) : bool
{ {
@ -17,8 +13,8 @@ class Validation
public static function netoyerEtValiderTache(string $nom, string $comm, bool $estFait) public static function netoyerEtValiderTache(string $nom, string $comm, bool $estFait)
{ {
$nom = self::netoyerNomTache($nom); $nom = self::netoyerString($nom);
$comm = self::netoyerCommentaireTache($comm); $comm = self::netoyerString($comm);
$estFaitValide = self::validerEffectuationTache($estFait); $estFaitValide = self::validerEffectuationTache($estFait);
if($nom == null || $comm == null || !$estFaitValide) if($nom == null || $comm == null || !$estFaitValide)
@ -33,8 +29,13 @@ class Validation
); );
} }
public static function validerUnIntSuperieurZero($int) public static function validerUnIntSupperieurZero($int)
{ {
return filter_var($int, FILTER_VALIDATE_INT, array("min_range"=>1)); return filter_var($int, FILTER_VALIDATE_INT, array("min_range"=>1));
} }
public static function validerNomTiretNum($valeur, $nom)
{
return filter_var($valeur, FILTER_VALIDATE_REGEXP, array("option" => array("regexp" => "$name-[1-9][0-9]+$")));
}
} }

@ -1,5 +1,10 @@
<?php <?php
$dbType = "mysql"; $dbType = "mysql";
$host = "berlin.iut.local/~alpoint"; $host = "berlin.iut.local";
$dnName = "alpoint"; $dbName = "dbalpoint";
$dsn = "$dbType:host=$host,dbname=$ddbName"; global $dsn;
global $loginDB;
global $pswdDB;
$dsn = "$dbType:host=$host;dbname=$dbName";
$loginDB = "alpoint";
$pswdDB = "allanallan";

@ -0,0 +1,71 @@
<?php
require_once("config/Validation.php");
require_once("modeles/ModelConnecte.php");
class ControleurCommun {
function __construct() {
global $rep,$vues; // nécessaire pour utiliser variables globales
$dVueEreur = array ();
try{
$action=Validation::netoyerString(isset($_REQUEST['action']) ? $_REQUEST["action"] : "");
switch($action) {
//pas d'action, on r<>initialise 1er appel
case NULL:
$this->Reinit();
break;
case "connection":
if(!isset($_POST["pseudonyme"]) || !isset($_POST["motDePasse"]))
{
$erreurs[] = "Erreur lors de la transmission des informations de connections";
throw new Exception();
}
$login = Validation::netoyerString($_POST["pseudonyme"]);
$mdp = Validation::netoyerString($_POST["motDePasse"]);
if(is_null($login) || is_null($mdp))
{
throw new ValueError("Le login ou le mot de passe contient des valeurs illégales");
}
$compte = $this->connection($_POST["pseudonyme"], $_POST["motDePasse"]);
if(!is_null($compte))
{
header("Location: ?action=seeLists");
}
else
{
header("Location: ?action=GloubiBoulga");
}
break;
case "SeConnecter":
default:
require("vues/connection.php");
break;
}
}catch(PDOException $e)
{
//si erreur BD, pas le cas ici
$ereurs[] = "Erreur inattendue!!! ";
require("vues/erreur.php");
}
catch (Exception $e2)
{
$erreurs[] = $e2->getMessage();
require("vues/erreur.php");
}
exit(0);
}
function Reinit() {
global $rep,$vues; // nécessaire pour utiliser variables globales
require("vues/connection.php");
}
function connection(string $login, string $mdp) : Compte
{
$mdl = new ModelConnecte();
$compte = $mdl->connection($login, $mdp);
return $compte;
}
}

@ -0,0 +1,448 @@
<?php
require_once("config/Validation.php");
require_once("controleur/ControleurCommun.php");
class ControleurConnecte {
function __construct() {
global $rep,$vues; // nécessaire pour utiliser variables globales
//debut
//on initialise un tableau d'erreur
$dVueEreur = array ();
try{
$action=Validation::netoyerString($_REQUEST['action']);
switch($action) {
//pas d'action, on r<>initialise 1er appel
case NULL:
echo "Normal";
//$this->Reinit();
break;
case "seeLists":
$this->seeLists();
break;
case "seeList":
$this->seeList();
break;
case "supprimerListe":
$this->supprimerListe();
break;
case "wantAddList":
$this->wantAddList();
break;
case "addList":
$this->addList();
break;
case "modifyList":
$this->modifyList();
break;
case "setTacheFait":
$this->editDone();
break;
case "editionTache":
$this->editionTache();
break;
case "wantAddTask":
$this->wantAddTask();
break;
case "addTask":
$this->addTask();
break;
case "delTask":
$this->delTask();
break;
case "logout":
$this->logout();
break;
case "veuxModifierListe":
$this->veuxModifierListe();
break;
case "veuxModifierTache":
$this->veuxModifierTache();
break;
default:
echo "Default";
/*
$dVueEreur[] = "Erreur d'appel php";
require ($rep.$vues['vuephp1']);
*/
break;
}
}catch(PDOException $e)
{
//si erreur BD, pas le cas ici
echo "Erreur PDO";
$erreurs[] =$e->getMessage();
require ("vues/erreur.php");
}
catch (Exception $e2)
{
$erreurs[] =$e2->getMessage();
require ("vues/erreur.php");
}
// exit(0);
}
function Reinit() {
global $rep,$vues; // nécessaire pour utiliser variables globales
require ($rep.$vues['connection']);
}
function seeLists()
{
if(!isset($_GET["page"]) || empty($_GET["page"]))
{
$page = 1;
}
else
{
$page = Validation::validerUnIntSuperieurZero($_GET["page"]) ? $_GET["page"] : 1;
}
if(!isset($_GET["nbElements"]) || empty($_GET["nbElements"]))
{
$nbElements = 10;
}
else
{
$nbElements = Validation::validerUnIntSuperieurZero($_GET["nbElements"]) ? $_GET["nbElements"] : 10;
}
$mdl = new ModelConnecte();
$todoLists = $mdl->getLists($_SESSION["login"], $page, $nbElements);
require("vues/accueil.php");
}
function seeList()
{
if(!isset($_REQUEST["list"]) || empty($_REQUEST["list"]))
{
throw new Exception("Aucune liste n'est demendée");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["list"]))
{
throw new Exception("Valeur illégale de la liste requétée");
}
$mdl = new ModelConnecte();
$taches = $mdl->getTaches($_REQUEST["list"]);
$actualList = $_REQUEST["list"];
require("vues/editeurDeStatuts.php");
}
function editDone()
{
if(isset($_REQUEST["estFait"]))
{
if(!is_array($_REQUEST["estFait"]))
{
throw new Exception("La liste des taches faites doit être un tableau.");
}
}
if(!isset($_REQUEST["exist"]))
{
throw new Exception("Aucune tâche n'est définit");
}
if(!is_array($_REQUEST["exist"]))
{
throw new Exception("La liste des taches doit être un tableau.");
}
$mdl = new ModelConnecte();
$mdl->setDoneTaches();
new ControleurConnecte();
}
function wantAddList()
{
require("vues/ajouterListe.php");
}
function addList()
{
if(!isset($_REQUEST["nomNouvelleListe"]))
{
throw new Exception("La nouvelle liste doit avoir un nom!");
}
if(empty($_REQUEST["nomNouvelleListe"]))
{
throw new Exception("La nouvelle liste doit avoir un nom!");
}
$nom = Validation::netoyerString($_REQUEST["nomNouvelleListe"]);
if(is_null($nom))
{
throw new Exception("Le nom de la nouvelle liste contien un ou plusieurs caractères illégales.");
}
$mdl = new ModelConnecte();
$mdl->createTodoList($nom);
$_REQUEST["action"] = "seeLists";
new ControleurConnecte();
}
function wantAddTask()
{
$mdl = new ModelConnecte();
if(!$mdl->estConnecte())
{
throw new Exception("Permission non suffisantes pour effectuer cette action!");
}
if(!isset($_REQUEST["list"]))
{
throw new Exception("Le numero de liste doit exister");
}
if(empty($_REQUEST["list"]))
{
throw new Exception("Le numero de liste doit être définit");
}
$actualList = Validation::validerUnIntSupperieurZero($_REQUEST["list"]) ? $_REQUEST["list"] : null;
if(is_null($actualList))
{
throw new Exception("Le numero de liste doui être un entier supperieur à 0");
}
require("vues/addTask.php");
}
function addTask()
{
$mdl = new ModelConnecte();
if(!$mdl->estConnecte())
{
throw new Exception("Permission non suffisantes pour effectuer cette action!");
}
if(!isset($_REQUEST["nomTache"]))
{
throw new Exception("Le nom de la novelle tache est introuvable (?o?)'");
}
if(empty($_REQUEST["nomTache"]))
{
throw new Exception("Le nom de la nouvelle tache ne doit pas être vide");
}
if(!isset($_REQUEST["commentaireTache"]))
{
throw new Exception("Le commentaire de la tache est introuvable!");
}
if(!isset($_REQUEST["list"]))
{
throw new Exception("Le numero de liste doit exister");
}
if(empty($_REQUEST["list"]))
{
throw new Exception("Le numero de liste doit être définit");
}
$list = Validation::validerUnIntSupperieurZero($_REQUEST["list"]) ? $_REQUEST["list"] : null;
$nom = Validation::netoyerString($_REQUEST["nomTache"]);
$comm = Validation::netoyerString($_REQUEST["commentaireTache"]);
if(is_null($nom) || is_null($comm) || is_null($list))
{
throw new Exception("Le nom, la liste ou le commentaire de la nouvelle tache contiennent des caractèrent illégales!");
}
$mdl->createTask($nom, $comm, $list);
$_REQUEST["action"] = "seeList";
$_REQUEST["list"] = $list;
new ControleurConnecte();
}
function supprimerListe()
{
$mdl = new ModelConnecte();
if(!$mdl->estConnecte())
{
throw new Exception("Permission non suffisantes pour effectuer cette action!");
}
if(!isset($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit exister");
}
if(empty($_REQUEST["list"]))
{
throw new Exception("Le paramètre list doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit être un entier strictement superieur à 0");
}
$mdl->supprimerListe($_REQUEST["list"]);
$_REQUEST["action"] = "seeLists";
new ControleurConnecte();
}
function delTask()
{
$mdl = new ModelConnecte();
if(!$mdl->estConnecte())
{
throw new Exception("Permission non suffisantes pour effectuer cette action!");
}
if(!isset($_REQUEST["task"]))
{
throw new Exception("Le parametre task doit exister");
}
if(empty($_REQUEST["task"]))
{
throw new Exception("Le paramètre task doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["task"]))
{
throw new Exception("Le parametre task doit être un entier strictement superieur à 0");
}
if(!isset($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit exister");
}
if(empty($_REQUEST["list"]))
{
throw new Exception("Le paramètre list doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit être un entier strictement superieur à 0");
}
$mdl->delTask($_REQUEST["task"]);
$_REQUEST["action"] = "seeList";
new ControleurConnecte();
}
function logout()
{
$mdl = new ModelConnecte();
$mdl->destroySession();
new ControleurCommun();
}
function veuxModifierListe()
{
if(!isset($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit exister");
}
if(empty($_REQUEST["list"]))
{
throw new Exception("Le paramètre list doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit être un entier strictement superieur à 0");
}
$listeAModifier = $_REQUEST["list"];
require("vues/editeurDeListe.php");
}
function modifyList()
{
$mdl = new ModelConnecte();
if(!$mdl->estConnecte())
{
throw new Exception("Permission non suffisantes pour effectuer cette action!");
}
if(!isset($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit exister");
}
if(empty($_REQUEST["list"]))
{
throw new Exception("Le paramètre list doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit être un entier strictement superieur à 0");
}
if(!isset($_REQUEST["nouveauNom"]))
{
throw new Exception("Le parametre nouveauNom doit exister");
}
if(empty($_REQUEST["nouveauNom"]))
{
throw new Exception("Le paramètre nouveauNom doit contenire une valeur");
}
$nouveauNom = Validation::netoyerString($_REQUEST["nouveauNom"]);
if(is_null($nouveauNom))
{
throw new Exception("Le nouveau nom contient des caractères illégeaux");
}
$mdl->modifierNomListe($_REQUEST["list"], $nouveauNom);
$_REQUEST["action"] = "seeLists";
new ControleurConnecte();
}
function veuxModifierTache()
{
if(!isset($_REQUEST["task"]))
{
throw new Exception("Le parametre task doit exister");
}
if(empty($_REQUEST["task"]))
{
throw new Exception("Le paramètre task doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["task"]))
{
throw new Exception("Le parametre task doit être un entier strictement superieur à 0");
}
if(!isset($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit exister");
}
if(empty($_REQUEST["list"]))
{
throw new Exception("Le paramètre list doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit être un entier strictement superieur à 0");
}
$tacheAModifier = $_REQUEST["task"];
$listeAModifier = $_REQUEST["list"];
require("vues/editeurDeTache.php");
}
function editionTache()
{
$mdl = new ModelConnecte();
if(!$mdl->estConnecte())
{
throw new Exception("Permission non suffisantes pour effectuer cette action!");
}
if(!isset($_REQUEST["task"]))
{
throw new Exception("Le parametre task doit exister");
}
if(empty($_REQUEST["task"]))
{
throw new Exception("Le paramètre task doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["task"]))
{
throw new Exception("Le parametre task doit être un entier strictement superieur à 0");
}
if(!isset($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit exister");
}
if(empty($_REQUEST["list"]))
{
throw new Exception("Le paramètre list doit contenire une valeur");
}
if(!Validation::validerUnIntSupperieurZero($_REQUEST["list"]))
{
throw new Exception("Le parametre list doit être un entier strictement superieur à 0");
}
if(!isset($_REQUEST["nom"]))
{
throw new Exception("Le parametre nom doit exister");
}
if(empty($_REQUEST["nom"]))
{
throw new Exception("Le paramètre nom doit contenire une valeur");
}
if(!isset($_REQUEST["commentaire"]))
{
throw new Exception("Le parametre commentaire doit exister");
}
$nom = Validation::netoyerString($_REQUEST["nom"]);
$comm = Validation::netoyerString($_REQUEST["commentaire"]);
if(is_null($nom) || is_null($comm))
{
throw new Exception("Le nom ou le commentaire contien des valeurs illégales");
}
$mdl->modifierNomCommTache($_REQUEST["task"], $nom, $comm);
$list = $_REQUEST["list"];
$_REQUEST["action"] = "seeList";
new ControleurConnecte();
}
}

@ -0,0 +1,20 @@
<?php
require_once("metier/Tache.php");
require_once("metier/TodoList.php");
require_once("metier/Compte.php");
$taches = [
new Tache("Tache1", true, "Commentaire de tâche1",1),
new Tache("Tache2", false, "Commentaire de tâche2", 1),
new Tache("Tache3", true, "", "177013", 1)
];
$todoLists = [
new TodoList(1, "Liste1", "Erina", date("d-m-Y"), $taches),
new TodoList(3, "Liste3", "Erina", date("d-m-Y"), $taches)
];
$comptes = [
new Compte("Erina", null,$todoLists, "Erina"),
new Compte("Shino", null, [], "Shino")
];

@ -0,0 +1,46 @@
<?php
require_once("controleur/ControleurConnecte.php");
require_once("controleur/ControleurCommun.php");
require_once("modeles/ModelConnecte.php");
require_once("config/Validation.php");
require("config/dsn.php");
class FrontControler
{
private $actions = array(
"Compte" => [
"addList", "setTacheFait", "editionTache", "déconéction", "seeLists",
"seeList", "wantAddList", "wantAddTask", "addTask", "supprimerListe",
"delTask", "logout", "veuxModifierListe", "modifyList", "veuxModifierTache"],
"Visiteur" => ["seConnceter", "connection"]
);
public function start()
{
session_start();
$modelCompte = new ModelConnecte();
$connecte = $modelCompte->estConnecte();
$action = Validation::netoyerString(isset($_GET["action"]) ? $_GET["action"] : "");
if(in_array($action, $this->actions["Compte"]))
{
if(!$connecte)
{
require("vues/connection.php");
}else
{
$controler = new controleurConnecte();
}
}
else
{
if(!$connecte)
{
$controler = new controleurCommun();
}
else
{
$_REQUEST["action"] = "seeLists";
new ControleurConnecte();
}
}
}
}

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<?php require_once("frontControler/FrontControler.php");
#require_once("controleur/ControleurCommun.php");
$frtControler = new FrontControler();
$controler = $frtControler->start();
#$controler = new ControleurCommun();
?>
</html>

@ -8,7 +8,7 @@ class Tache
private $tacheID; private $tacheID;
// Constructeur // Constructeur
public function __construct(string $nom, bool $estFait=false, string $commentaire="", int $tacheID) public function __construct(string $nom, bool $estFait=false, ?string $commentaire="", int $tacheID)
{ {
$this->nom = $nom; $this->nom = $nom;
$this->fait = $estFait; $this->fait = $estFait;
@ -28,7 +28,7 @@ class Tache
$this->nom = $nouveauNom; $this->nom = $nouveauNom;
} }
public function getCommentaire() : string public function getCommentaire() : ?string
{ {
return $this->commentaire; return $this->commentaire;
} }

@ -0,0 +1,130 @@
<?php
require_once("DAL/Connection.php");
require_once("config/Validation.php");
require_once("DAL/gateways/CompteGateway.php");
require_once("DAL/gateways/ListeGateway.php");
class ModelConnecte
{
public function connection(string $login, string $mdp) : Compte
{
require("config/dsn.php");
$gw = new CompteGateway(new Connection($dsn, "alpoint", "allanallan"));
$compte = $gw->getCompteParPseudo($login);
if($compte == null)
{
throw new Exception("Le login ou le mot de passe est incorecte");
}
if(!password_verify($mdp, $compte->getMotDePasse()))
{
throw new Exception("Le login ou le mot de passe est incorecte");
}
$_SESSION["login"] = $compte->getPseudonyme();
$_SESSION["Lists"] = $compte->getListes();
return $compte;
}
public function estConnecte() : bool
{
if(isset($_SESSION["login"]) && !empty($_SESSION["login"]))
{
return true;
}
return false;
}
public function getLists(string $pseudo, int $page, int $nbElements)
{
global $dsn, $loginDB, $pswdDB;
$gw = new ListeGateway(new Connection($dsn, $loginDB, $pswdDB));
return $gw->getListeParCreateur($page, $nbElements, $pseudo);
}
public function getTaches(int $liste)
{
global $dsn, $loginDB, $pswdDB;
$gw = new TacheGateway(new Connection($dsn, $loginDB, $pswdDB));
return $taches = $gw->getTachesParIDListe($liste, 1, 10);
}
public function setDoneTaches()
{
global $dsn, $loginDB, $pswdDB;
$gw = new TacheGateway(new Connection($dsn, $loginDB, $pswdDB));
$tacheID = null;
foreach($_REQUEST["exist"] as $tache)
{
if(in_array($tache, isset($_REQUEST["estFait"])?$_REQUEST["estFait"]:array() ))
{
if(!$gw->modifierDoneTache($tache, true))
{
throw new Exception("Erreur lors de la modification du statut de la tache $tache");
}
}else
{
if(!$gw->modifierDoneTache($tache, false))
{
throw new Exception("Erreur lors de la modification du statut de la tache $tache");
}
}
$tacheID = $tache;
}
$_REQUEST["action"] = "seeList";
$_REQUEST["list"] = $gw->getListeParIDTache($tacheID);
}
public function createTodoList(string $nom)
{
global $dsn, $loginDB, $pswdDB;
$gw = new ListeGateway(new Connection($dsn, $loginDB, $pswdDB));
if(!$this->estConnecte())
{
throw new Exception("Il faut être connecté.e pour créer un Todo List.");
}
$pseudo = Validation::netoyerString($_SESSION["login"]);
if(is_null($pseudo))
{
throw new Exception("Erreur avec la valeur enregistré du pseudonyme");
}
$gw->inserer2($nom, $pseudo);
}
public function createTask(string $nom, string $comm, int $list)
{
global $dsn, $loginDB, $pswdDB;
$gw = new TacheGateway(new Connection($dsn, $loginDB, $pswdDB));
if(!$gw->insererSimple($nom, $comm, $list))
{
throw new Exception("Erreur lors de la création de la tache");
}
}
public function supprimerListe(int $listID) : bool
{
global $dsn, $loginDB, $pswdDB;
$gw = new ListeGateway(new Connection($dsn, $loginDB, $pswdDB));
return $gw->supprimerAvecListID($listID);
}
public function delTask(int $id) : bool
{
global $dsn, $loginDB, $pswdDB;
$gw = new TacheGateway(new Connection($dsn, $loginDB, $pswdDB));
return $gw->supprimerAvecTacheID($id);
}
public function destroySession()
{
session_unset();
session_destroy();
$_SESSION = array();
}
public function modifierNomListe(int $idListe, string $nouveauNom)
{
global $dsn, $loginDB, $pswdDB;
$gw = new ListeGateway(new Connection($dsn, $loginDB, $pswdDB));
return $gw->modiferNomListe($idListe, $nouveauNom);
}
public function modifierNomCommTache(int $idTache, string $nom, string $comm)
{
global $dsn, $loginDB, $pswdDB;
$gw = new TacheGateway(new Connection($dsn, $loginDB, $pswdDB));
return $gw->modifierNomCommTache($idTache, $nom, $comm);
}
}

@ -0,0 +1,5 @@
<?php
class ModelPrincipal
{
}

Binary file not shown.

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

Binary file not shown.

@ -1,7 +1,7 @@
<head> <head>
<meta charset="utf8"/> <meta charset="utf8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?=$nomDuSite?></title> <title>Accueil</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head> </head>
<body> <body>
@ -15,17 +15,21 @@
<th>créateur</th> <th>créateur</th>
<th>date de création</th> <th>date de création</th>
<th>supprimer</th> <th>supprimer</th>
<th>mofifier</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(isset($todoLists)) : ?>
<?php foreach($todoLists as $todolist) :?> <?php foreach($todoLists as $todolist) :?>
<tr> <tr>
<td><a href="?seeList=<?=$todolist->getNom()?>"><?=$todolist->getNom()?></a></td> <td><a href="?action=seeList&list=<?=$todolist->getID()?>"><?=$todolist->getNom()?></a></td>
<td><?=$todolist->getCreateur()?></td> <td><?=$todolist->getCreateur()?></td>
<td><?=$todolist->getDateCreation()?></td> <td><?=$todolist->getDateCreation()?></td>
<td><a href="?supprimerListe=<?=$todolist->getID()?>">A remplacer par un image de poubelle (^u^)'</a></td> <td><a href="?action=supprimerListe&list=<?=$todolist->getID()?>">A remplacer par un image de poubelle (^u^)'</a></td>
<td><a href="?action=veuxModifierListe&list=<?=$todolist->getID()?>">A remplacer par un image de stylo (^u^")</a></td>
</tr> </tr>
<?php endforeach;?> <?php endforeach;?>
<?php endif;?>
</tbody> </tbody>
<table> <table>
</main> </main>

@ -0,0 +1,36 @@
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ajouter une tache</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>
<body>
<header>
<?php require('header.php');?>
</header>
<main>
<form method="post" action="?action=addTask&list=<?=isset($actualList) ? $actualList : "-1"?>">
<table>
<thead>
<tr>
<th>Nom</th>
<th>Commentaire</th>
</tr>
</thead>
<tbody>
<tr>
<td><input name="nomTache" type="text"/></td>
<td><input name="commentaireTache" type="text"/></td>
</tr>
</tbody>
</table>
<input value="Effecer" type="reset"/>
<input value="Ajouter!" type="submit"/>
</form>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</body>

@ -1,7 +1,7 @@
<head> <head>
<meta charset="utf8"/> <meta charset="utf8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?=$nomDuSite?></title> <title>Ajouter une liste</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="styles/ajouterListe.css"> <link rel="stylesheet" href="styles/ajouterListe.css">

@ -8,7 +8,7 @@
<main> <main>
<div> <div>
<h1>Se Connecter</h1> <h1>Se Connecter</h1>
<form method="post" action="?connection"> <form method="POST" action="?action=connection">
<table> <table>
<tr> <tr>
<td><label for="ps">Pseudo</label></td> <td><label for="ps">Pseudo</label></td>

@ -0,0 +1,34 @@
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Éditer une liste</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>
<body>
<header>
<?php require('header.php');?>
</header>
<main>
<form method="post" action="?action=modifyList&list=<?=isset($listeAModifier) ? $listeAModifier : "-1"?>">
<table>
<thead>
<tr>
<th>Tâche</th>
</tr>
</thead>
<tbody>
<tr>
<td><input name="nouveauNom" type="text" placeholder="exemple: Liste des séries à voir"/></td>
</tr>
</tbody>
</table>
<input name="Éffacer" type="reset"/>
<input name="Renomer la TODO-List" type="submit"/>
</form>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</body>

@ -1,8 +1,9 @@
<head> <head>
<meta charset="utf8"> <meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?=$nomDuSite?></title> <title>Visualisation d'une liste</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link href="styles/chechBoxLineThrought.css" rel="stylesheet"/>
</head> </head>
<body> <body>
@ -12,28 +13,40 @@
</header> </header>
<main> <main>
<form method="post"> <form method="post" action="?action=setTacheFait">
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Fait</th> <th>Fait</th>
<th>Tâche</th> <th>Tâche</th>
<th>Commentaire</th> <th>Commentaire</th>
<th>Supprimer</th>
<th>Modifer</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(isset($taches)) : ?>
<?php foreach($taches as $tache):?> <?php foreach($taches as $tache):?>
<tr> <tr>
<td><input name="estFait" type="checkbox" <?=$tache->estFait() ? "checked" : ""?>/></td> <td><input name="estFait[]" type="checkbox" value="<?=$tache->getID()?>" <?=$tache->estFait() ? "checked" : ""?>/></td>
<td><?=$tache->getNom()?></td> <td><?=$tache->getNom()?></td>
<td><?=$tache->getCommentaire()?></td> <td><?=$tache->getCommentaire()?></td>
<td><a href="?action=delTask&task=<?=$tache->getID()?>&list=<?=$actualList?>">À remplacer par une image de poubelle (^u^)"</a></td>
<td><a href="?action=veuxModifierTache&task=<?=$tache->getID()?>&list=<?=$actualList?>">À remplacer par une image de stylo (^u^")</a></td>
<td><input name="exist[]" type="hidden" value="<?=$tache->getID()?>"?></td>
</tr> </tr>
<?php endforeach;?> <?php endforeach;?>
<?php endif;?>
<tr>
<td></td>
<td><a href="?action=wantAddTask&list=<?=$actualList?>">+</td>
<td></td>
</tr>
</tbody> </tbody>
</table> </table>
<input name="Sauvegarder l'étât!" type="submit"/> <input value="Décocher toutes les cases" type="reset"/>
<input name="Décocher toutes les cases" type="reset"/> <input value="Sauvegarder l'étât!" type="submit"/>
</form> </form>
</main> </main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>

@ -1,7 +1,7 @@
<head> <head>
<meta charset="utf8"> <meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?=$nomDuSite?></title> <title>Éditer une tache</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head> </head>
@ -12,7 +12,7 @@
</header> </header>
<main> <main>
<form method="post"> <form method="post" action="?action=editionTache&task=<?=isset($tacheAModifier) ? $tacheAModifier : "-1"?>&list=<?=isset($listeAModifier) ? $listeAModifier : "-1"?>">
<table> <table>
<thead> <thead>
<tr> <tr>
@ -22,16 +22,14 @@
</thead> </thead>
<tbody> <tbody>
<?php foreach($taches as $tache):?>
<tr> <tr>
<td><input name="nom" type="text" value="<?=$tache->getNom()?>"/></td> <td><input name="nom" type="text" placeholder="exmple: Tache n°1"/></td>
<td><input name="commentaire" type="text" value="<?=$tache->getCommentaire()?>"/></td> <td><input name="commentaire" type="text" placeholder="exmple: Regarder Evangelion !"></td>
</tr> </tr>
<?php endforeach;?>
</tbody> </tbody>
</table> </table>
<input name="Sauvegarder l'étât!" type="submit"/> <input value="Éffacer" type="reset"/>
<input name="Décocher toutes les cases" type="reset"/> <input value="Modifier" type="submit"/>
</form> </form>
</main> </main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>

@ -3,19 +3,18 @@
<title>ERREUR :/</title> <title>ERREUR :/</title>
</head> </head>
<body> <body>
<?php require("vues/header.php");?>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Erreur</th> <th>Erreur</th>
<th>Commentaire</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if(isset($erreurs)) : ?> <?php if(isset($erreurs)) : ?>
<?php foreach($erreurs as $erreur => $commentaire) :?> <?php foreach($erreurs as $erreur) :?>
<tr> <tr>
<td><?=$erreur?></td> <td><?=$erreur?></td>
<td><?=$commentaire?></td>
</tr> </tr>
<?php endforeach;?> <?php endforeach;?>
<?php endif;?> <?php endif;?>

@ -1,14 +1,14 @@
<?php $nomDuSite="SUPER MEGA TODO LIST";?>
<header> <header>
<nav class="navbar navbar-exand-lg navbar-dark bg-dark"> <nav class="navbar navbar-exand-lg navbar-dark bg-dark">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="?"><?=$nomDuSite?></a> <a class="navbar-brand" href="?">SUPER MEGA TODO LIST</a>
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item"><a href="?action=logout">Déconnexion</a></li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link dropdown-toggle" href="#" role="button" id="navbarDropdown" data-bs-toggle="dropdown" aria-expanded="false">Liste</a> <a class="nav-link dropdown-toggle" href="#" role="button" id="navbarDropdown" data-bs-toggle="dropdown" aria-expanded="false">Liste</a>
<ul class="dropdown-menu" aria-labellledby="navbarDropdown"> <ul class="dropdown-menu" aria-labellledby="navbarDropdown">
<li><a class="dropdown-item" href="?acction=addList">Ajouter une liste</a></li> <li><a class="dropdown-item" href="?action=wantAddList">Ajouter une liste</a></li>
<li><a class="dropdown-item" href="?acction=modifyList">Modifier des listes</a></li> <li><a class="dropdown-item" href="?action=modifyList">Modifier des listes</a></li>
</ul> </ul>
</li> </li>

Loading…
Cancel
Save