Class Path et nettoyage

This commit is contained in:
Michael RICOIS 2016-02-18 17:54:26 +00:00
parent 0693f4ce38
commit 0675673b6d
32 changed files with 39 additions and 35203 deletions

View File

@ -1242,7 +1242,7 @@ class Metier_Bodacc_MBodacc
public function getCodeFormeJur($strFJ)
{
$tabCjBodacc = include 'Metier/bodacc/BodaccCJ.php';
$tabCjBodacc = include 'Metier/Bodacc/BodaccCJ.php';
$strFJ = strtoupper(trim(preg_replace('/[^a-z]/i','',$strFJ)));
return $tabCjBodacc[$strFJ];
}

View File

@ -2845,7 +2845,7 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
elseif ($noteSolvabilite>=50) $plafond=150000;
elseif ($noteSolvabilite>=45) $plafond=30000;
else $plafond=15000;
if ($ENCOURS>$plafond) $ENCOURS=$plafond;
// Plafond si encours estimé
@ -3534,13 +3534,13 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
$version = '414';
$tabCommentaires = include __DIR__ . '/Comment/ScoreTxt'.$version.'N'.$NIVEAU.'.php';
$tabTriAff = include __DIR__ . '/Comment/ScoreTri'.$version.'N'.$NIVEAU.'.php';
require_once 'Metier/scores/Formule/Score_'.$version.'.php';
require_once 'Metier/Scores/Formule/Score_'.$version.'.php';
break;
case 'valo':
$version = 'v209';
$tabCommentaires = include __DIR__ . '/Comment/ValoTxt'.$version.'N'.$NIVEAU.'.php';
$tabTriAff = include __DIR__ . '/Comment/ValoTri'.$version.'N'.$NIVEAU.'.php';
require_once 'Metier/scores/Formule/Valo_'.$version.'.php';
require_once 'Metier/Scores/Formule/Valo_'.$version.'.php';
break;
}

View File

