change path library

This commit is contained in:
benoitpotier 2017-04-11 10:33:21 +02:00
parent 883bfb4ff9
commit e224a9393b

View File

@ -559,37 +559,37 @@ if (count($tabEntete)>0){
}
//Définition du fichier de sortie
if ( $opts->reprise ) {
if ( $opts->reprise ) {
$outFile = $configApp->profil->path->data.'/export/'.$commande->fichierOut;
$rowReprise = 0;
$fp = fopen($outFile, 'r+');
if ($fp === false) {
echo "Impossible d'ouvrir $outFile";
exit(1);
}
while (($data = fgetcsv($fp, 0, ',', '"')) !== FALSE) {
$rowReprise++;
}
while (($data = fgetcsv($fp, 0, ',', '"')) !== FALSE) {
$rowReprise++;
}
} else {
} else {
$outFile = $configApp->profil->path->data.'/export/'.$file.'-'.date('YmdHis').'.csv';
//Ecriture de l'entete du fichier
//Ecriture de l'entete du fichier
$fp = fopen($outFile, 'w');
if ($fp === false) {
echo "Impossible d'ouvrir $outFile";
exit(1);
}
if (count($tabEnteteF) > 0){
fputcsv($fp, $tabEnteteF, ',', '"');
}
if (count($tabEnteteF) > 0){
fputcsv($fp, $tabEnteteF, ',', '"');
}
//Mise à jour des éléments
if ($opts->id) {
$commandesM->update(array(
'dateStart'=>date('Y-m-d H:i:s'),
'fichierOut' => basename($outFile)),
if ($opts->id) {
$commandesM->update(array(
'dateStart'=>date('Y-m-d H:i:s'),
'fichierOut' => basename($outFile)),
"id = ".$commande->id
);
}
);
}
}
$row = 0;
@ -761,21 +761,21 @@ foreach($tabIdentifiant as $item)
eval( "\$where = \"$where\";" );
${$element.'SQL'} = 'SELECT '.${$element.'Fields'}.' FROM '.$select['db'].$where;
try {
try {
$stmt = $dbMetier->query(${$element.'SQL'});
$result = $stmt->fetchAll();
if ( count($result)>0 ) {
$tabNewData[$extendNbRow] = array_merge( $tabNewData[$extendNbRow] , $result[0]);
$result = $stmt->fetchAll();
if ( count($result)>0 ) {
$tabNewData[$extendNbRow] = array_merge( $tabNewData[$extendNbRow] , $result[0]);
}
} catch (Zend_Db_Exception $e) {
//Enregistrement du message d'erreur
if ($opts->id) {
$commandesM->update(array('error'=>$e->getMessage()), "id = ".$commande->id);
//Enregistrement du message d'erreur
if ($opts->id) {
$commandesM->update(array('error'=>$e->getMessage()), "id = ".$commande->id);
}
//Arret du script
exit;
exit;
}
}
@ -915,7 +915,7 @@ function dateFermetureEtData($siren, $nic, $values = false)
}
$tabData['dateFermetureEt'] = isset($ret[0]['insDATEVE']) ? $ret[0]['insDATEVE'] : '';
$tabData['codeFermetureEt'] = isset($ret[0]['insEVE']) ? $ret[0]['insEVE'] : '';
return $tabData;
return $tabData;
}
function dateFermetureEnEntete($values)
@ -1258,7 +1258,7 @@ function indiScoreData($siren, $nic, $values = false)
$tabData['dateBilan'] = $ret[0]['dateBilan'];
} else {
$tabData['indiScore'] = 'Aucune donnée';
$tabData['indiScoreDate'] = 'Aucune donnée';
$tabData['indiScoreDate'] = 'Aucune donnée';
$tabData['encours'] = 'Aucune donnée';
$tabData['dateBilan'] = 'Aucune donnée';
}
@ -2211,8 +2211,8 @@ function contentieuxlisteMultiple($siren, $nic=0, $values = false,$qualite='')
$tabData=$stmt->fetchAll(\PDO::FETCH_ASSOC);
//if(false){
if(in_array('StatusLabel',$tabFields) || in_array('CategoryLabel',$tabFields) || in_array('Parties',$tabFields) || in_array('Representants',$tabFields)){
$status = include APPLICATION_PATH . '/../library/Metier/Ctx/AffaireStatus.php';
$categories = include APPLICATION_PATH . '/../library/Metier/Table/AffairesTypes.php';
$status = include APPLICATION_PATH . '/../vendor/scores/src/library/Metier/Ctx/AffaireStatus.php';
$categories = include APPLICATION_PATH . '/../vendor/scores/src/library/Metier/Table/AffairesTypes.php';
foreach($tabData as $k => $row){
echo $k.'--->'.$siren;
if(isset($row['StatusLabel']) && isset($status[$row['StatusLabel']])){$tabData[$k]['StatusLabel']=$status[$row['StatusLabel']];}