Beispiel #1
0
<?php

include '/var/www/appli/lib/srv.php';
//-- Load class exa
require_once '/var/www/appli/class/class.exa.php';
$objSmartgang = new exaprint();
$conf = $objSmartgang->getParams();
$host = $conf['con']['host'];
$usr = $conf['con']['user'];
$pwd = $conf['con']['pwd'];
$db = $conf['con']['dbname'];
$conn = mssql_connect($host, $usr, $pwd);
if (!$conn) {
    die('Erreur connect MSSQLserver : ' . mssql_get_last_message());
}
$dtb = mssql_select_db($db);
if (!$dtb) {
    die('Erreur connect dabase MSSQL : ' . mssql_get_last_message());
}
Beispiel #2
0
<?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";
}
Beispiel #3
0
 *
 * Created by flo.
 * File: checkCity.php
 * Date: 10/02/16 - 12:00
 * Proj: appli
 *
 */
$psCountry = null;
$pnPostalCode = null;
$pnPostalCodeUkDebut = null;
$pnPostalCodeUkFin = null;
$out = '<label for="city" class="control-label">City</label>';
if (isset($_GET['country']) && $_GET['country'] != '') {
    if (isset($_GET['postalCode']) && $_GET['postalCode'] != '') {
        require_once '/var/www/appli/class/class.exa.php';
        $obj = new exaprint();
        $psCountry = "AND TP.LibellePays = '" . str_replace("'", "''", $_GET['country']) . "'";
        $pnPostalCode = "AND TV.CodePostal = '" . str_replace("'", "''", $_GET['postalCode']) . "'";
        //        if(isset($_GET['postalCodeUKDebut']) && $_GET['postalCodeUKDebut'] != '') $pnPostalCodeUkDebut = "AND TVAA.debutPlageCodePostal = '".str_replace("'","''",$_GET['postalCodeUKDebut'])."'";
        //        if(isset($_GET['postalCodeUKFin']) && $_GET['postalCodeUKFin'] != '') $pnPostalCodeUkFin = "AND TVAA.finPlageCodePostal = '".str_replace("'","''",$_GET['postalCodeUKFin'])."'";
        $obj->getConDbo();
        $q = "SELECT\n    TV.LibelleVille\nFROM\n    TBL_PAYS AS TP\n     LEFT OUTER JOIN TBL_VILLE AS TV ON TP.IDPays = TV.IDPaysVille\n     --LEFT OUTER JOIN TBL_VILLE_ANNEXE_ANGLETERRE AS TVAA ON TV.IDVille = TVAA.idVille\nWHERE\n    TP.GereVille = 1\n    {$psCountry}\n    {$pnPostalCode}\n    /*{$pnPostalCodeUkDebut}\n    {$pnPostalCodeUkFin}*/\nORDER BY\n    TP.LibellePays ASC\n    , TV.LibelleVille ASC\n    , TV.CodePostal ASC";
        $row = $obj->execMsSql($q);
        if (is_array($row)) {
            $out .= '<select id="city" name="city" class="form-control">';
            if (count($row) > '1') {
                $out .= '<option></option>';
            }
            foreach ($row as $key => $value) {
                $out .= '<option value="' . $value->LibelleVille . '">' . $value->LibelleVille . '</option>';
            }
Beispiel #4
0
<?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);