Example #1
0
            $paramTag = $xp->query('//PARAM[.="' . $var . '"]');
            if ($paramTag->length !== 0) {
                $myParamBuilder->paramLocalBuild($var);
            }
        }
    }
    // Run command
    if ($isMulti) {
        $DD_cmd = 'DD_PS';
    } else {
        $DD_cmd = 'DD_Plot';
    }
    $cmd = DDBIN . $DD_cmd . " request.list " . $user . " " . $IP . " " . DDPROJECT . " " . DDPROJLIB;
    $cmdResult = system($cmd);
    if ($cmdResult === false) {
        errorProcessing($ID, $cmdResult);
    }
    if ($isMulti) {
        if (file_exists('idl.ps')) {
            rename('idl.ps', 'idl' . sprintf("%03d", $i) . '.ps');
        }
    }
    $i++;
}
// Processing is finished, now post-processing service
if ($isMulti) {
    foreach (glob("idl*.ps") as $aPS) {
        exec("ps2pdf " . $aPS);
    }
    $cmd = "gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=" . finalDir . $ID . ".pdf ";
    foreach (glob("idl*.pdf") as $aPDF) {
Example #2
0
function xml2Vot($ID, $newHelioResult)
{
    $xslt = new XSLTProcessor();
    // Chargement du fichier XSL
    $xsl = new DomDocument();
    $xsl->load(XML_BASE_DIR . "/xml2votMulti.xsl");
    // Import de la feuille XSL
    $xslt->importStylesheet($xsl);
    $vot = new DomDocument();
    if (!$vot->loadXML($xslt->transformToXML($newHelioResult))) {
        errorProcessing($ID, 'can\'t convert Result table into VOT');
        die;
    }
    if (!$vot->save("VOT.xml")) {
        errorProcessing($ID, 'can\'t save VOT');
        die;
    }
    if (Verbose) {
        fwrite(log, 'ID = ' . $ID . PHP_EOL);
    }
    if (!rename('VOT.xml', finalDir . $ID . '.xml')) {
        errorProcessing($ID, 'can\'t copy  VOT to final destination');
        die;
    }
}