Exemplo n.º 1
0
         if (isset($_POST['source']) and $_POST['source'] == "clients-list") {
             $redirectLink = "Location:../clients-list.php";
         }
     } else {
         $actionMessage = "<strong>Erreur Modification Client : </strong>Vous devez remplir le champ <strong>&lt;Prix de vente&gt;</strong>.";
         $typeMessage = "error";
         $redirectLink = "Location:../contrat.php?codeContrat=" . $codeContrat;
     }
 } else {
     if ($action == "updateImageNote") {
         $codeContrat = htmlentities($_POST['codeContrat']);
         $imageNote = "";
         $idContrat = htmlentities($_POST['idContrat']);
         if (file_exists($_FILES['note-client-image']['tmp_name']) || is_uploaded_file($_FILES['note-client-image']['tmp_name'])) {
             $imageNote = imageProcessing($_FILES['note-client-image'], '/pieces/pieces_notes_clients/');
             $contratManager->updateImageNote($idContrat, $imageNote);
             $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']);