diff --git a/controller/VisitorCtrl.php b/controller/VisitorCtrl.php index b7f3870..7fc0fe4 100644 --- a/controller/VisitorCtrl.php +++ b/controller/VisitorCtrl.php @@ -178,7 +178,10 @@ class VisitorCtrl } function isDone(){ - $this->taskModel->modifTask($_POST['idT'],'isDone',true); + if ($_POST['Tdone']) + $this->taskModel->modifTask($_POST['idT'],'isDone',false); + else + $this->taskModel->modifTask($_POST['idT'],'isDone',true); if(!empty($_POST['isPriv'])) header("Location:index.php?action=voirListePriv"); else diff --git a/view/home.php b/view/home.php index d14d7f3..42b3894 100644 --- a/view/home.php +++ b/view/home.php @@ -100,14 +100,24 @@ } echo ' -
- + '; + if(!$t->get_isDone()){ + echo ''; + } else { + echo ''; + } + echo '
- diff --git a/view/privHome.php b/view/privHome.php index 4499c5d..0cf77b9 100644 --- a/view/privHome.php +++ b/view/privHome.php @@ -95,20 +95,31 @@ } echo ' - - -
-
- -
+
'; + if(!$t->get_isDone()){ + echo ''; + } else { + echo ''; + } + echo ' +
+
+ +
'; }