@ -2706,7 +2706,7 @@ class SdMetier_Scoring_Base extends SdMetier_Scoring_Vars
if ($tabTmp[0]['scoreDir'] !== null) {
$this->SCOREDIRI = $tabTmp[0]['scoreDir'];
}
if ($this->SCOREDIRI > $this->ENQUETEMAXI) {
if ($this->SCOREDIRI > $this->ENQUETEMAXI) {
$this->SCOREDIRI = $this->ENQUETEMAXI;
}
if ($tabTmp[0]['scoreSolv'] !== null) {
@ -2850,7 +2850,7 @@ class SdMetier_Scoring_Base extends SdMetier_Scoring_Vars
if ($encoursForce != null) {
$this->ENCOURS = $encoursForce;
}
switch ($this->FJUR2) {
case 11:
case 12:
@ -3508,13 +3508,13 @@ class SdMetier_Scoring_Base extends SdMetier_Scoring_Vars
$version = '414';
$tabCommentaires = include __DIR__ . '/Comment/ScoreTxt'.$version.'N'.$this->NIVEAU.'.php';
$tabTriAff = include __DIR__ . '/Comment/ScoreTri'.$version.'N'.$NIVEAU.'.php';
require_once 'Metier/scores/Formule/Score_'.$version.'.php';
require_once 'Metier/Scores/Formule/Score_'.$version.'.php';
break;
case 'valo':
$version = 'v209';
$tabCommentaires = include __DIR__ . '/Comment/ValoTxt'.$version.'N'.$this->NIVEAU.'.php';
$tabTriAff = include __DIR__ . '/Comment/ValoTri'.$version.'N'.$this->NIVEAU.'.php';
require_once 'Metier/scores/Formule/Valo_'.$version.'.php';
require_once 'Metier/Scores/Formule/Valo_'.$version.'.php';
break;
}

View File

@ -1,67 +0,0 @@
<?php
return array(
'ErrorType' => 'ErrorType',
'StatusReturn' => 'StatusReturn',
'Identite' => 'Identite',
'GeoInfos' => 'GeoInfos',
'IdentiteBilan' => 'IdentiteBilan',
'IdentiteBourse' => 'IdentiteBourse',
'AutreSiren' => 'AutreSiren',
'RechercheEntrepriseCriteres' => 'RechercheEntrepriseCriteres',
'CriteresEntreprise' => 'CriteresEntreprise',
'CriteresDirigeant' => 'CriteresDirigeant',
'RechercheEntrepriseReturn' => 'RechercheEntrepriseReturn',
'RechercheEntrepriseResult' => 'RechercheEntrepriseResult',
'RechercheEntrepriseReponses' => 'RechercheEntrepriseReponses',
'ListeEtablissementsReturn' => 'ListeEtablissementsReturn',
'Etablissement' => 'Etablissement',
'DirigeantsReturn' => 'DirigeantsReturn',
'Dirigeant' => 'Dirigeant',
'AnnoncesReturn' => 'AnnoncesReturn',
'Annonce' => 'Annonce',
'AnnonceEvenement' => 'AnnonceEvenement',
'LiensReturn' => 'LiensReturn',
'Actionnaire' => 'Actionnaire',
'Participation' => 'Participation',
'InseeReturn' => 'InseeReturn',
'InseeEven' => 'InseeEven',
'TvaReturn' => 'TvaReturn',
'InfosRegReturn' => 'InfosRegReturn',
'InfosReg' => 'InfosReg',
'InfosBourse' => 'InfosBourse',
'ListeBilansReturn' => 'ListeBilansReturn',
'ListeBilans' => 'ListeBilans',
'SetSurveillanceReturn' => 'SetSurveillanceReturn',
'SurveillancesReturn' => 'SurveillancesReturn',
'SurveillancesFiltre' => 'SurveillancesFiltre',
'Surveillance' => 'Surveillance',
'Bilan' => 'Bilan',
'BilanPoste' => 'BilanPoste',
'RechercheAnnonceReturn' => 'RechercheAnnonceReturn',
'RechercheAnnonceResult' => 'RechercheAnnonceResult',
'RechercheAnnonceCriteres' => 'RechercheAnnonceCriteres',
'RechercheAnnonce' => 'RechercheAnnonce',
'RatiosReturn' => 'RatiosReturn',
'RatiosBilansInfos' => 'RatiosBilansInfos',
'RatiosInfos' => 'RatiosInfos',
'RatiosSecteur' => 'RatiosSecteur',
'Ratios' => 'Ratios',
'Rapport' => 'Rapport',
'Indiscore' => 'Indiscore',
'Scores' => 'Scores',
'IndiscoreVariables' => 'IndiscoreVariables',
'CA_Y' => 'CA_Y',
'IndiscoreImportExport' => 'IndiscoreImportExport',
'IndiscoreInfosNotations' => 'IndiscoreInfosNotations',
'IndiscorePaiement' => 'IndiscorePaiement',
'IndiscorePaiementDetail' => 'IndiscorePaiementDetail',
'IndiscoreNotesStructure' => 'IndiscoreNotesStructure',
'AdresseDomEnt' => 'AdresseDomEnt',
'InfosIris' => 'InfosIris',
'BanquesReturn' => 'BanquesReturn',
'Banque' => 'Banque',
'ListeCompetencesReturn' => 'ListeCompetencesReturn',
'Competence' => 'Competence',
'IdentiteProcol' => 'IdentiteProcol',
'Organe' => 'Organe',
);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
Compatibilité client Java
Gestion encodage
Surface de magasin
Gestion Indiscore+ dans getRapport
Correction oubli DateMajANN dans type Identite

View File

@ -1,71 +0,0 @@
<?php
return array(
'ErrorType' => 'ErrorType',
'StatusReturn' => 'StatusReturn',
'SearchReturn' => 'SearchReturn',
'SearchEntrepriseReturn' => 'SearchEntrepriseReturn',
'SearchDirReturn' => 'SearchDirReturn',
'DirigeantsReturn' => 'DirigeantsReturn',
'AnnoncesReturn' => 'AnnoncesReturn',
'InseeReturn' => 'InseeReturn',
'TvaReturn' => 'TvaReturn',
'LiensReturn' => 'LiensReturn',
'InfosRegReturn' => 'InfosRegReturn',
'ListeBilansReturn' => 'ListeBilansReturn',
'SetSurveillanceReturn' => 'SetSurveillanceReturn',
'SurveillancesReturn' => 'SurveillancesReturn',
'ListeEtablissementsReturn' => 'ListeEtablissementsReturn',
'RatiosReturn' => 'RatiosReturn',
'RechercheAnnonceReturn' => 'RechercheAnnonceReturn',
'Identite' => 'Identite',
'GeoInfos' => 'GeoInfos',
'IdentiteBilan' => 'IdentiteBilan',
'IdentiteBourse' => 'IdentiteBourse',
'AutreSiren' => 'AutreSiren',
'EntrepriseCriteres' => 'EntrepriseCriteres',
'DirigeantCriteres' => 'DirigeantCriteres',
'EntrepriseItem' => 'EntrepriseItem',
'EntrepriseDirItem' => 'EntrepriseDirItem',
'Etablissement' => 'Etablissement',
'Dirigeant' => 'Dirigeant',
'AnnonceFilter' => 'AnnonceFilter',
'Annonce' => 'Annonce',
'AnnonceEvenement' => 'AnnonceEvenement',
'AnnonceNum' => 'AnnonceNum',
'Actionnaire' => 'Actionnaire',
'Participation' => 'Participation',
'InseeEven' => 'InseeEven',
'InfosReg' => 'InfosReg',
'InfosBourse' => 'InfosBourse',
'ListeBilans' => 'ListeBilans',
'SurveillancesFiltre' => 'SurveillancesFiltre',
'Surveillance' => 'Surveillance',
'Bilan' => 'Bilan',
'BilanPoste' => 'BilanPoste',
'RechercheAnnonceCriteres' => 'RechercheAnnonceCriteres',
'AnnonceItem' => 'AnnonceItem',
'RatiosBilansInfos' => 'RatiosBilansInfos',
'RatiosInfos' => 'RatiosInfos',
'RatiosSecteur' => 'RatiosSecteur',
'Ratios' => 'Ratios',
'Rapport' => 'Rapport',
'Indiscore' => 'Indiscore',
'Scores' => 'Scores',
'IndiscoreVariables' => 'IndiscoreVariables',
'CA_Y' => 'CA_Y',
'IndiscoreImportExport' => 'IndiscoreImportExport',
'IndiscoreInfosNotations' => 'IndiscoreInfosNotations',
'IndiscorePaiement' => 'IndiscorePaiement',
'IndiscorePaiementDetail' => 'IndiscorePaiementDetail',
'IndiscoreNotesStructure' => 'IndiscoreNotesStructure',
'IndiscoreBilans' => 'IndiscoreBilans',
'AdresseDomEnt' => 'AdresseDomEnt',
'InfosIris' => 'InfosIris',
'BanquesReturn' => 'BanquesReturn',
'Banque' => 'Banque',
'ListeCompetencesReturn' => 'ListeCompetencesReturn',
'Competence' => 'Competence',
'IdentiteProcol' => 'IdentiteProcol',
'Organe' => 'Organe',
'AutreSiret' => 'AutreSiret',
);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
Chiffre d'affaire estimé
nomUsage pour getDirigeants

View File

@ -1,71 +0,0 @@
<?php
return array(
'ErrorType' => 'ErrorType',
'StatusReturn' => 'StatusReturn',
'SearchReturn' => 'SearchReturn',
'SearchEntrepriseReturn' => 'SearchEntrepriseReturn',
'SearchDirReturn' => 'SearchDirReturn',
'DirigeantsReturn' => 'DirigeantsReturn',
'AnnoncesReturn' => 'AnnoncesReturn',
'InseeReturn' => 'InseeReturn',
'TvaReturn' => 'TvaReturn',
'LiensReturn' => 'LiensReturn',
'InfosRegReturn' => 'InfosRegReturn',
'ListeBilansReturn' => 'ListeBilansReturn',
'SetSurveillanceReturn' => 'SetSurveillanceReturn',
'SurveillancesReturn' => 'SurveillancesReturn',
'ListeEtablissementsReturn' => 'ListeEtablissementsReturn',
'RatiosReturn' => 'RatiosReturn',
'RechercheAnnonceReturn' => 'RechercheAnnonceReturn',
'Identite' => 'Identite',
'GeoInfos' => 'GeoInfos',
'IdentiteBilan' => 'IdentiteBilan',
'IdentiteBourse' => 'IdentiteBourse',
'AutreSiren' => 'AutreSiren',
'EntrepriseCriteres' => 'EntrepriseCriteres',
'DirigeantCriteres' => 'DirigeantCriteres',
'EntrepriseItem' => 'EntrepriseItem',
'EntrepriseDirItem' => 'EntrepriseDirItem',
'Etablissement' => 'Etablissement',
'Dirigeant' => 'Dirigeant',
'AnnonceFilter' => 'AnnonceFilter',
'Annonce' => 'Annonce',
'AnnonceEvenement' => 'AnnonceEvenement',
'AnnonceNum' => 'AnnonceNum',
'Actionnaire' => 'Actionnaire',
'Participation' => 'Participation',
'InseeEven' => 'InseeEven',
'InfosReg' => 'InfosReg',
'InfosBourse' => 'InfosBourse',
'ListeBilans' => 'ListeBilans',
'SurveillancesFiltre' => 'SurveillancesFiltre',
'Surveillance' => 'Surveillance',
'Bilan' => 'Bilan',
'BilanPoste' => 'BilanPoste',
'RechercheAnnonceCriteres' => 'RechercheAnnonceCriteres',
'AnnonceItem' => 'AnnonceItem',
'RatiosBilansInfos' => 'RatiosBilansInfos',
'RatiosInfos' => 'RatiosInfos',
'RatiosSecteur' => 'RatiosSecteur',
'Ratios' => 'Ratios',
'Rapport' => 'Rapport',
'Indiscore' => 'Indiscore',
'Scores' => 'Scores',
'IndiscoreVariables' => 'IndiscoreVariables',
'CA_Y' => 'CA_Y',
'IndiscoreImportExport' => 'IndiscoreImportExport',
'IndiscoreInfosNotations' => 'IndiscoreInfosNotations',
'IndiscorePaiement' => 'IndiscorePaiement',
'IndiscorePaiementDetail' => 'IndiscorePaiementDetail',
'IndiscoreNotesStructure' => 'IndiscoreNotesStructure',
'IndiscoreBilans' => 'IndiscoreBilans',
'AdresseDomEnt' => 'AdresseDomEnt',
'InfosIris' => 'InfosIris',
'BanquesReturn' => 'BanquesReturn',
'Banque' => 'Banque',
'ListeCompetencesReturn' => 'ListeCompetencesReturn',
'Competence' => 'Competence',
'IdentiteProcol' => 'IdentiteProcol',
'Organe' => 'Organe',
'AutreSiret' => 'AutreSiret',
);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
Correction sur le type codIris

View File

@ -1,74 +0,0 @@
<?php
return array(
'ErrorType' => 'ErrorType',
'StatusReturn' => 'StatusReturn',
'SearchReturn' => 'SearchReturn',
'SearchEntrepriseReturn' => 'SearchEntrepriseReturn',
'SearchDirReturn' => 'SearchDirReturn',
'DirigeantsReturn' => 'DirigeantsReturn',
'AnnoncesReturn' => 'AnnoncesReturn',
'InseeReturn' => 'InseeReturn',
'TvaReturn' => 'TvaReturn',
'LiensReturn' => 'LiensReturn',
'InfosRegReturn' => 'InfosRegReturn',
'ListeBilansReturn' => 'ListeBilansReturn',
'SetSurveillanceReturn' => 'SetSurveillanceReturn',
'SurveillancesReturn' => 'SurveillancesReturn',
'ListeEtablissementsReturn' => 'ListeEtablissementsReturn',
'RatiosReturn' => 'RatiosReturn',
'RechercheAnnonceReturn' => 'RechercheAnnonceReturn',
'Identite' => 'Identite',
'GeoInfos' => 'GeoInfos',
'IdentiteBilan' => 'IdentiteBilan',
'IdentiteBourse' => 'IdentiteBourse',
'AutreSiren' => 'AutreSiren',
'EntrepriseCriteres' => 'EntrepriseCriteres',
'DirigeantCriteres' => 'DirigeantCriteres',
'EntrepriseItem' => 'EntrepriseItem',
'EntrepriseDirItem' => 'EntrepriseDirItem',
'Etablissement' => 'Etablissement',
'Dirigeant' => 'Dirigeant',
'AnnonceFilter' => 'AnnonceFilter',
'Annonce' => 'Annonce',
'AnnonceEvenement' => 'AnnonceEvenement',
'AnnonceNum' => 'AnnonceNum',
'Actionnaire' => 'Actionnaire',
'Participation' => 'Participation',
'InseeEven' => 'InseeEven',
'InfosReg' => 'InfosReg',
'InfosBourse' => 'InfosBourse',
'ListeBilans' => 'ListeBilans',
'SurveillancesFiltre' => 'SurveillancesFiltre',
'Surveillance' => 'Surveillance',
'Bilan' => 'Bilan',
'BilanPoste' => 'BilanPoste',
'RechercheAnnonceCriteres' => 'RechercheAnnonceCriteres',
'AnnonceItem' => 'AnnonceItem',
'RatiosBilansInfos' => 'RatiosBilansInfos',
'RatiosInfos' => 'RatiosInfos',
'RatiosSecteur' => 'RatiosSecteur',
'Ratios' => 'Ratios',
'Rapport' => 'Rapport',
'Indiscore' => 'Indiscore',
'Scores' => 'Scores',
'IndiscoreVariables' => 'IndiscoreVariables',
'CA_Y' => 'CA_Y',
'IndiscoreImportExport' => 'IndiscoreImportExport',
'IndiscoreInfosNotations' => 'IndiscoreInfosNotations',
'IndiscorePaiement' => 'IndiscorePaiement',
'IndiscorePaiementDetail' => 'IndiscorePaiementDetail',
'IndiscoreNotesStructure' => 'IndiscoreNotesStructure',
'IndiscoreBilans' => 'IndiscoreBilans',
'AdresseDomEnt' => 'AdresseDomEnt',
'InfosIris' => 'InfosIris',
'BanquesReturn' => 'BanquesReturn',
'Banque' => 'Banque',
'ListeCompetencesReturn' => 'ListeCompetencesReturn',
'Competence' => 'Competence',
'IdentiteProcol' => 'IdentiteProcol',
'Organe' => 'Organe',
'AutreSiret' => 'AutreSiret',
'SearchRefClientReturn' => 'SearchRefClientReturn',
'SearchRefClient' => 'SearchRefClient',
'SearchRefClientInfo' => 'SearchRefClientInfo',
);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
Modification sur la méthode getSurveillances pour une meilleur gestion de la pagination

View File

@ -1,75 +0,0 @@
<?php
return array(
'ErrorType' => 'ErrorType',
'StatusReturn' => 'StatusReturn',
'SearchReturn' => 'SearchReturn',
'SearchEntrepriseReturn' => 'SearchEntrepriseReturn',
'SearchDirReturn' => 'SearchDirReturn',
'DirigeantsReturn' => 'DirigeantsReturn',
'AnnoncesReturn' => 'AnnoncesReturn',
'InseeReturn' => 'InseeReturn',
'TvaReturn' => 'TvaReturn',
'LiensReturn' => 'LiensReturn',
'InfosRegReturn' => 'InfosRegReturn',
'ListeBilansReturn' => 'ListeBilansReturn',
'SetSurveillanceReturn' => 'SetSurveillanceReturn',
'SurveillancesReturn' => 'SurveillancesReturn',
'ListeEtablissementsReturn' => 'ListeEtablissementsReturn',
'RatiosReturn' => 'RatiosReturn',
'RechercheAnnonceReturn' => 'RechercheAnnonceReturn',
'Identite' => 'Identite',
'GeoInfos' => 'GeoInfos',
'IdentiteBilan' => 'IdentiteBilan',
'IdentiteBourse' => 'IdentiteBourse',
'AutreSiren' => 'AutreSiren',
'EntrepriseCriteres' => 'EntrepriseCriteres',
'DirigeantCriteres' => 'DirigeantCriteres',
'EntrepriseItem' => 'EntrepriseItem',
'EntrepriseDirItem' => 'EntrepriseDirItem',
'Etablissement' => 'Etablissement',
'Dirigeant' => 'Dirigeant',
'AnnonceFilter' => 'AnnonceFilter',
'Annonce' => 'Annonce',
'AnnonceEvenement' => 'AnnonceEvenement',
'AnnonceNum' => 'AnnonceNum',
'Actionnaire' => 'Actionnaire',
'Participation' => 'Participation',
'InseeEven' => 'InseeEven',
'InfosReg' => 'InfosReg',
'InfosBourse' => 'InfosBourse',
'ListeBilans' => 'ListeBilans',
'SurveillancesFiltre' => 'SurveillancesFiltre',
'Surveillance' => 'Surveillance',
'SurveillanceSource' => 'SurveillanceSource',
'Bilan' => 'Bilan',
'BilanPoste' => 'BilanPoste',
'RechercheAnnonceCriteres' => 'RechercheAnnonceCriteres',
'AnnonceItem' => 'AnnonceItem',
'RatiosBilansInfos' => 'RatiosBilansInfos',
'RatiosInfos' => 'RatiosInfos',
'RatiosSecteur' => 'RatiosSecteur',
'Ratios' => 'Ratios',
'Rapport' => 'Rapport',
'Indiscore' => 'Indiscore',
'Scores' => 'Scores',
'IndiscoreVariables' => 'IndiscoreVariables',
'CA_Y' => 'CA_Y',
'IndiscoreImportExport' => 'IndiscoreImportExport',
'IndiscoreInfosNotations' => 'IndiscoreInfosNotations',
'IndiscorePaiement' => 'IndiscorePaiement',
'IndiscorePaiementDetail' => 'IndiscorePaiementDetail',
'IndiscoreNotesStructure' => 'IndiscoreNotesStructure',
'IndiscoreBilans' => 'IndiscoreBilans',
'AdresseDomEnt' => 'AdresseDomEnt',
'InfosIris' => 'InfosIris',
'BanquesReturn' => 'BanquesReturn',
'Banque' => 'Banque',
'ListeCompetencesReturn' => 'ListeCompetencesReturn',
'Competence' => 'Competence',
'IdentiteProcol' => 'IdentiteProcol',
'Organe' => 'Organe',
'AutreSiret' => 'AutreSiret',
'SearchRefClientReturn' => 'SearchRefClientReturn',
'SearchRefClient' => 'SearchRefClient',
'SearchRefClientInfo' => 'SearchRefClientInfo',
);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1584,7 +1584,7 @@ class Entreprise extends Scores_Ws_Server
}
$tDeb = microtime(true);
require_once 'Metier/scores/classMScores.php';
require_once 'Metier/Scores/MScores.php';
$tabRet = calculIndiScore($siren, $nic, $accesDist, $niveau, false, 'scores');
$duree = round(microtime(true)-$tDeb,3);
debugLog('W', "indiscore DUREE = $duree s", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
@ -1842,7 +1842,7 @@ class Entreprise extends Scores_Ws_Server
}
$tDeb = microtime(true);
require_once 'Metier/scores/classMScores.php';
require_once 'Metier/Scores/MScores.php';
$tabRet = calculIndiScore($siren, $nic, $accesDist, $niveau, false, 'valo');
$duree = round(microtime(true)-$tDeb,3);
debugLog('W', "indiscore DUREE = $duree s", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
@ -3531,7 +3531,7 @@ class Entreprise extends Scores_Ws_Server
$this->permission('ratios');
global $tva, $tabFormules, $mBil, $tabBilan, $efftr, $tabInfla;
$tabFormules = include APPLICATION_PATH . '/../library/Metier/scores/Data/TabFormules.php';
$tabFormules = include APPLICATION_PATH . '/../library/Metier/Scores/Data/TabFormules.php';
//Initialisation
if (empty($page)) $page = 'ratios';

View File

@ -2265,7 +2265,7 @@ class Entreprise extends Scores_Ws_Server
}
$tDeb = microtime(true);
require_once 'Metier/scores/classMScores.php';
require_once 'Metier/Scores/MScores.php';
$tabRet = calculIndiScore($siren, $nic, $accesDist, $niveau, false, 'scores');
$duree = round(microtime(true)-$tDeb,3);
debugLog('W', "indiscore DUREE = $duree s", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
@ -2506,7 +2506,7 @@ class Entreprise extends Scores_Ws_Server
}
$tDeb = microtime(true);
require_once 'Metier/scores/classMScores.php';
require_once 'Metier/Scores/MScores.php';
$tabRet = calculIndiScore($siren, $nic, $accesPartenaire, $niveau, false, 'valo');
$duree = round(microtime(true)-$tDeb,3);
debugLog('W', "indiscore DUREE = $duree s", __LINE__, __FILE__, __FUNCTION__, __CLASS__);
@ -2706,7 +2706,7 @@ class Entreprise extends Scores_Ws_Server
$output->Indiscore = $Indiscore;
//Tableau d'infos sur les formules
$tabFormules = include APPLICATION_PATH . '/../library/Metier/scores/Data/Formules.php';
$tabFormules = include APPLICATION_PATH . '/../library/Metier/Scores/Data/Formules.php';
$tabBorneMin = $tabBorneMax = array();
foreach ($tabFormules as $formule) {
$id = $formule['id']*1;
@ -2726,7 +2726,7 @@ class Entreprise extends Scores_Ws_Server
//Ratios
global $tva, $mBil, $efftr, $tabInfla;
require_once 'Metier/scores/classMRatios.php';
require_once 'Metier/Scores/MRatios.php';
$mBil = new Metier_Partenaires_MBilans($siren);
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
$nbBilans = count($tabBilans);
@ -3880,7 +3880,7 @@ class Entreprise extends Scores_Ws_Server
$survM = new Application_Model_JoScoresSurveillance();
$item = $survM->find($siren);
if ( $item === null ) {
require_once 'Metier/scores/classMScores.php';
require_once 'Metier/Scores/MScores.php';
calculIndiScore($siren, 0, false, 0);
}
}
@ -4604,7 +4604,7 @@ class Entreprise extends Scores_Ws_Server
/**
* Tableau d'infos sur les formules
*/
$tabFormules = include APPLICATION_PATH . '/../library/Metier/scores/Data/Formules.php';
$tabFormules = include APPLICATION_PATH . '/../library/Metier/Scores/Data/Formules.php';
$tabBorneMin = $tabBorneMax = array();
foreach ($tabFormules as $formule) {
$id = $formule['id']*1;
@ -4643,7 +4643,7 @@ class Entreprise extends Scores_Ws_Server
$i++;
}
}
require_once 'Metier/scores/classMRatios.php';
require_once 'Metier/Scores/MRatios.php';
$mRatios = new Metier_Scores_MRatios();
$mRatios->setTrancheEffectif($efftr);
$tabRatios = $mRatios->calcul($tabBilan);

