<?php /** * Created by PhpStorm. * User: blond * Date: 16/11/15 * Time: 20:03 */ if (isset($_GET['numero']) && $_GET['numero'] > 0) { //-- si un numero de planche est sup à 0 $pnIdPlanche = $_GET['numero']; include '/var/www/appli/lib/srv.php'; //-- load ip server require_once "../class/class.exa.php"; //-- load class to work $obj = new exaprint(); $obj->logFile(basename(__FILE__), __FUNCTION__, "RUN", ": {$pnIdPlanche}"); $obj->getConDbo(); $resu = $obj->getRollBackfiles($pnIdPlanche); $obj->logFile(basename(__FILE__), __FUNCTION__, "END", ": {$pnIdPlanche}\n"); return "fini"; } else { return "_GET['numero'] is null"; }
<?php function getmicrotime() { list($usec, $sec) = explode(" ", microtime()); return (double) $usec + (double) $sec; } $debut = getmicrotime(); $Path = $_GET['path']; $Path = preg_replace('/\\s/', '+', $Path); if (isset($_GET['numeroplanche'])) { require_once '/var/www/appli/class/class.exa.php'; $obj = new exaprint(); $obj->logFile(basename(__FILE__), "script", "RUN", "DomXML.php?{$_GET['numeroplanche']}"); if (!empty($Path)) { require 'class/class.fichefab.planches.mssql.php'; require 'class/class.fichefab.cmd.mssql.php'; // nouvel obj DOMxml $dom = new DOMDocument('1.0', 'UTF-8'); //to have indented output, not just a link $dom->preserveWhiteSpace = true; $dom->formatOutput = true; // insert xsl $xslt = $dom->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="http://94.103.137.90/PrinergyWeb/xml/template.xsl"'); $dom->appendChild($xslt); // root <fichefab> $new_fichefab = $dom->createElement('fichefab'); $dom->appendChild($new_fichefab); // add comment fichefab/<planches> $commentObject = $dom->createComment('planches'); $new_fichefab->appendChild($commentObject);