Esempio n. 1
0
         $filenameDest = $imageManager->fileDestManagement($source, date('Ymd'));
         //Image
         $destination = $_SERVER['DOCUMENT_ROOT'] . '/photos/bdc' . $filenameDest;
         //print_r($source);exit();
         if (!copy($source, $destination)) {
             throw new Exception('Erreur contactez votre administrateur <br> Le PDF error:', $e->getMessage(), "\n");
             exit;
         }
         //Vignette
         $_POST['pdf'] = $filenameDest;
     }
     $imageManager = null;
     if ($_POST['action'] == 'modif') {
         //Modifier la news
         try {
             $result = $planning->planningModify($_POST);
             header('Location: /admin/planning.php');
         } catch (Exception $e) {
             echo 'Erreur contactez votre administrateur <br> :', $e->getMessage(), "\n";
             exit;
         }
     }
 }
 // ----------------------------------------------------------- //
 // ---- Traitement des offres -------------------------------- //
 if ($_POST["reference"] == "offres") {
     if ($debug) {
         echo "Traitement des offres...<br>";
     }
     $offre = new Offre();
     $offre_type_bien = new Offre_type_bien();