From d73143f4ae51bdf0115b2cff8b22756f14e6880d Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 19 Oct 2011 07:11:37 +0000 Subject: [PATCH] Correction script --- batch/greffeCmdTelechargement.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/batch/greffeCmdTelechargement.php b/batch/greffeCmdTelechargement.php index f07580c8e..91867cdcd 100644 --- a/batch/greffeCmdTelechargement.php +++ b/batch/greffeCmdTelechargement.php @@ -30,7 +30,7 @@ if ($argv[1] == 'reprise') require_once 'infogreffe/infogreffews.php'; $wdb = new WDB('sdv1'); - $repErreur = $wdb->select('commandes_erreur', '*', "erreur != '' AND dateCommande > DATE_SUB(NOW(),INTERVAL 120 HOUR)"); + $repErreur = $wdb->select('commandes_erreur', '*', "erreur!='' AND dateCommande > DATE_SUB(NOW(),INTERVAL 120 HOUR)"); if (count($repErreur)==0) exit; foreach($repErreur as $cmd){ @@ -51,7 +51,7 @@ if ($argv[1] == 'reprise') } elseif (in_array($argv[1], array('rapport', 'rapportcomplet'))) { - require_once realpath(dirname(__FILE__)) . '../config/prepend.php'; + require_once realpath(dirname(__FILE__)) . '/../config/prepend.php'; require_once 'common/curl.php'; require_once 'common/mysql.php'; require_once 'sendmail/mail.php'; @@ -60,13 +60,13 @@ elseif (in_array($argv[1], array('rapport', 'rapportcomplet'))) $wdb = new WDB('sdv1'); if ($argv[1] == 'rapportcomplet') { - $repErreur = $wdb->select('commandes_erreur', '*', "erreur != '' AND dateReception!='0000-00-00 00:00:00' ORDER BY dateCommande ASC"); + $repErreur = $wdb->select('commandes_erreur', '*', "erreur!='' AND dateReception=='0000-00-00 00:00:00' ORDER BY dateCommande ASC"); $sujet = "[Commandes Greffe - Erreur WebService] - Rapport Complet"; } else { $timestamp = mktime(0, 0, 0, date("m") , date("d")-1, date("Y")); $hier = date('Y-m-d', $timestamp); $sujet = "[Commandes Greffe - Erreur WebService] - ".$hier; - $repErreur = $wdb->select('commandes_erreur', '*', "erreur != '' AND dateReception!='0000-00-00 00:00:00' AND (dateCommande BETWEEN '.$hier.' 00:00:00 AND '.$hier.' 23:59:59) ORDER BY dateCommande ASC"); + $repErreur = $wdb->select('commandes_erreur', '*', "erreur!='' AND dateReception=='0000-00-00 00:00:00' AND (dateCommande BETWEEN '.$hier.' 00:00:00 AND '.$hier.' 23:59:59) ORDER BY dateCommande ASC"); } $emailTxt = 'Commandes Greffe - Erreur WebService'; $emailTxt.= '
';