View File

@ -13,11 +13,6 @@ return array(
'0.9' => array( 'actif' => true, 'defaut' => 'beta' ),
'0.8' => array( 'actif' => true, 'defaut' => true, 'start' => '2014-04-01' ),
'0.7' => array( 'actif' => true, 'defaut' => false, 'start' => '2012-01-01', 'end' => '2014-03-31'),
'0.6' => array( 'actif' => false, 'defaut' => false ),
'0.5' => array( 'actif' => false, 'defaut' => false ),
'0.4' => array( 'actif' => false, 'defaut' => false ),
'0.3' => array( 'actif' => false, 'defaut' => false ),
'0.2' => array( 'actif' => false, 'defaut' => false ),
),
),
'gestion' => array(
@ -70,5 +65,5 @@ return array(
),
'idClient' => array(1),
),
);

View File

@ -1,338 +0,0 @@
<?php
class WDB
{
/**
* @var Zend_Db_Adapter_Abstract
*/
protected $db = null;
/**
*
* @var unknown
*/
protected $result = null;
protected $errorCode = 0;
protected $errorMsg = '';
public function __construct( $db = null )
{
if ($db === null) {
$this->db = Zend_Db_Table::getDefaultAdapter();
}
}
/**
* INSERTION d'un tableau dans une table.
* Les index doivent avoir les mêmes noms que les champs.
* @param string Table
* @param array Valeurs insérer
* @return int Dernière valeur de l'auto-incrément, 1 si pas d'auto-incrément et 0 si erreur
*/
public function insert($table, $toAdd, $debug=false, $low_priority=false)
{
$this->errorCode = 0;
$this->errorMsg = '';
$fields = implode(array_keys($toAdd), ',');
foreach (array_values($toAdd) as $key=>$array_values)
$tmp[$key]=checkaddslashes($array_values);
$values = "'".implode(array_values($tmp), "','")."'"; # better
$values = str_replace("'NULL'", 'NULL', $values);
if ($low_priority) {
$query = 'INSERT DELAYED INTO '.$table.' ('.$fields.') VALUES ('.$values.');';
} else {
$query = 'INSERT INTO '.$table.' ('.$fields.') VALUES ('.$values.');';
}
if ($debug) $tdeb=microtime_float();
try {
$stmt = $this->db->query($query);
$res = $this->db->lastInsertId();
if ($debug) $this->trace($query, $res, $tdeb);
if ( $res == 0 ) {
return true;
}
return $res;
} catch(Zend_Db_Exception $e) {
$this->errorCode = $e->getCode();
$this->errorMsg = $e->getMessage();
$this->trace($query, $res, $tdeb);
return false;
}
return false;
}
/**
* Database Update
* @param unknown $table
* @param unknown $update
* @param unknown $where
* @param string $debug
* @param number $limit
* @param string $low_priority
* @return resource
*/
public function update($table, $update, $where, $debug=false, $limit=0, $low_priority=false)
{
$this->errorCode = 0;
$this->errorMsg = '';
if ($low_priority) {
$query='UPDATE LOW_PRIORITY '.$table.' SET ';
} else {
$query='UPDATE '.$table.' SET ';
}
$i=0;
foreach ($update as $field => $value) {
$query.= ' '.$field."=".$this->db->quote($value);
$i++;
if ($i<count($update)) {
$query.= ',';
}
}
$query = str_replace("'NULL'", 'NULL', $query);
$query.=' WHERE '.$where;
if ($limit>0) $query.=" LIMIT $limit";
if ($debug) $tdeb=microtime_float();
try {
$stmt = $this->db->query($query);
$res = $stmt->rowCount();
if ($debug) $this->trace($query, $res, $tdeb);
if ( $res == 0 ) {
return false;
}
return $res;
} catch(Zend_Db_Exception $e) {
$this->errorCode = $e->getCode();
$this->errorMsg = $e->getMessage();
$this->trace($query, $res, $tdeb);
return false;
}
return false;
}
/**
* Database delete
* @param string $table
* @param string $where
* @param string $debug
* @param string $low_priority
* @return resource
*/
public function delete($table, $where, $debug=false, $low_priority=false)
{
$this->errorCode = 0;
$this->errorMsg = '';
if ($low_priority)
$query='DELETE LOW_PRIORITY QUICK FROM '.$table.' WHERE '.$where.';';
else
$query='DELETE FROM '.$table.' WHERE '.$where.';';
if ($debug) $tdeb=microtime_float();
try {
$stmt = $this->db->query($query);
$res = $this->db->lastInsertId();
if ($debug) $this->trace($query, $res, $tdeb);
if ( $res == 0 ) {
$res = true;
}
return $res;
} catch(Zend_Db_Exception $e) {
$this->errorCode = $e->getCode();
$this->errorMsg = $e->getMessage();
$this->trace($query, $res, $tdeb);
return false;
}
return false;
}
/**
* Database select
* @param string $table
* @param string $fields
* @param string $where
* @param string $debug
* @param string $assoc
* @param string $huge
* @return boolean|multitype:multitype: |number
*/
public function select($table, $fields, $where, $debug=false, $assoc=MYSQL_BOTH, $huge=false)
{
$this->errorCode = 0;
$this->errorMsg = '';
$query="SELECT $fields FROM $table WHERE $where;";
if ($debug) $tdeb=microtime_float();
try {
$stmt = $this->db->query($query);
} catch(Zend_Db_Exception $e) {
$this->errorCode = $e->getCode();
$this->errorMsg = $e->getMessage();
$this->trace($query);
return false;
}
if ( !$huge ) {
switch($assoc) {
case MYSQL_NUM:
$mode = Zend_Db::FETCH_NUM;
break;
case MYSQL_ASSOC:
$mode = Zend_Db::FETCH_ASSOC;
break;
case MYSQL_BOTH:
$mode = Zend_Db::FETCH_BOTH;
break;
}
$tab = $stmt->fetchAll($mode);
if ($debug) $this->trace($query, sizeof($tab), $tdeb);
return $tab;
} else {
$nbRows = $stmt->rowCount();
if ($debug) $this->trace($query, $nbRows, $tdeb);
return $nbRows;
}
}
/**
*
* @param string $assoc
* @return multitype:
*/
public function fetch($assoc=MYSQL_BOTH)
{
switch($assoc) {
case MYSQL_NUM:
$mode = Zend_Db::FETCH_NUM;
break;
case MYSQL_ASSOC:
$mode = Zend_Db::FETCH_ASSOC;
break;
case MYSQL_BOTH:
$mode = Zend_Db::FETCH_BOTH;
break;
}
return $this->result->fetch($mode);
}
/**
* Trace
* @param string $query
* @param string $error
* @param int $tdeb
*/
public function trace($query, $res='', $tdeb = null)
{
if ( $tdeb === null) {
$duree = substr(''.microtime_float()-$tdeb, 0, 5);
} else {
$duree = 'N/D';
}
if ($this->errorCode == 0) {
$msg = date('Y-m-d H:i:s') ." - DEBUG - ".$this->errorCode.":".$this->errorMsg." - ".$query." - ".$duree;
} else {
$msg = date('Y-m-d H:i:s') ." - ERROR - ".$this->errorCode.":".$this->errorMsg." - ".$query." - ".$duree;
}
file_put_contents(LOG_PATH . '/mysql.log', $msg . "\n", FILE_APPEND);
}
/**
* Exécute la requête passé en paramètre
*/
public function query($query, $debug=false)
{
$this->errorCode = 0;
$this->errorMsg = '';
try {
$stmt = $this->db->query($query);
$this->result = $stmt;
} catch(Zend_Db_Exception $e) {
$this->errorCode = $e->getCode();
$this->errorMsg = $e->getMessage();
$this->trace($query);
return false;
}
return $this->result->fetchAll(Zend_Db::FETCH_ASSOC);
}
/** Retourne le libellé de la dernière erreur **/
public function getLastErrorMsg()
{
return $this->errorMsg;
}
/**
* Retourne le numéro de la dernière erreur
*/
public function getLastErrorNum()
{
return $this->errorCode;
}
/** Retourne le libellé et le numéro de la dernière erreur **/
public function getLastError()
{
return $this->errorMsg.' ('.$this->errorCode.')';
}
/** Retourne le nombre de lignes modifiées par la dernière requête **/
public function getAffectedRows()
{
return $this->result->rowCount();
}
/**
* Génère le fichier CSV pour la requete SQL
*
* @param string $query
* @param string $fileCsv
* @return bool
*/
public function exportCSV($query, $fileCsv, $sep=',', $eol=EOL)
{
$i = 0;
$fp = fopen($fileCsv, 'w');
if (!$fp) return false;
$res = $this->query($query);
$nbLignes = count($res);
for($i=0; $i<$nbLignes; $i++) {
$ligne = $res[$i];
//Header
if ($i==0) {
$nbCols = count($ligne);
$header = array();
foreach ($ligne as $libCol => $col) {
$header[] = $libCol;
}
fputcsv($fp, $header, $sep, '"');
}
//Content
$fields = array();
foreach ($ligne as $libCol => $col) {
$fields[] = $col;
}
fputcsv($fp, $fields, $sep, '"');
}
fclose($fp);
return $nbLignes;
}
}
?>

