* */ //-- verify status $file_status = fopen("/var/www/appli/smartgang/status/negoce.txt", "r+"); $status = fgets($file_status); fclose($file_status); if ($status == "Running") { $pnIdPlanche = '0'; $pnIdCommande = '0'; $pdDateExpe = "''"; $pnIdUtilisateur = 687; include '/var/www/appli/lib/srv.php'; require_once '/var/www/appli/class/class.gang.php'; $objSmartgang = new smartgang(); $objSmartgang->logFile(basename(__FILE__), "script", "RUN", "negoce/start.php"); $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);
* File: mono/delete.php * Date: 17/11/15 - 10:30 * Proj: appli * */ $file_status = fopen("/var/www/appli/smartgang/status/dispatch.txt", "r+"); $status = fgets($file_status); fclose($file_status); if ($status == "Running") { $pnIdUtilisateur = 687; include '/var/www/appli/lib/srv.php'; require_once '/var/www/appli/class/class.gang.php'; //-- Load class exa $objSmartgang = new smartgang(); $objSmartgang->logFile(basename(__FILE__), "script", "RUN", "mono/delete.php"); $start = $objSmartgang->getmicrotime(); //-- define start time $conDbo = $objSmartgang->getConDbo(); //-- conn to dbo if (isset($_SERVER['QUERY_STRING'])) { $qp = explode('&', $_SERVER['QUERY_STRING']); } else { $qp = $_SERVER['argv']; //-- pour récup des params via le terminal array_shift($qp); //-- via le terminal, le premier élément est le nom du script => on dépile le 1er élément } if (!$conDbo) { getSuppPlanche($pnIdUtilisateur, $qp[0]); } else { $objSmartgang->logFile(basename(__FILE__), "script", "ERR", "conn dbo impossible");
<?php /** Created by blond. * File: find.php * Date: 29/02/16 - 11:37 * Proj: appli * */ //-- verify status $file_status = fopen("/var/www/appli/smartgang/status/find.txt", "r+"); $status = fgets($file_status); fclose($file_status); if ($status == "Running") { include '/var/www/appli/lib/srv.php'; require_once '/var/www/appli/class/class.gang.php'; $exaprint = new smartgang(); $run = $exaprint->getmicrotime(); $exaprint->logFile(basename(__FILE__), "script", "RUN", " <> //- FIND PDF FROM METRIX AUTOMATION - <>"); $exaprint->getFindAndCopy(); // $exaprint->getFindAndCopy_v2(); $end = $exaprint->getmicrotime(); $exaprint->logFile(basename(__FILE__), "script", "EXE", " <> - END FIND PDF FROM METRIX AUTOMATION - // <>"); $exaprint->logFile(basename(__FILE__), "script", "END", ": Find executed in " . round($end - $run, 5) . "sec\n"); }
<?php if (isset($_GET['idplanche']) && $_GET['idplanche'] > '0') { $pnIdPlanche = $psPath = $tpsEcoule = $fileIntoImport = $bascule = $exportAsked = null; $arrayProduct = $arrayLayout = array(); $pnIdPlanche = intval($_GET['idplanche']); if (isset($_GET['exportPdf']) && $_GET['exportPdf'] != "") { $exportAsked = $_GET['exportPdf']; } include '/var/www/appli/lib/srv.php'; require_once "/var/www/appli/class/class.gang.php"; $exaprint = new smartgang(); $start = $exaprint->getmicrotime(); $exaprint->logFile(basename(__FILE__), "script", "RUN", "IDPlanche: {$pnIdPlanche} - ExportPDF: {$exportAsked}"); $deviceId = "Speedmaster 102"; $bascule = "Sheetwise"; $bleed = "2"; $params = $exaprint->getParams(); $pathMontage = $params['montage']['url']; $pathInputMxml = $params['metrix']['path']; $conDbo = $exaprint->getConDbo(); if ($exportAsked != "non") { $exec = "exec dbo.P_FluxEvenementCreation null,{$pnIdPlanche},3,687,'MetrixAutomation',0"; } else { $exec = "exec dbo.P_FluxEvenementCreation null,{$pnIdPlanche},2,687,'MetrixAutomation',0"; } $exaprint->execMsSql($exec); $info_planche = $exaprint->getInfoPlanche($pnIdPlanche); $pListeCommandes = $info_planche['pListeCommandes']; $psCodeTete = $info_planche['psCodeTete']; $psActiviteProd = $info_planche['psActiviteProd'];
/** Created by blond. * File: express/start.php * Date: 17/11/15 * */ $file_status = fopen("/var/www/appli/smartgang/status/expressFr.txt", "r+"); $status = fgets($file_status); fclose($file_status); if ($status == "Running") { include '/var/www/appli/lib/srv.php'; require_once '/var/www/appli/class/class.gang.php'; //-- Load class exa $exaprint = new smartgang(); $exaprint->logFile(basename(__FILE__), "script", "RUN", "express/start.php"); $start = $exaprint->getmicrotime(); $numberNew = null; $numberOld = 500; if (isset($_SERVER['QUERY_STRING'])) { $qp = explode('&', $_SERVER['QUERY_STRING']); } else { $qp = $_SERVER['argv']; //-- pour récup des params via le terminal array_shift($qp); //-- via le terminal, le premier élément est le nom du script => on dépile le 1er élément } if (is_array($qp)) { $nbCommandes = $qp[0]; $conDbo = $exaprint->getConDbo(); if (!$conDbo && isset($nbCommandes) && $nbCommandes > '0') { $exaprint->getUpNbCmdNbPose($nbCommandes, 'XPRESS++', $numberNew);