示例#1
0
文件: start.php 项目: exaflo/appli
 $start = $objSmartgang->getmicrotime();
 if (isset($_GET['idcommande']) && $_GET['idcommande'] > 0 && (isset($_GET['idatelier']) && $_GET['idatelier'] > 0)) {
     $pnIdCommande = $_GET['idcommande'];
     $pnIDAtelier = $_GET['idatelier'];
     if (isset($_GET['dateExp']) && $_GET['dateExp'] != "null") {
         $date = \DateTime::createFromFormat('d/m/Y', $_GET['dateExp']);
         if (is_object($date)) {
             $pdDateExpe = "'" . $date->format('Ymd') . "'";
         }
     }
     $objSmartgang->logFile(basename(__FILE__), "script", "EXE", "Commande -> {$pnIdCommande}");
     $conDbo = $objSmartgang->getConDbo();
     //-- conn to dbo
     if (!$conDbo) {
         //-- success connect
         $pnIdPlanche = $objSmartgang->getCreationPlancheNegoce($pnIdCommande, $pnIDAtelier, $pnIdUtilisateur, $pdDateExpe);
         //-- creationsql planche negoce
         if (is_numeric($pnIdPlanche)) {
             //-- recuperation des infos de planches
             $objSmartgang->getPapierBrochure($pnIdCommande, $pnIdPlanche);
             //-- add format "BROCHURE" if needed
             $resu_info = $objSmartgang->getInfoPlanche($pnIdPlanche);
             //-- recup info planche
             $objSmartgang->getFicheFabV2($resu_info);
             //-- create Fiche de fab negoce PDF
             $objSmartgang->getXmlFile($pnIdPlanche);
             //-- genere le xml de la fiche de fab
             sleep(120);
             //-- wait 120sec to be sur that all the files are copied
             $objSmartgang->getImport($resu_info);
             //-- appel au script de déplacement des fichiers dans IMPORTS