예제 #1
0
         $responsable = htmlentities($_POST['responsable']);
         $description = htmlentities($_POST['description']);
         $status = 0;
         $updatedBy = $_SESSION['userMerlaTrav']->login();
         $updated = date('Y-m-d h:i:s');
         if ($idProjet == "x") {
             $idSociete = htmlentities($_POST['idSocieteNew']);
         } else {
             if ($idProjet == 0) {
                 $idSociete = htmlentities($_POST['idSociete']);
             } else {
                 $idSociete = $projet->idSociete();
             }
         }
         $todo = new TodoProjet(array('id' => $idTodo, 'todo' => $todo, 'priority' => $priority, 'status' => $status, 'responsable' => $responsable, 'description' => $description, 'idProjet' => $idProjet, 'idSociete' => $idSociete, 'updated' => $updated, 'updatedBy' => $updatedBy));
         $todoManager->update($todo);
         $actionMessage = "Opération Valide : Todo Modifié(e) avec succès.";
         $typeMessage = "success";
     } else {
         $actionMessage = "Erreur Modification Todo : Vous devez remplir le champ 'todo'.";
         $typeMessage = "error";
     }
 } else {
     if ($action == "update-priority") {
         $idTodo = htmlentities($_POST['idTodo']);
         $priority = htmlentities($_POST['priority']);
         $todoManager->updatePriority($idTodo, $priority);
         $actionMessage = "Opération Valide : Todo Modifié avec succès.";
         $typeMessage = "success";
     } else {
         if ($action == "delete") {