Correction script
This commit is contained in:
parent
87c255e1ee
commit
d73143f4ae
@ -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 = '<b><u>Commandes Greffe - Erreur WebService</u></b>';
|
||||
$emailTxt.= '<br/>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user