$actionMessage = "<strong>Opération valide : </strong>Image Note est modifiée avec succès.";
         $typeMessage = "success";
     } else {
         $actionMessage = "<strong>Erreur Modification Image Note : </strong>Vous devez séléctionner un fichier.";
         $typeMessage = "error";
     }
     $redirectLink = "Location:../contrat.php?codeContrat=" . $codeContrat . "&idProjet=" . $idProjet;
     if (isset($_POST['source']) and $_POST['source'] == "clients-modification") {
         $redirectLink = "Location:../clients-modification.php";
     }
 } else {
     if ($action == "updateObservation") {
         $idContrat = htmlentities($_POST['idContrat']);
         $codeContrat = htmlentities($_POST['codeContrat']);
         $observation = htmlentities($_POST['observation']);
         $contratManager->updateObservationClient($idContrat, $observation);
         //after the delete of our contract, we should change the property status to "Disponible"
         $actionMessage = "<strong>Opération Valide : </strong>Observation ajouté(e) avec succès.";
         $typeMessage = "success";
         $redirectLink = "Location:../contrat.php?codeContrat={$codeContrat}";
     } else {
         if ($action == "delete") {
             $idContrat = $_POST['idContrat'];
             $contratManager->hide($idContrat);
             //add history data to db
             $createdBy = $_SESSION['userMerlaTrav']->login();
             $created = date('Y-m-d h:i:s');
             $history = new History(array('action' => "Suppression", 'target' => "Table des contrats", 'description' => "Suppression du contrat dont l'identifiant est : " . $idContrat . " - Projet : " . $nomProjet, 'created' => $created, 'createdBy' => $createdBy));
             //add it to db
             $historyManager->add($history);
             //after the delete of our contract, we should change the property status to "Disponible"