コード例 #1
0
     $idLocaux = $_POST['idLocaux'];
     $status = htmlentities($_POST['status']);
     $locauxManager->changeStatus($idLocaux, $status);
     //add History data
     $createdBy = $_SESSION['userMerlaTrav']->login();
     $created = date('Y-m-d h:i:s');
     $history = new History(array('action' => "Modification Status", 'target' => "Table des locaux commerciaux", 'description' => "Modifier le status d'un local commercial", 'created' => $created, 'createdBy' => $createdBy));
     //add it to db
     $historyManager->add($history);
     $actionMessage = "Opération Valide : Local Commercial Status Modifié avec succès.";
     $typeMessage = "success";
 } else {
     if ($action == "updateClient") {
         $idLocaux = $_POST['idLocaux'];
         $par = htmlentities($_POST['par']);
         $locauxManager->updatePar($par, $idLocaux);
         //add History data
         $createdBy = $_SESSION['userMerlaTrav']->login();
         $created = date('Y-m-d h:i:s');
         $history = new History(array('action' => "Modification Client", 'target' => "Table des locaux commerciaux", 'description' => "Modifier le client réservant du local commercial", 'created' => $created, 'createdBy' => $createdBy));
         //add it to db
         $historyManager->add($history);
         $actionMessage = "Opération Valide : Local Commercial Réservation Modifiée avec succès.";
         $typeMessage = "success";
     } else {
         if ($action == "delete") {
             $idLocaux = $_POST['idLocaux'];
             $locauxManager->delete($idLocaux);
             //add History data
             $createdBy = $_SESSION['userMerlaTrav']->login();
             $created = date('Y-m-d h:i:s');