View File

@ -1,228 +0,0 @@
<?php
class WDB
{
private $host;
private $database;
private $user;
private $password;
private $con_id; // Connection ID with MySQL
private $result;
public function __construct($database='', $host='', $user='', $password='')
{
if ($host=='') $this->host=MYSQL_HOST;
else $this->host=$host;
if ($user=='') $this->user=MYSQL_USER;
else $this->user=$user;
if ($password=='') $this->password=MYSQL_PASS;
else $this->password=$password;
if ($database=='') $this->database=MYSQL_DEFAULT_DB;
else $this->database=$database;
$this->con_id = mysql_pconnect($this->host, $this->user, $this->password);
if (!($this->con_id === false)) {
if (mysql_select_db($this->database, $this->con_id) === false) {
echo date('Y/m/d - H:i:s') ." - ERREUR ".mysql_errno()." : Connection à la base de données impossible !".EOL;
echo date ('Y/m/d - H:i:s'). mysql_error();
die();
}
}
return mysql_query("SET NAMES 'utf8';", $this->con_id);
}
public function setCharSet($charSet) {
return (mysql_query("SET CHARACTER SET $charSet;", $this->con_id));
}
private function setDB() {
return (mysql_query("USE $this->database;", $this->con_id));
}
/** INSERTION d'un tableau dans une table.
** Les index doivent avoir les mêmes noms que les champs.
** @param string Table
** @param array Valeurs insérer
** @return int Dernière valeur de l'auto-incrément, 1 si pas d'auto-incrément et 0 si erreur
**/
public function insert($table, $toAdd, $debug=false, $low_priority=false)
{
$fields = implode(array_keys($toAdd), '`,`');
foreach (array_values($toAdd) as $key=>$array_values)
$tmp[$key]=checkaddslashes($array_values);
$values = "'".implode(array_values($tmp), "','")."'"; # better
$values = str_replace("'NULL'", 'NULL', $values);
if ($low_priority)
$query = 'INSERT DELAYED INTO `'.$table.'` (`'.$fields.'`) VALUES ('.$values.');';
else
$query = 'INSERT INTO `'.$table.'` (`'.$fields.'`) VALUES ('.$values.');';
if ($debug) $tdeb=microtime_float();
$res = mysql_query($query, $this->con_id);
if ($res!==false)
{
if (mysql_insert_id()>0)
$res=mysql_insert_id();
else
$res=true;
}
if ($debug) $this->trace($query, $res, $tdeb);
return $res;
}
public function update($table, $update, $where, $debug=false, $limit=0, $low_priority=false)
{
$fields = array_keys($update);
$values = array_values($update);
$i=0;
if ($low_priority)
$query='UPDATE LOW_PRIORITY `'.$table.'` SET ';
else
$query='UPDATE `'.$table.'` SET ';
while(isset($fields[$i])){
if($i>0) { $query.=', '; }
$query.=' `'.$fields[$i]."`='".checkaddslashes($values[$i])."'";
$i++;
}
$query = str_replace("'NULL'", 'NULL', $query);
$query.=' WHERE '.$where;
if ($limit>0) $query.=" LIMIT $limit";
if ($debug) $tdeb=microtime_float();
$res=mysql_query($query, $this->con_id);
if ($debug) $this->trace($query, $res, $tdeb);
return $res;
}
public function delete($table, $where, $debug=false, $low_priority=false)
{
if ($low_priority)
$query='DELETE LOW_PRIORITY QUICK FROM `'.$table.'` WHERE '.$where.' LIMIT 1;';
else
$query='DELETE FROM `'.$table.'` WHERE '.$where.' LIMIT 1;';
if ($debug) $tdeb=microtime_float();
$res=mysql_query($query, $this->con_id);
if ($debug) $this->trace($query, $res, $tdeb);
return $res;
}
public function select($table, $fields, $where, $debug=false, $assoc=MYSQL_BOTH, $huge=false) {
if (mysql_select_db($this->database, $this->con_id) === false) {
echo date('Y/m/d - H:i:s') ." - ERREUR ".mysql_errno()." : Connection à la base de données impossible !".EOL;
echo date ('Y/m/d - H:i:s'). mysql_error();
die();
}
$query="SELECT $fields FROM $table WHERE $where;";
if ($debug) $tdeb=microtime_float();
$this->result=mysql_query($query, $this->con_id);// or die(mysql_error());
if (mysql_errno()) {
$fpErr=fopen(LOG_PATH.'/sqlerror.log','a');
fwrite($fpErr, date('YmdHis'). ' - '.$query .EOL);
fwrite($fpErr, date('YmdHis'). ' - '.mysql_errno() .' - '. mysql_error().EOL);
return false;
}
// echo ;
if (!$huge) {
$tab=array();
while ($ligne = mysql_fetch_array($this->result, $assoc))
$tab[]=$ligne;
if ($debug) $this->trace($query, sizeof($tab), $tdeb);
return $tab;
} else {
$nbRows=mysql_num_rows($this->result);
if ($debug) $this->trace($query, $nbRows, $tdeb);
return $nbRows;
}
}
public function fetch($assoc=MYSQL_BOTH) {
return mysql_fetch_array($this->result, $assoc);
}
public function trace($query, $res='', $tdeb=-1) {
if (!$fp=fopen(LOG_PATH.'/mysql_insert.log', 'a'))
return false;
$errnum=mysql_errno($this->con_id);
if ($tdeb>-1) $duree=substr(''.microtime_float()-$tdeb, 0, 5);
else $duree='N/D';
if (!fwrite($fp, date('Y/m/d - H:i:s') ." - $errnum - $res - $duree - $query\n"))
return false;
if (!fclose($fp))
return false;
return true;
}
/** Exécute la requête passé en paramètre **/
public function query($query, $debug=false)
{
$this->result=mysql_query($query, $this->con_id);
return $this->result;
}
/** Retourne le nombre de records de la dernière requête de sélection **
public function getNumRows() {
return mysql_num_rows($this->con_id);
}
*/
/** Retourne le libellé de la dernière erreur **/
public function getLastErrorMsg() {
return mysql_error($this->con_id);
}
/** Retourne le numéro de la dernière erreur **/
public function getLastErrorNum()
{
return mysql_errno($this->con_id);
}
/** Retourne le libellé et le numéro de la dernière erreur **/
public function getLastError()
{
return mysql_error($this->con_id).' ('.mysql_errno($this->con_id).')';
}
/** Retourne le nombre de lignes modifiées par la dernière requête **/
public function getAffectedRows()
{
return mysql_affected_rows($this->con_id);
}
/** Génère le fichier CSV pour la requete SQL
**
** @param string $query
** @param string $fileCsv
** @return bool
*/
public function exportCSV($query, $fileCsv, $sep=',', $eol=EOL) {
$i=$c=0;
$fp = fopen($fileCsv, 'w');
if (!$fp) return false;
$res=$this->query($query);
$nbLignes=mysql_num_rows($res);
while ($ligne=$this->fetch(MYSQL_ASSOC)) {
if ($i==0) {
$nbCols=count($ligne);
foreach ($ligne as $libCol=>$col) {
$c++;
if ($c<$nbCols) fwrite($fp, str_replace($sep,' ', $libCol).$sep);
else fwrite($fp, str_replace($sep,' ', $libCol));
}
fwrite($fp, $eol);
}
$c=0;
foreach ($ligne as $libCol=>$col) {
$c++;
if ($c<$nbCols) fwrite($fp, str_replace($sep,' ', $col).$sep);
else fwrite($fp, str_replace($sep,' ', $col));
}
fwrite($fp, $eol);
$i++;
}
fclose($fp);
return $nbLignes;//$this->getAffectedRows();
}
}
?>

