diff --git a/src/controller/CtrlUtilisateur.php b/src/controller/CtrlUtilisateur.php index 764ed13..9da2ecf 100755 --- a/src/controller/CtrlUtilisateur.php +++ b/src/controller/CtrlUtilisateur.php @@ -214,6 +214,19 @@ class CtrlUtilisateur { } + + public function listePrécédente(array $dVueErreur){ + if($_COOKIE['pageUser'] > 1){ + setcookie('pageUser', $_COOKIE['pageUser'] - 1, time() + 24*3600); + } + $this->ConsulterListePrive($dVueErreur); + } + + public function listeSuivante(array $dVueErreur){ + setcookie('pageUser', $_COOKIE['pageUser'] + 1, time() + 24*3600); + $this->ConsulterListePrive($dVueErreur); + } + }//fin class ?> diff --git a/src/controller/FrontControleur.php b/src/controller/FrontControleur.php index 4f69961..18e429d 100755 --- a/src/controller/FrontControleur.php +++ b/src/controller/FrontControleur.php @@ -7,6 +7,9 @@ class FrontControleur { if(!isset($_COOKIE['page'])){ setcookie('page', 1, time() + 24*3600); } + if(!isset($_COOKIE['pageUser'])){ + setcookie('pageUser', 1, time() + 24*3600); + } try { $string_actor=' '; diff --git a/src/modele/MdlVisiteur.php b/src/modele/MdlVisiteur.php index 68e347c..3e542c6 100755 --- a/src/modele/MdlVisiteur.php +++ b/src/modele/MdlVisiteur.php @@ -74,7 +74,7 @@ public static function RecupererListePublic(){ $nom=$_POST['nom-ajout-liste']; $description=$_POST['description-ajout-liste']; Validation::val_form_add($nom,$description,$dVueErreur); - $listGtw->Ajouter($nom, $description,1, null); + $listGtw->Ajouter($nom, $description,1, 1); } public function check(){ diff --git a/src/modele/gateway/ListeGateway.php b/src/modele/gateway/ListeGateway.php index 3fb6ed8..677fb49 100755 --- a/src/modele/gateway/ListeGateway.php +++ b/src/modele/gateway/ListeGateway.php @@ -18,7 +18,7 @@ class ListeGateway{ } public function Editer(string $id, string $nom, string $description){ - $query='UPDATE ToDoList_Liste SET nom=:nom AND description=:description WHERE id=:id;'; + $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), diff --git a/src/vue/html/PageListePrive.php b/src/vue/html/PageListePrive.php index 13da8de..8563d49 100644 --- a/src/vue/html/PageListePrive.php +++ b/src/vue/html/PageListePrive.php @@ -1,13 +1,14 @@
- += $liste->getDescription()?> -
= $liste->getDateCreation()?> : = $liste->getIdUtilisateur()?>
+= $liste->getDateCreation()?> by = $_SESSION['pseudo'] ?>
@@ -198,17 +199,17 @@ } $total = $total + 1; ?> -