View File

@ -1,7 +1,7 @@
<?php
require_once 'framework/common/mysql.php';
require_once 'framework/common/strings.php';
//include_once(FWK_PATH.'common/dates.php');
require_once 'framework/common/dates.php';
define ('REP_TEMP', LOG_PATH);
// Environnement : DEV ou PRD

View File

@ -70,7 +70,7 @@ if( $opts->generate == 'Tribunaux' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/bodacc/Cache' . DIRECTORY_SEPARATOR . 'Tribunaux.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Bodacc/Cache' . DIRECTORY_SEPARATOR . 'Tribunaux.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -100,7 +100,7 @@ if ( $opts->generate == 'FctDir' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/bodacc/Cache' . DIRECTORY_SEPARATOR . 'FctDir.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Bodacc/Cache' . DIRECTORY_SEPARATOR . 'FctDir.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -126,7 +126,7 @@ if ( $opts->generate == 'Evenements' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/bodacc/Cache' . DIRECTORY_SEPARATOR . 'Evenements.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Bodacc/Cache' . DIRECTORY_SEPARATOR . 'Evenements.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -160,7 +160,7 @@ if ( $opts->generate == 'Devises' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/bodacc/Cache' . DIRECTORY_SEPARATOR . 'Devises.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Bodacc/Cache' . DIRECTORY_SEPARATOR . 'Devises.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -186,7 +186,7 @@ if ( $opts->generate == 'RncsTribunaux' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/partenaires/Cache' . DIRECTORY_SEPARATOR . 'Tribunaux.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Partenaires/Cache' . DIRECTORY_SEPARATOR . 'Tribunaux.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -214,7 +214,7 @@ if ( $opts->generate == 'DevisesInpi' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/partenaires/Cache' . DIRECTORY_SEPARATOR . 'DevisesInpi.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Partenaires/Cache' . DIRECTORY_SEPARATOR . 'DevisesInpi.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -240,7 +240,7 @@ if ( $opts->generate == 'Jugements' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/partenaires/Cache' . DIRECTORY_SEPARATOR . 'Jugements.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Partenaires/Cache' . DIRECTORY_SEPARATOR . 'Jugements.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -266,7 +266,7 @@ if ( $opts->generate == 'PaysInpi' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/partenaires/Cache' . DIRECTORY_SEPARATOR . 'PaysInpi.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Partenaires/Cache' . DIRECTORY_SEPARATOR . 'PaysInpi.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -288,7 +288,7 @@ if ( $opts->generate == 'CodesNaf' ) {
$c = new Zend_Config($application->getOptions());
$db = Zend_Db::factory($c->profil->db->metier);
$fp=fopen(APPLICATION_PATH . '/../library/Metier/insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNaf.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNaf.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -330,7 +330,7 @@ if ( $opts->generate == 'CodesNace' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNace.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNace.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -356,7 +356,7 @@ if ( $opts->generate == 'CodesNafa' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNafa.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Insee/Cache' . DIRECTORY_SEPARATOR . 'CodesNafa.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");
@ -382,7 +382,7 @@ if ( $opts->generate == 'CodesFJ' ) {
$result->setFetchMode(Zend_Db::FETCH_OBJ);
$rows = $result->fetchAll();
$fp=fopen(APPLICATION_PATH . '/../library/Metier/insee/Cache' . DIRECTORY_SEPARATOR . 'CodesFJ.php','w');
$fp=fopen(APPLICATION_PATH . '/../library/Metier/Insee/Cache' . DIRECTORY_SEPARATOR . 'CodesFJ.php','w');
fwrite($fp, "<?php\n");
fwrite($fp, "return array(\n");

View File

@ -96,7 +96,7 @@ if ( $opts->tabcache) {
$c = new Zend_Config($application->getOptions());
$db = Zend_Db::factory($c->profil->db->metier);
$pathCache = APPLICATION_PATH . '/../library/Metier/scores/Data';
$pathCache = APPLICATION_PATH . '/../library/Metier/Scores/Data';
//Variables
$fp=fopen($pathCache . DIRECTORY_SEPARATOR . 'Variables.php','w');
@ -368,12 +368,12 @@ function genereCacheRatios()
$tabMoy = array();
$iDb = new WDB();
$configFile = APPLICATION_PATH.'/../library/Metier/scores/classMRatios.php';
$configFile = APPLICATION_PATH.'/../library/Metier/Scores/MRatios.php';
$fp=fopen($configFile, 'w');
fwrite($fp, '<?php'."\n");
fwrite($fp, "/** Auto generated class ".date('Y-m-d H:i:s')."*/" . "\n");
fwrite($fp, "class MRatios
fwrite($fp, "class Metier_Scores_MRatios
{
public \$efftr = null;
@ -813,13 +813,13 @@ function generateFormule($version, $type = 'score')
// Select the right table in database in function of type
switch ($type) {
case 'score':
$file = APPLICATION_PATH.'/../library/Metier/scores/Formule/Score_'.$version.'.php';
$file = APPLICATION_PATH.'/../library/Metier/Scores/Formule/Score_'.$version.'.php';
$tableFormu = 'jo.scores_formules_'.$version;
$tableComment = 'jo.scores_commentaires_'.$version;
break;
case 'valo':
$file = APPLICATION_PATH.'/../library/Metier/scores/Formule/Valo_'.$version.'.php';
$file = APPLICATION_PATH.'/../library/Metier/Scores/Formule/Valo_'.$version.'.php';
$tableFormu = 'jo.valo_formules_'.$version;
$tableComment = 'jo.valo_commentaires_'.$version;
break;
@ -1136,7 +1136,7 @@ function generateComment($version, $type = 'score', $cycle = 2)
$tableComment = 'jo.valo_commentaires_'.$version;
break;
}
$path = APPLICATION_PATH.'/../library/Metier/scores/Comment';
$path = APPLICATION_PATH.'/../library/Metier/Scores/Comment';
// Read comments text
$tabTmp = $iDb->select(

View File

@ -290,7 +290,7 @@ else
echo "\n***********************************************\n";
}
$pathCache = APPLICATION_PATH . '/../library/Metier/scores/Variables';
$pathCache = APPLICATION_PATH . '/../library/Metier/Scores/Variables';
$copy_fic = $nomfichier;
if($nomfichier) // Si le nom du fichier comprend 'scores' ou 'valo'...

View File

@ -73,7 +73,6 @@ for ($i=1; isset($argv[$i]); $i++) {
$iInsee = new Metier_Insee_MInsee($db);
if ($updateCache) {
include_once 'Metier/scores/classMRatios.php';
if (genereCacheRatios())
echo date('Y/m/d - H:i:s') ." - Le cache des ratios a été généré avec succès !".EOL;
else