suppression fichiers obsoletes
This commit is contained in:
parent
7b5b8e7528
commit
53c1ae9e0c
@ -1,388 +0,0 @@
|
||||
<?php
|
||||
require_once 'framework/common/curl.php';
|
||||
|
||||
class Metier_Partenaires_MCoface
|
||||
{
|
||||
public $body = '';
|
||||
public $header = '';
|
||||
public $codeRetour = 0;
|
||||
|
||||
public $nscrl = 0; // Numéro interne SCRL
|
||||
public $rcsVille='';
|
||||
public $rcsType='';
|
||||
|
||||
public $rSocAdrCPVille=''; // RaisonSocialeAdresseVille (utile pour le débug)
|
||||
public $raisonSociale=''; // Raison Sociale
|
||||
public $adresse=''; // Adresse complète (avec CP et Cille)
|
||||
|
||||
public $sigle='';
|
||||
public $enseigne='';
|
||||
public $nbEtab='';
|
||||
|
||||
public $adrNumVoie;
|
||||
public $adrIndRep;
|
||||
public $adrTypeVoie;
|
||||
public $adrLibVoie;
|
||||
public $adrCP;
|
||||
public $adrVille;
|
||||
|
||||
public $tel='';
|
||||
public $fax='';
|
||||
public $web='';
|
||||
public $mail='';
|
||||
public $activite=''; // Activité Déclarée au bodacc
|
||||
public $naf=''; // NAF
|
||||
public $nafLib='';
|
||||
|
||||
public $bourseIsin='';
|
||||
public $bourseMarche='';
|
||||
public $bourseVille='';
|
||||
|
||||
public $tabInfos=array();
|
||||
public $tabBilans=array();
|
||||
|
||||
public $infoEco=false;
|
||||
public $capitalType='';
|
||||
public $capitalMontant='';
|
||||
public $capitalDevise ='';
|
||||
public $steInactive = '';
|
||||
public $dateCreation=''; // Notion INSEE
|
||||
public $dateImmatriculation=''; // Notion Greffe et RNCS uniquement
|
||||
public $fj='';
|
||||
public $nationalite='';
|
||||
public $enBourse='';
|
||||
public $effectif='';
|
||||
public $tabDirigeants=array();
|
||||
public $strLiensFi='';
|
||||
public $strElemsFi='';
|
||||
|
||||
public $derExerciceAnnee='';
|
||||
public $derExerciceDuree='';
|
||||
public $derExerciceDClot='';
|
||||
public $derExerciceCA='';
|
||||
public $derExerciceResultat='';
|
||||
public $derExerciceDevise='';
|
||||
|
||||
public $dateFermeture='';
|
||||
public $score_pouey='';
|
||||
public $score_conan='';
|
||||
public $score_afdcc='';
|
||||
public $vigilance='';
|
||||
public $tabJug=array();
|
||||
public $tabAct=array();
|
||||
public $tabFil=array();
|
||||
public $tabEtab=array();
|
||||
|
||||
function __construct($siren)
|
||||
{
|
||||
$referer='';
|
||||
$url='http://www.cofacerating.fr/portail/entreprise_identite/identite.asp?ip=pagespro&lg=fr&nsiren='.$siren;
|
||||
$page=getUrl($url, '', '', $referer, false, 'www.cofacerating.fr', '', 10);
|
||||
$this->body=$page['body'];
|
||||
$this->codeRetour=$page['code'];
|
||||
$this->header=$page['header'];
|
||||
$this->nscrl=@getTextInHtml($this->body, '&nscrl=', '=','&');
|
||||
$this->rSocAdrCPVille=trim(str_replace(chr(160), ' ', html_entity_decode(utf8_encode(@getTextInHtml($this->body, '<td WIDTH="40%" bgcolor="#F3E5CC" class="tabligne"> <b> Raison sociale<br>', '<td WIDTH="60%" bgcolor="#FFF3DE" class="tabval"><b>','</tr>')))));
|
||||
$tmp=explode('<br>', $this->rSocAdrCPVille);
|
||||
$this->raisonSociale=trim($tmp[0]);
|
||||
unset($tmp[0]);
|
||||
$this->adresse=trim(strip_tags(implode(',', $tmp)));
|
||||
$this->tel=trim(@getTextInHtml($this->body, '<td bgcolor="#F3E5CC" class="tabligne"><b>Téléphone<br>', '<td bgcolor="#FFF3DE" class="tabval" valign="top">', '<br>'));
|
||||
$this->fax=trim(@getTextInHtml($this->body, 'Télécopie</b></td>', '<br>', '</td>'));
|
||||
$this->web=trim(@getTextInHtml($this->body, '<td bgcolor="#F3E5CC" class="tabligne"><b>Adresse internet <br>', ' class="tabval"><a class="tabval" HREF="', '" target="_new">'));
|
||||
$this->mail=trim(@getTextInHtml($this->body, '<a class="tabval" href="mailto:', ':', '">'));
|
||||
|
||||
$bourse=trim(@getTextInHtml($this->body, 'Ville Bourse</b></td>', 'class="tabval">', '</td>'));
|
||||
$tmp=explode('<br>', $bourse);
|
||||
$this->bourseIsin=trim($tmp[0]);
|
||||
$this->bourseMarche=trim($tmp[1]);
|
||||
$this->bourseVille=trim($tmp[2]);
|
||||
|
||||
$infosDispo=trim(@getTextInHtml($this->body, '<b>Liste Produits</b><br></td>', '<br></td><td class="menu3"><img src="../images/vide.gif" border="0"><br></td><td colspan="2" class="menu3">', 'Un secteur ou une région en France</a><br></td>'));
|
||||
$tabTmp=explode('<a href="', $infosDispo);
|
||||
foreach ($tabTmp as $k=>$lien) {
|
||||
preg_match('/^(.*)">(.*)<\/a>/i', $lien, $matches);
|
||||
if ($matches[2]<>'') $this->tabInfos[$matches[2]]=$matches[1];
|
||||
if (substr($matches[2], 0, 12)=='rapport éco.') $this->infoEco='http://www.cofacerating.fr/portail/entreprise_identite/'.$matches[1];//ip=pagespro&
|
||||
elseif (substr($matches[2], 0, 6)=='bilan ') $this->tabBilans[]=substr($matches[2], 6,strlen($matches[2])-6);
|
||||
}
|
||||
$this->activite=trim(str_replace(chr(160), ' ', html_entity_decode(utf8_encode(@getTextInHtml($this->body, '<td WIDTH="40%" bgcolor="#F3E5CC" class="tabligne" valign="top"><b>Libellé code activité </b></td>', '<td WIDTH="60%" bgcolor="#FFF3DE" class="tabval">', '</td>')))));
|
||||
$this->naf=trim(@getTextInHtml($this->body, '<a href="../chaineeco_dynaeco/DynaEco.asp?cnaf=', 'cnaf=', '&'));
|
||||
|
||||
/**
|
||||
** Recherche du NIC sur Société .com
|
||||
**/
|
||||
|
||||
/*
|
||||
$refererS='http://www.societe.com/';
|
||||
$urlS='http://www.societe.com/cgi-bin/recherche?rncs='.$siren.'&vu=1';
|
||||
$page=getUrl($urlS, '', '', $refererS, false, 'www.societe.com');
|
||||
$ste=$page['body'];
|
||||
$this->nic=trim(@getTextInHtml($ste, 'SIRET</div><div class="ficheAltCol2 size11">', $siren, '</div>'));
|
||||
|
||||
$strTmp=trim(@getTextInHtml($ste, '<b><span class="size10">RCS', 'RCS ', ' '.substr($siren,0,3)));
|
||||
$tabTmp=explode(' ', $strTmp);
|
||||
$this->rcsVille=$tabTmp[0];//<td class="txtBlanc" align="left"><b><span class="size10">RCS Paris B 552 144 503<br></span></b></td>
|
||||
$this->rcsType=$tabTmp[1];
|
||||
|
||||
$strTmp=trim(@getTextInHtml($ste, '<div class="ficheAltCol1 size11">Code activité</div>', '<div class="ficheAltCol2 size11">', '</div>'));
|
||||
$tabTmp=explode(' - ', $strTmp);
|
||||
$this->naf=$tabTmp[0];
|
||||
$this->nafLib=$tabTmp[1];
|
||||
|
||||
// <div class="ficheAltCol1 size11">Siège social</div><div class="ficheAltCol2 size11">75 Avenue la Grande Armee - 75116 PARIS 16</div>
|
||||
|
||||
$strTmp=trim(@getTextInHtml($ste, '<div class="ficheAltCol1 size11">Capital social', '<div class="ficheAltCol2 size11">', '</div>'));
|
||||
$this->capitalType='social';
|
||||
$tabTmp=explode(' ', $strTmp);
|
||||
$this->capitalMontant=str_replace(',', '.', str_replace('.', '', $tabTmp[0]));
|
||||
$this->capitalDevise =$tabTmp[1];
|
||||
|
||||
$this->fj=trim(@getTextInHtml($ste, '<div class="ficheAltCol1 size11">Forme juridique', '<div class="ficheAltCol2 size11">', '</div>'));
|
||||
$this->nationalite=trim(@getTextInHtml($ste, '<div class="ficheAltCol1 size11">Nationalité</div>', '<div class="ficheAltCol2 size11">', '</div>'));
|
||||
|
||||
$strTmp=trim(@getTextInHtml($ste, ' DIRIGEANT(S) </span></span></div>', '<div class="ficheCadre" style="min-height:85px;">', '<div class="spacer"></div>'));
|
||||
$tabTmp=explode('<div class="h1bleu2"></div>', $strTmp);
|
||||
foreach ($tabTmp as $k=>$dir) {
|
||||
if (trim($dir)=='') break;
|
||||
$tabTmp1=explode('</div><div class="ficheAltCol2 size11">', $dir);
|
||||
$tabTmp2=explode('représenté par', $tabTmp1[1]);
|
||||
if (isset($tabTmp2[1]) && $tabTmp2[1]<>'') {
|
||||
$soc=trim($tabTmp2[0]);
|
||||
$diri=trim($tabTmp2[1]);
|
||||
} else {
|
||||
$soc='';
|
||||
$diri=trim($tabTmp1[1]);
|
||||
}
|
||||
preg_match("/^(Mme|M\.|Mlle|Mle|M) ([A-Z\s]*) ([A-Z][a-z\s]*)/", $diri, $matches);
|
||||
//print_r($matches);
|
||||
$this->tabDirigeants[]=array('FONCTION'=>trim(strip_tags($tabTmp1[0])), 'SOCIETE'=>$soc, 'GENRE'=>$matches[1], 'PRENOM'=>trim($matches[3]), 'NOM'=>trim($matches[2]));
|
||||
}
|
||||
|
||||
$this->dateImmatriculation=trim(@getTextInHtml($ste, '<div class="ficheAltCol1 size11"> Immatriculation', '<div class="ficheAltCol2 size11">', '</div>'));
|
||||
//06-03-2007</div>
|
||||
/* Date Creation = ""
|
||||
En bourse = ""
|
||||
Effectif societe = ""
|
||||
Dirigeants :
|
||||
**/
|
||||
$urlRacine='http://infobilan.decideur.com/';
|
||||
$tabPost=array( 'choix'=>'1',
|
||||
'pagePrecedente'=>'recherche_entreprise.html',
|
||||
'nomsocRech'=>'',
|
||||
'cpRech'=>'',
|
||||
'villeRech'=>'',
|
||||
'nomdirRech'=>'',
|
||||
'predirRech'=>'',
|
||||
'sirenRech'=>$siren,
|
||||
'telRech'=>'',);
|
||||
// 'Rechercher'=>'',
|
||||
$url=$urlRacine.'liste_result.html';
|
||||
$referer=$urlRacine.'recherche_entreprise.html';
|
||||
$page=getUrl($url,'', $tabPost, $referer, false, 'infobilan.decideur.com');
|
||||
$this->body=$page['body'];
|
||||
$strCookie=$page['header']['Set-Cookie'];
|
||||
$refererInfoD=$url;
|
||||
|
||||
if(preg_match_all('/<a href="choix_pdt\.html\?(.*)" class="tt1">(.*)<\/a><\/span><br>/i', $page['body'], $matches))
|
||||
$urlInfoD=$urlRacine.'choix_pdt.html?'.$matches[1][0];
|
||||
else
|
||||
$urlInfoD='';
|
||||
|
||||
$page=getUrl($this->infoEco, '', '', $url, false, 'www.cofacerating.fr');
|
||||
if (strpos($page['body'], '<b>Choix du mode de paiement</b>')===false) { // Le rapport éco. est cadeau !!!
|
||||
$this->infoEco=true;
|
||||
$eco=$page['body'];
|
||||
//die ($eco);
|
||||
$strTmp=strip_tags(@getTextInHtml($eco, ' class="tabligne" > Capital   (', '(', '</tr><tr>'));
|
||||
$tabTmp=explode(')', $strTmp);
|
||||
$this->capitalType=$tabTmp[0];
|
||||
$tabTmp=explode(' ', $tabTmp[1]);
|
||||
$this->capitalMontant=trim(str_replace(chr(160), '', $tabTmp[0]));
|
||||
$this->capitalDevise =trim(str_replace(chr(160), '', $tabTmp[1]));
|
||||
|
||||
$this->steInactive=trim(@getTextInHtml($eco, ' class="tabligne" > Société inactive</td>', 'class="tabval" >', '</td>'));
|
||||
|
||||
$this->dateCreation=trim(@getTextInHtml($eco, ' class="tabligne" > Date de création</td>', 'class="tabval" >', '</td>'));
|
||||
$this->fj=trim(@getTextInHtml($eco, ' class="tabligne" > Forme juridique</td>', 'class="tabval" >', '</td>'));
|
||||
$this->effectif=trim(@getTextInHtml($eco, ' class="tabligne" > Effectif', 'class="tabval" >', '</td>'));
|
||||
|
||||
if (count($this->tabDirigeants)==0) { // Si il y a déjà des dirigeants on garde ceux de Société.com !!!
|
||||
$strTmp=trim(@getTextInHtml($eco, ' class="tabligne" > Cotation en bourse</td>', '<td bgcolor="#F3E5CC" class="tabligne" >', '<td bgcolor="#F3E5CC" class="tabligne" > Effectif'));
|
||||
$tabTmp=explode('<td bgcolor="#F3E5CC" class="tabligne" >', $strTmp);
|
||||
foreach ($tabTmp as $k=>$dir) {
|
||||
$tabTmp1=explode('<td bgcolor="#FFF3DE" class="tabval" >', $dir);
|
||||
$tabTmp2=explode(' ', trim(strip_tags($tabTmp1[1])));
|
||||
$this->tabDirigeants[]=array('FONCTION'=>trim(strip_tags($tabTmp1[0])), 'GENRE'=>trim($tabTmp2[0]), 'PRENOM'=>trim($tabTmp2[1]), 'NOM'=>trim($tabTmp2[2]));
|
||||
}
|
||||
}
|
||||
|
||||
$this->strLiensFi=trim(strip_tags(@getTextInHtml($eco, '<td class="tabtot">LIENS FINANCIERS</td>', '<tr>', '</td></tr>')));
|
||||
$this->strElemsFi=trim(strip_tags(@getTextInHtml($eco, '<td class="tabtot">ELEMENTS FINANCIERS</td>', '<tr>', '</td></tr>')));
|
||||
}
|
||||
|
||||
$refererP='http://www.score3.fr/';
|
||||
$urlP='http://www.score3.fr/entreprise.shtml?siren='.$siren;
|
||||
$page=getUrl($urlP, '', '', $refererP, false, 'www.score3.fr');
|
||||
$pou=$page['body'];
|
||||
$fp=fopen('./pouet.html', 'w');
|
||||
fwrite($fp, $pou);
|
||||
fclose($fp);
|
||||
|
||||
if ($urlInfoD<>'') {
|
||||
$page=getUrl($urlInfoD,$strCookie,'', $refererInfoD, false, 'infobilan.decideur.com');
|
||||
$referer=$urlInfoD;
|
||||
if ($this->nscrl==0) $this->nscrl=@getTextInHtml($url, 'nscrlP=', '=','&');
|
||||
|
||||
$url=$urlRacine.'fiche_ident.html';
|
||||
$page=getUrl($url,$strCookie,'', $referer, false, 'infobilan.decideur.com');
|
||||
$this->body=$page['body'];
|
||||
|
||||
if ($this->raisonSociale=='')
|
||||
$this->raisonSociale=trim(@getTextInHtml($this->body, '<span class="libelle2">Société', ' :', '</span>'));
|
||||
|
||||
if ($this->adresse=='')
|
||||
$this->adresse=trim(@getTextInHtml($this->body, '<span class="libelle2">Adresse</span> <strong>:', '</strong>', '</td>'));
|
||||
|
||||
if ($this->tel=='')
|
||||
$this->tel=trim(@getTextInHtml($this->body, '<td valign="top"><span class="libelle2">Tél', '</span>', '<br>'));
|
||||
if ($this->fax=='')
|
||||
$this->fax=trim(@getTextInHtml($this->body, '<span class="libelle2">Fax</span>', ' :', '<br>'));
|
||||
if ($this->web=='')
|
||||
$this->web=trim(@getTextInHtml($this->body, '<span class="libelle2">Site Web</span>', '<a href="', '" target="_blank">'));
|
||||
if ($this->mail=='')
|
||||
$this->mail=trim(@getTextInHtml($this->body, '<span class="libelle2">E-mail</span>', '<a href="mailto:', '">'));
|
||||
if ($this->naf=='')
|
||||
$this->naf=trim(@getTextInHtml($this->body, '<span class="libelle2">Code NAF</span>', ' :', '</td>'));
|
||||
|
||||
if(preg_match('/<td valign="top"><span class="libelle2">Capital social<\/span> : (\d*)(.*)<br>/isU', $this->body, $matches)
|
||||
&& ($this->capitalMontant=='' || $this->capitalDevise=='')) {
|
||||
$this->capitalMontant=trim($matches[1]);
|
||||
$this->capitalDevise=trim($matches[2]);
|
||||
}
|
||||
|
||||
if ($this->fj=='')
|
||||
$this->fj=trim(@getTextInHtml($this->body, '<span class="libelle2">Forme juridique</span>', ' :', '<br>'));
|
||||
if ($this->nationalite=='')
|
||||
$this->nationalite=trim(@getTextInHtml($this->body, '<span class="libelle2">Nationalité</span>', ' :', '</td>'));
|
||||
if ($this->effectif=='')
|
||||
$this->effectif=trim(@getTextInHtml($this->body, '<td valign="top"><span class="libelle2">Effectif</span>', ' :', '<br>'));
|
||||
if ($this->activite=='')
|
||||
$this->activite=trim(@getTextInHtml($this->body, '<span class="libelle2">Activité</span>', ' :', '<br>'));
|
||||
|
||||
/** Actionnaires **/
|
||||
$strTmp=trim(@getTextInHtml($this->body, 'ACTIONNAIRES<br>', '</div></h1>', '<h1>'));
|
||||
if(preg_match_all('/<p><span class="libelle2">(.*)<\/span> - <span class="libelle2">Participation<\/span> : (.*) %<br>(.*)<\/p>/isU', $strTmp, $matches)) {
|
||||
foreach ($matches[1] as $i=>$nom) {
|
||||
$this->tabAct[$i]['nom']=trim($nom);
|
||||
$this->tabAct[$i]['pct']=trim($matches[2][$i]);
|
||||
$this->tabAct[$i]['rcs']=trim(str_replace('RCS : ','',strip_tags($matches[3][$i])));
|
||||
}
|
||||
}
|
||||
|
||||
/** Filiales **/
|
||||
$strTmp=trim(@getTextInHtml($this->body, 'FILIALES<br>', '</div></h1>', '<h1>'));
|
||||
if(preg_match_all('/<p><span class="libelle2">(.*)<\/span> - <span class="libelle2">Participation<\/span> :(.*)%<br>(.*)<\/p>/isU', $strTmp, $matches)) {
|
||||
foreach ($matches[1] as $i=>$nom) {
|
||||
$this->tabFil[$i]['nom']=trim($nom);
|
||||
$this->tabFil[$i]['pct']=trim($matches[2][$i]);
|
||||
$this->tabFil[$i]['rcs']=trim(str_replace('RCS :','',strip_tags($matches[3][$i])));
|
||||
}
|
||||
}
|
||||
|
||||
/** CA et Résultat **/
|
||||
$strTmp=trim(@getTextInHtml($this->body, '<h1>PRINCIPAUX ELEMENTS FINANCIERS<br>', '</div></h1>', '</p>'));
|
||||
if(preg_match('/<p><span class="libelle2">CA (.*)<\/span>(.*)<br>/isU', $strTmp, $matches)) {
|
||||
$this->derExerciceAnnee=trim($matches[1]);
|
||||
$this->derExerciceCA=trim(str_replace(':',' ', $matches[2]));
|
||||
}
|
||||
if(preg_match('/<span class="libelle2">Résultat(.*)<\/span>(.*)$/isU', $strTmp, $matches)) {
|
||||
$this->derExerciceResultat=trim(str_replace(':',' ', $matches[2]));
|
||||
}
|
||||
|
||||
$infoBilan=print_r($page, true);
|
||||
$fp=fopen('./infobilan.html', 'w');
|
||||
fwrite($fp, $infoBilan);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
if ($this->nbEtab=='' || $this->nbEtab=='0') {
|
||||
$this->nbEtab=trim(strip_tags(str_replace('afficher la liste...', '', @getTextInHtml($pou, '<tr><td class="ligne1_2">Etablissements </td>', '<td class="ligne2_2">', '</td></tr>'))));
|
||||
$urlPEtab='http://www.score3.fr/etablissements.shtml?page=1&siren='.$siren;
|
||||
$refererPEtab=$urlP;
|
||||
$page=getUrl($urlPEtab, '', '', $refererPEtab, false, 'www.score3.fr');
|
||||
$pou2=$page['body'];
|
||||
if(preg_match_all('/<tr bgcolor="(?:\S*)"><td class="ligne1b" align="center" width="10%">(\d*)<\/td><td class="ligne2" height="50"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td class="infos">(.*)<\/td><\/tr><\/table>/isU', $pou2, $matches)) {
|
||||
foreach ($matches[1] as $i=>$nic) {
|
||||
$strEtab=$matches[2][$i];
|
||||
$this->tabEtab[$i]['siren']=$siren;
|
||||
$this->tabEtab[$i]['nic']=$nic;
|
||||
$this->tabEtab[$i]['siret']=$siren.$nic;
|
||||
|
||||
$this->tabEtab[$i]['enseigne']=trim(str_replace(chr(160),' ',utf8_decode(strip_tags(@getTextInHtml($strEtab, '<span class="titre3">', '">', '</span>')))));
|
||||
$this->tabEtab[$i]['adresse']=trim(str_replace(chr(160),' ',utf8_decode(strip_tags(@getTextInHtml($strEtab, '<span class="infos">', '">', '<br>')))));
|
||||
$strTmp=trim(str_replace(chr(160),' ',utf8_decode(strip_tags(@getTextInHtml($strEtab, '<span class="infos">', '<br>', '</span>')))));
|
||||
$tabTmp=explode(' ', $strTmp);
|
||||
$this->tabEtab[$i]['cp']=$tabTmp[0];
|
||||
unset($tabTmp[0]);
|
||||
$this->tabEtab[$i]['ville']=implode(' ',$tabTmp);
|
||||
$strTmp=trim(strip_tags(@getTextInHtml($strEtab, '<td class="infos" align="right" valign="top">', '">', ')')));
|
||||
$tabTmp=explode('(', $strTmp);
|
||||
$this->tabEtab[$i]['naf_code']=$tabTmp[1];
|
||||
$this->tabEtab[$i]['naf_lib']=trim(str_replace(chr(160),' ',utf8_decode($tabTmp[0])));
|
||||
if (preg_match('/<br>T.l\.(.*)$/i',$strEtab,$matches2))
|
||||
$this->tabEtab[$i]['tel']=trim(str_replace(chr(160),' ',utf8_decode($matches2[1])));
|
||||
else $this->tabEtab[$i]['tel']='';
|
||||
}
|
||||
}
|
||||
$this->nbEtab=count($this->tabEtab);
|
||||
$fp=fopen('./pouet_etab.html', 'w');
|
||||
fwrite($fp, $pou2);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
if ($this->effectif=='' || $this->effectif=='0' || $this->effectif=='NC')
|
||||
$this->effectif=trim(@getTextInHtml($pou, '<tr><td class="ligne1_2">Effectifs</td>', '<td class="ligne2_2">', '</td></tr>'));
|
||||
|
||||
if ($this->dateImmatriculation=='' || $this->dateImmatriculation=='0')
|
||||
$this->dateImmatriculation=trim(@getTextInHtml($pou, '<tr><td class="ligne1_2">Date d\'immatriculation</td>', '<td class="ligne2_2">', '</td></tr>'));
|
||||
if ($this->dateFermeture=='' || $this->dateFermeture=='0')
|
||||
$this->dateFermeture=trim(@getTextInHtml($pou, '<tr><td class="ligne1_2">Date de fin d\'exploitation</td>', '<td class="ligne2_2">', '</td></tr>'));
|
||||
|
||||
if ($this->tel=='' || $this->tel=='0')
|
||||
$this->tel=trim(@getTextInHtml($pou, '<tr><td class="ligne1_2">Téléphone</td>', '<td class="ligne2_2">', '</td></tr>'));
|
||||
|
||||
if ($this->fax=='' || $this->fax=='0')
|
||||
$this->fax=trim(@getTextInHtml($pou, '<tr><td class="ligne1_2">Fax</td>', '<td class="ligne2_2">', '</td></tr>'));
|
||||
|
||||
$strTmp=trim(@getTextInHtml($pou, 'Procédures collectives</td></tr>', '</table></td>', '</td><td background'));
|
||||
if(preg_match_all('/<tr><td class="ligne1_2">(.*)<\/td><td class="ligne2_2">(.*)<\/td><\/tr>/isU', $strTmp, $matches)) {
|
||||
foreach ($matches[1] as $i=>$jug) {
|
||||
$this->tabJug[$i]['date']=$matches[1][$i];
|
||||
$this->tabJug[$i]['juge']=$matches[2][$i];
|
||||
}
|
||||
}
|
||||
|
||||
$this->score_pouey=trim(@getTextInHtml($pou, '<param name="movie" value="cadran.swf?rotation=', '&type=pouey&valeur=', '">'));
|
||||
$this->score_conan=trim(@getTextInHtml($pou, '<param name="movie" value="cadran.swf?rotation=', '&type=ch&valeur=', '">'));
|
||||
$this->score_afdcc=trim(@getTextInHtml($pou, '<param name="movie" value="cadran.swf?rotation=', '&type=afdcc&valeur=', '">'));
|
||||
$this->vigilance =trim(@getTextInHtml($pou, '<param name="movie" value="vigilance.swf', 'degre=', '">'));
|
||||
|
||||
if(preg_match('/Date de l\'exercice<\/td><td class="ligne2_2">(.*) sur (\d*) mois<\/td><\/tr>/isU', $pou, $matches)) {
|
||||
$this->derExerciceDClot=trim($matches[1]);
|
||||
$this->derExerciceDuree=trim($matches[2]);
|
||||
}
|
||||
|
||||
/* Siret SIEGE
|
||||
2 Fonction, Nom Prénoù ET Date NAissance du PP
|
||||
5 Liste des actes
|
||||
*/
|
||||
if ($this->codeRetour==200)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -1,244 +0,0 @@
|
||||
<?php
|
||||
class Metier_Partenaires_MFedaso {
|
||||
|
||||
private $tabCodeRetour=array(0 => 'Traitement OK',
|
||||
100 => 'Document illisible',
|
||||
101 => 'Document partiellement lisible',
|
||||
102 => 'Document inattendu',
|
||||
103 => 'Page blanche',
|
||||
104 => 'Fichier absent',
|
||||
105 => 'page partiellement scannée',
|
||||
106 => 'Document complémentaire concernant une autre société',
|
||||
107 => 'Page(s) manquante(s)',//NEW
|
||||
108 => 'Document(s) non Francophone',
|
||||
200 => 'Aucune information dirigeants',
|
||||
210 => 'Aucune information actionnaire',
|
||||
211 => 'Aucune information capitalistique',
|
||||
220 => 'Aucune information RIB',
|
||||
221 => 'Code guichet inconnu',
|
||||
250 => 'Raison Sociale absente',//NEW
|
||||
251 => 'Raison Sociale en double : entête retenue',//NEW
|
||||
252 => 'Raison Sociale en double : entête non retenue',//NEW
|
||||
300 => 'Code pays absent du réferentiel',
|
||||
301 => 'Code devise absent du référentiel',
|
||||
201 => 'Code fonction inexistant',
|
||||
);
|
||||
|
||||
public function getRefCodeRetour($sep=',', $eol=PHP_EOL) {
|
||||
$str='codRetour'.$sep.'libRetour'.$eol;
|
||||
foreach ($this->tabCodeRetour as $key=>$value)
|
||||
$str.=$key.$sep.$value.$eol;
|
||||
return $str;
|
||||
}
|
||||
|
||||
public function getRefCodeVoie($sep=',', $eol=PHP_EOL) {
|
||||
$tabCodeVoie = array(
|
||||
'ABE' => "Abbaye",
|
||||
'AGL' => "Agglomération",
|
||||
'AIRE' => "Aire",
|
||||
'ALL' => "Allée",
|
||||
'ALL' => "Allee",
|
||||
'ACH' => "Ancien chemin",
|
||||
'ART' => "Ancienne route",
|
||||
'ANSE' => "Anse",
|
||||
'ARC' => "Arcade",
|
||||
'AUT' => "Autoroute",
|
||||
'AV' => "Avenue",
|
||||
'BRE' => "Barrière",
|
||||
'BCH' => "Bas chemin",
|
||||
'BSTD' => "Bastide",
|
||||
'BAST' => "Baston",
|
||||
'BEGI' => "Beguinage",
|
||||
'BER' => "Berge",
|
||||
'BOIS' => "Bois",
|
||||
'BCLE' => "Boucle",
|
||||
'BD' => "Boulevard",
|
||||
'BRG' => "Bourg",
|
||||
'BUT' => "Butte",
|
||||
'CALE' => "Cale",
|
||||
'CAMP' => "Camp",
|
||||
'CGNE' => "Campagne",
|
||||
'CPG' => "Camping",
|
||||
'CARR' => "Carré",
|
||||
'CAU' => "Carreau",
|
||||
'CAR' => "Carrefour",
|
||||
'CARE' => "Carrière",
|
||||
'CST' => "Castel",
|
||||
'CAV' => "Cavée",
|
||||
'CTRE' => "Central",
|
||||
'CTRE' => "Centre",
|
||||
'CHL' => "Chalet",
|
||||
'CHP' => "Chapelle",
|
||||
'CHI' => "Charmille",
|
||||
'CHT' => "Château",
|
||||
'CHS' => "Chaussée",
|
||||
'CHE' => "Chemin",
|
||||
'CHV' => "Chemin vicinaux",
|
||||
'CHV' => "Chemin vicinal",
|
||||
'CHEM' => "Cheminement",
|
||||
'CITE' => "Cîte",
|
||||
'CLOI' => "Cloître",
|
||||
'CLOS' => "Clos",
|
||||
'COL' => "Col",
|
||||
'COLI' => "Colline",
|
||||
'CTR' => "Contour",
|
||||
'COR' => "Corniche",
|
||||
'COTE' => "Côte",
|
||||
'COTT' => "Cottage",
|
||||
'COUR' => "Cour",
|
||||
'CRS' => "Cours",
|
||||
'DARS' => "Darse",
|
||||
'DEG' => "Degré",
|
||||
'DSG' => "Descente",
|
||||
'DSC' => "Descente",
|
||||
'DIG' => "Digue",
|
||||
'DOM' => "Domaine",
|
||||
'ECA' => "Ecart",
|
||||
'ECL' => "Ecluse",
|
||||
'EGL' => "Eglise",
|
||||
'EN' => "Enceinte",
|
||||
'ENV' => "Enclave",
|
||||
'ENC' => "Enclos",
|
||||
'ESC' => "Escalier",
|
||||
'ESPA' => "Espace",
|
||||
'ESP' => "Esplanade",
|
||||
'ETING' => "Etang",
|
||||
'FG' => "Faubourg",
|
||||
'FRM' => "Ferme",
|
||||
'FON' => "Fontaine",
|
||||
'FORT' => "Fort",
|
||||
'FORM' => "Forum",
|
||||
'FOS' => "Fosse",
|
||||
'FOYR' => "Foyer",
|
||||
'GAL' => "Galerie",
|
||||
'GARE' => "Gare",
|
||||
'GARN' => "Garenne",
|
||||
'GBD' => "Grand boulevard",
|
||||
'GDEN' => "Grande ensemble",
|
||||
'GR' => "Grande rue",
|
||||
'GRI' => "Grille",
|
||||
'GRIM' => "Grimpette",
|
||||
'GPE' => "Groupe",
|
||||
'GPT' => "Groupement",
|
||||
'HLE' => "Halle",
|
||||
'HAM' => "Hameau",
|
||||
'HCH' => "Haut chemin",
|
||||
'HIP' => "Hippodrome",
|
||||
'HLM' => "HLM",
|
||||
'ILE' => "Ile",
|
||||
'IMM' => "Immeuble",
|
||||
'IMP' => "Impasse",
|
||||
'JARD' => "Jardin",
|
||||
'JTE' => "Jetée",
|
||||
'LEVE' => "Levée",
|
||||
'LD' => "Lieu dit",
|
||||
'LD' => "Lieudit",
|
||||
'LOT' => "Lotissement",
|
||||
'MAIL' => "Mail",
|
||||
'MF' => "Maison forestière",
|
||||
'MAN' => "Manoir",
|
||||
'MAR' => "Marche",
|
||||
'MAS' => "Mas",
|
||||
'MET' => "Métro",
|
||||
'MTE' => "Montée",
|
||||
'MLN' => "Moulin",
|
||||
'MUS' => "Musée",
|
||||
'NTE' => "Nouvelle route",
|
||||
'PAL' => "Palais",
|
||||
'PARC' => "Parc",
|
||||
'PKG' => "Parking",
|
||||
'PRV' => "Parvis",
|
||||
'PAS' => "Passage",
|
||||
'PN' => "Passage à niveau",
|
||||
'PASS' => "Passe",
|
||||
'PLE' => "Passerelle",
|
||||
'PAT' => "Patio",
|
||||
'PAV' => "Pavillon",
|
||||
'PERI' => "Périphérique",
|
||||
'PSTY' => "Péristyle",
|
||||
'PTA' => "Petites allée",
|
||||
'PCH' => "Petit chemin",
|
||||
'PAE' => "Petite avenue",
|
||||
'PIM' => "Petite impasse",
|
||||
'PRT' => "Petite route",
|
||||
'PTR' => "Petite rue",
|
||||
'PL' => "Place",
|
||||
'PLCI' => "Placis",
|
||||
'PLAG' => "Plage",
|
||||
'PLN' => "Plaine",
|
||||
'PLAN' => "Plan",
|
||||
'PLT' => "Plateau",
|
||||
'PNT' => "Pointe",
|
||||
'PONT' => "Pont",
|
||||
'PCH' => "Porche",
|
||||
'PORT' => "Port",
|
||||
'PTE' => "Porte",
|
||||
'PORQ' => "Portique",
|
||||
'POT' => "Poterne",
|
||||
'POUR' => "Pourtour",
|
||||
'PRE' => "Pré",
|
||||
'PRQ' => "Presqu'île",
|
||||
'PROM' => "Promenade",
|
||||
'QU' => "Quai",
|
||||
'QUAI' => "Quai",
|
||||
'QUA' => "Quartier",
|
||||
'RAC' => "Raccourci",
|
||||
'RAID' => "Raidillon",
|
||||
'RPE' => "Rampe",
|
||||
'REM' => "Rempart",
|
||||
'RES' => "Résidence",
|
||||
'ROC' => "Roc",
|
||||
'ROC' => "Rocade",
|
||||
'RPT' => "Rond point",
|
||||
'ROQT' => "Roquet",
|
||||
'RTD' => "Rotonde",
|
||||
'RTE' => "Route",
|
||||
'R' => "Rue",
|
||||
'RUE' => "Rue",
|
||||
'RLE' => "Ruelle",
|
||||
'SEN' => "Sente",
|
||||
'SEN' => "Sentier",
|
||||
'SQ' => "Square",
|
||||
'STDE' => "Stade",
|
||||
'STA' => "Station",
|
||||
'TPL' => "Terre plein",
|
||||
'TRN' => "Terrain",
|
||||
'TSSE' => "Terrasse",
|
||||
'TRT' => "Tertre",
|
||||
'TOUR' => "Tour",
|
||||
'TRA' => "Traverse",
|
||||
'VAL' => "Vallon",
|
||||
'VAL' => "Vallée",
|
||||
'VEN' => "Venelle",
|
||||
'VIA' => "Via",
|
||||
'VTE' => "Vieille route",
|
||||
'VCHE' => "Vieux chemin",
|
||||
'VLA' => "Villa",
|
||||
'VGE' => "Village",
|
||||
'VLGE' => "Village",
|
||||
'VOI' => "Voie",
|
||||
'VOIE' => "Voie",
|
||||
'ZONE' => "Zone",
|
||||
'ZAC' => "Zone d'aménagement concerté",
|
||||
'Z A C' => "Zone d'aménagement concerté",
|
||||
'ZAD' => "Zone d'aménagement différé",
|
||||
'Z A D' => "Zone d'aménagement différé",
|
||||
'ZA' => "Zone artisanale",
|
||||
'Z A' => "Zone artisanale",
|
||||
'ZI' => "Zone industrielle",
|
||||
'Z I' => "Zone industrielle",
|
||||
'ZUP' => "Zone à urbaniser en priorité",
|
||||
'Z U P' => "Zone à urbaniser en priorité",
|
||||
);
|
||||
|
||||
$str='codVoie'.$sep.'libVoie'.$eol;
|
||||
foreach ($tabCodeVoie as $k => $v) {
|
||||
$str.=$k.$sep.$v.$eol;
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,74 +0,0 @@
|
||||
<?php
|
||||
class Metier_Util_PdoLib
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var \PDO
|
||||
*/
|
||||
protected $conn = false;
|
||||
|
||||
/**
|
||||
* Connection PDO
|
||||
* Note : Transition avant de faire les librairies Metier PSR-4
|
||||
* @param array $config
|
||||
* 'host' => 'IP',
|
||||
* 'port' => '3306',
|
||||
* 'dbname' => 'db',
|
||||
* 'charset' => 'utf8',
|
||||
* 'user' => 'user',
|
||||
* 'password' => 'password',
|
||||
* @return boolean|PDO
|
||||
*/
|
||||
public function __construct(array $config = array())
|
||||
{
|
||||
$user = null;
|
||||
$password = null;
|
||||
$options = array();
|
||||
|
||||
// Get Application config from registry
|
||||
if (count($config) == 0) {
|
||||
$c = Zend_Registry::get('config');
|
||||
$params = $c->profil->db->metier->params;
|
||||
$dsn = "mysql:host=".$params->host.
|
||||
";port=".(isset($params->port) ? $params->port : '3306').
|
||||
";dbname=".$params->dbname.
|
||||
";charset=utf8";
|
||||
$user = $params->username;
|
||||
$password = $params->password;
|
||||
}
|
||||
// Get config from params
|
||||
else {
|
||||
$dsn = "mysql:host=".$config['host'].
|
||||
";port=".(isset($config['port']) ? $config['port'] : '3306').
|
||||
";dbname=".$config['dbname'].
|
||||
";charset=".(isset($config['charset']) ? $config['charset'] : 'utf8');
|
||||
if (array_key_exists('username', $config)) {
|
||||
$user = $config['username'];
|
||||
}
|
||||
if (array_key_exists('password', $config)) {
|
||||
$password = $config['password'];
|
||||
}
|
||||
if (array_key_exists('options', $config)) {
|
||||
$options = $config['options'];
|
||||
}
|
||||
}
|
||||
|
||||
// Try to load PDO
|
||||
try {
|
||||
$this->conn = new PDO($dsn, $user, $password, $options);
|
||||
$this->conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
|
||||
} catch (PDOException $e) {
|
||||
echo $e->getMessage();
|
||||
$this->conn = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get connection
|
||||
* @return PDO
|
||||
*/
|
||||
public function getConnection()
|
||||
{
|
||||
return $this->conn;
|
||||
}
|
||||
}
|
@ -1,204 +0,0 @@
|
||||
<?php
|
||||
// --------------------------------------------------------------------------- //
|
||||
// Fonctions sur les criteres
|
||||
// --------------------------------------------------------------------------- //
|
||||
if (defined('DEBUG') == false) {
|
||||
define( 'DEBUG', 0);
|
||||
}
|
||||
if (defined('LOCAL') == false) {
|
||||
define( 'LOCAL', 0);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// Nouvelle sequence
|
||||
// --------------------------------------------------------------------------- //
|
||||
function nouvelleSequence(&$criteres)
|
||||
{
|
||||
$sequence = array(
|
||||
array( 'crit' => 'IT ', 'next' => '12' ),
|
||||
array( 'crit' => 'I ', 'next' => '00' ),
|
||||
array( 'crit' => 'I SEP ', 'next' => '12' ),
|
||||
array( 'crit' => ' T ', 'next' => '00' ),
|
||||
array( 'crit' => ' TSEP ', 'next' => '13 61 61o61p' ),
|
||||
array( 'crit' => ' D VNR', 'next' => '24 45o24o24p' ),
|
||||
array( 'crit' => ' D NR', 'next' => '21o21p' ),
|
||||
array( 'crit' => ' DL NR', 'next' => '21 21o21p' ),
|
||||
array( 'crit' => ' DLVNR', 'next' => '36 45 24 45o24o24p' ),
|
||||
array( 'crit' => ' P VNR', 'next' => '74 78o74o74p' ),
|
||||
array( 'crit' => ' PD VNR', 'next' => '74 78o74o74p' ),
|
||||
array( 'crit' => ' PDL NR', 'next' => '78 83o74 74o74p' ),
|
||||
array( 'crit' => ' PDLV R', 'next' => '78 81 82 77 71' ),
|
||||
array( 'crit' => ' PDLVN ', 'next' => '82 75 28 71' ),
|
||||
array( 'crit' => ' PDLVNR', 'next' => '78 74 82 78o74o82o82p' ),
|
||||
array( 'crit' => ' S ', 'next' => '30o30p' ),
|
||||
array( 'crit' => ' S R', 'next' => '72o71 71o71p' ),
|
||||
array( 'crit' => ' S N ', 'next' => '31' ),
|
||||
array( 'crit' => ' S NR', 'next' => '77 43 71' ),
|
||||
array( 'crit' => ' S V ', 'next' => '35o35p30' ),
|
||||
array( 'crit' => ' S VN ', 'next' => '75 77o75o77p75p' ),
|
||||
array( 'crit' => ' S V R', 'next' => '75 83' ),
|
||||
array( 'crit' => ' S VNR', 'next' => '43 44 75 83 61 71' ),
|
||||
array( 'crit' => ' S D ', 'next' => '40p40o61p61' ),
|
||||
array( 'crit' => ' S D R', 'next' => '45o77 77o77p' ),
|
||||
array( 'crit' => ' S D N ', 'next' => '71' ),
|
||||
array( 'crit' => ' S D NR', 'next' => '77 43 71 31' ),
|
||||
array( 'crit' => ' S D V ', 'next' => '77o40 40o' ),
|
||||
array( 'crit' => ' S D V R', 'next' => '75 72 71' ),
|
||||
array( 'crit' => ' S D VN ', 'next' => '43 41 77 71' ),
|
||||
array( 'crit' => ' S D VNR', 'next' => '44 43 49 73 75 72 71' ),
|
||||
array( 'crit' => ' S DL ', 'next' => '78 78p61p61p' ),
|
||||
array( 'crit' => ' S DL R', 'next' => '82 78 77 71' ),
|
||||
array( 'crit' => ' S DL N ', 'next' => '41 71' ),
|
||||
array( 'crit' => ' S DL NR', 'next' => '78 82 81 78p77 43 71 31' ),
|
||||
array( 'crit' => ' S DLV ', 'next' => '78 78p71' ),
|
||||
array( 'crit' => ' S DLV R', 'next' => '78 83 82 75 72 40 71' ),
|
||||
array( 'crit' => ' S DLVN ', 'next' => '78 82 78p43 71' ),
|
||||
array( 'crit' => ' S DLVNR', 'next' => '78 49 77 43 78p75 41 72 71 22' ),
|
||||
array( 'crit' => ' S P ', 'next' => '60o60p31 31o31p' ),
|
||||
array( 'crit' => ' S P R', 'next' => '45 77 41' ),
|
||||
array( 'crit' => ' S P N ', 'next' => '71 71o45 45p' ),
|
||||
array( 'crit' => ' S P NR', 'next' => '77 72 33 32' ),
|
||||
array( 'crit' => ' S P V ', 'next' => '63o45 45o45p' ),
|
||||
array( 'crit' => ' S P VN ', 'next' => '45 43 61 64' ),
|
||||
array( 'crit' => ' S P V R', 'next' => '75 83 45 35' ),
|
||||
array( 'crit' => ' S P VNR', 'next' => '77 45 44 43 73 75 72 71 41 42 40' ),
|
||||
array( 'crit' => ' S PD ', 'next' => '45 71p71o' ),
|
||||
array( 'crit' => ' S PD R', 'next' => '77 45 71' ),
|
||||
array( 'crit' => ' S PD N ', 'next' => '71 71o45 45o' ),
|
||||
array( 'crit' => ' S PD NR', 'next' => '77 76 45 41 43 40' ),
|
||||
array( 'crit' => ' S PD V ', 'next' => '45 45o71 42 42p' ),
|
||||
array( 'crit' => ' S PD V R', 'next' => '77 83 43 71 41' ),
|
||||
array( 'crit' => ' S PD VN ', 'next' => '83 75 71 44 83o75o71o44o43 41 40 40o40p' ),
|
||||
array( 'crit' => ' S PD VNR', 'next' => '77 74 45 44 43 75 71 61 63 60 40' ),
|
||||
array( 'crit' => ' S PDL ', 'next' => '71 71o71p45 45o' ),
|
||||
array( 'crit' => ' S PDL R', 'next' => '78 82 75 45 44' ),
|
||||
array( 'crit' => ' S PDL N ', 'next' => '73 48 41' ),
|
||||
array( 'crit' => ' S PDL NR', 'next' => '78 82 81 49 77 65 44 43 75 60 31' ),
|
||||
array( 'crit' => ' S PDLV ', 'next' => '78 45 45o71 42 42p40' ),
|
||||
array( 'crit' => ' S PDLV R', 'next' => '78 83 82 75 45 49 46 42 71 40' ),
|
||||
array( 'crit' => ' S PDLVN ', 'next' => '78 83 77 45 71 42 41 40' ),
|
||||
array( 'crit' => ' S PDLVNR', 'next' => '78 83 27 74 45 44 43 42 40' ),
|
||||
array( 'crit' => ' SE ', 'next' => '31o31p' ),
|
||||
array( 'crit' => ' SE R', 'next' => '72o71 71o71p' ),
|
||||
array( 'crit' => ' SE N ', 'next' => '31' ),
|
||||
array( 'crit' => ' SE NR', 'next' => '77 43 71' ),
|
||||
array( 'crit' => ' SE V ', 'next' => '35o35p30' ),
|
||||
array( 'crit' => ' SE V R', 'next' => '75 83' ),
|
||||
array( 'crit' => ' SE VN ', 'next' => '75 77' ),
|
||||
array( 'crit' => ' SE VNR', 'next' => '43 44 75 83 61 71' ),
|
||||
array( 'crit' => ' SE D ', 'next' => '40o30' ),
|
||||
array( 'crit' => ' SE D R', 'next' => '45o77' ),
|
||||
array( 'crit' => ' SE D N ', 'next' => '71' ),
|
||||
array( 'crit' => ' SE D NR', 'next' => '77 43 71 31' ),
|
||||
array( 'crit' => ' SE D V ', 'next' => '77o40' ),
|
||||
array( 'crit' => ' SE D V R', 'next' => '75 72 71' ),
|
||||
array( 'crit' => ' SE D VN ', 'next' => '43 41 77' ),
|
||||
array( 'crit' => ' SE D VNR', 'next' => '44 43 49 73 75 72 71' ),
|
||||
array( 'crit' => ' SE DL ', 'next' => '40' ),
|
||||
array( 'crit' => ' SE DL R', 'next' => '82 78 77' ),
|
||||
array( 'crit' => ' SE DL N ', 'next' => '45 43 82o45o43o43p' ),
|
||||
array( 'crit' => ' SE DL NR', 'next' => '78 82 81 46 77 43 71 31' ),
|
||||
array( 'crit' => ' SE DLV ', 'next' => '78 78o71 71o71p' ),
|
||||
array( 'crit' => ' SE DLV R', 'next' => '78 83 82 75 72 40' ),
|
||||
array( 'crit' => ' SE DLVN ', 'next' => '78 82 46 43 71' ),
|
||||
array( 'crit' => ' SE DLVNR', 'next' => '78 49 77 43 46 75 41 72 71 22' ),
|
||||
array( 'crit' => ' SEP ', 'next' => '61p31 31p30' ),
|
||||
array( 'crit' => ' SEP R', 'next' => '45 77 41' ),
|
||||
array( 'crit' => ' SEP N ', 'next' => '71 71o45 45p' ),
|
||||
array( 'crit' => ' SEP NR', 'next' => '77 72 33 32' ),
|
||||
array( 'crit' => ' SEP V ', 'next' => '63o45' ),
|
||||
array( 'crit' => ' SEP V R', 'next' => '75 83 45 35' ),
|
||||
array( 'crit' => ' SEP VN ', 'next' => '45 43 61 64' ),
|
||||
array( 'crit' => ' SEP VNR', 'next' => '77 45 44 43 73 75 72 71 41 42 40' ),
|
||||
array( 'crit' => ' SEPD ', 'next' => '45 71p' ),
|
||||
array( 'crit' => ' SEPD R', 'next' => '77 45' ),
|
||||
array( 'crit' => ' SEPD N ', 'next' => '71 71o45 40' ),
|
||||
array( 'crit' => ' SEPD NR', 'next' => '77 76 45 41 43 40' ),
|
||||
array( 'crit' => ' SEPD V ', 'next' => '45 71p71o40' ),
|
||||
array( 'crit' => ' SEPD V R', 'next' => '77 83 43 71 41 40' ),
|
||||
array( 'crit' => ' SEPD VN ', 'next' => '83 75 71 44 83o75o71o44o43 41 40 40o40p' ),
|
||||
array( 'crit' => ' SEPD VNR', 'next' => '77 74 45 44 43 75 71 61 63 60 40' ),
|
||||
array( 'crit' => ' SEPDL ', 'next' => '45 71p40' ),
|
||||
array( 'crit' => ' SEPDL R', 'next' => '78 82 75 45 44 40' ),
|
||||
array( 'crit' => ' SEPDL N ', 'next' => '73 48 41 40' ),
|
||||
array( 'crit' => ' SEPDL NR', 'next' => '78 82 81 49 77 65 44 43 75 60 31' ),
|
||||
array( 'crit' => ' SEPDLV ', 'next' => '78 45 45o71 42 42p' ),
|
||||
array( 'crit' => ' SEPDLV R', 'next' => '78 83 82 75 45 49 46 42 71 40' ),
|
||||
array( 'crit' => ' SEPDLVN ', 'next' => '78 83 77 45 71 42 41 40' ),
|
||||
array( 'crit' => ' SEPDLVNR', 'next' => '78 83 27 74 45 44 43 42 40' ),
|
||||
);
|
||||
|
||||
foreach ($sequence as $ligne) {
|
||||
if (strstr($ligne['crit'], $criteres) != false) {
|
||||
return str_split($ligne['next'], 3);
|
||||
}
|
||||
}
|
||||
return array();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// Nouvelle combinaison
|
||||
// --------------------------------------------------------------------------- //
|
||||
function nouvelleCombinaison(&$sequence, &$sequencePos, $pass, &$index, &$mode)
|
||||
{
|
||||
for (;;) {
|
||||
if (isset($sequence[$sequencePos]) === false) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$combinaison = trim($sequence[$sequencePos]);
|
||||
++$sequencePos;
|
||||
|
||||
if (strlen($combinaison) == 2) {
|
||||
return $combinaison;
|
||||
}
|
||||
|
||||
// Passage en phonetique ou en orthographique
|
||||
if (strlen($combinaison) == 3) {
|
||||
if ($pass == 2 || $pass == 3) {
|
||||
continue;
|
||||
}
|
||||
$car = strtolower(substr($combinaison, 2, 1));
|
||||
|
||||
//Search Engine Version 2, we remove the orthographique
|
||||
if (SPHINX_ENT_VERSION == 2 && $car == 'o') {
|
||||
return strtolower(substr($combinaison, 0, 2));
|
||||
}
|
||||
|
||||
switch($car) {
|
||||
case 'p':
|
||||
$index = 'ent_phx';
|
||||
$mode = SPH_MATCH_EXTENDED2;
|
||||
break;
|
||||
case 'o':
|
||||
$index = 'ent_mns';
|
||||
$mode = SPH_MATCH_ISPELL;
|
||||
break;
|
||||
default:
|
||||
debugln("attention: mode inconnu: '$car'");
|
||||
}
|
||||
} else if ($pass == 1) {
|
||||
$index = 'ent_mns';
|
||||
//Search Engine Version 2, we remove the orthographique
|
||||
if (SPHINX_ENT_VERSION == 2) {
|
||||
$index = 'ent';
|
||||
}
|
||||
}
|
||||
|
||||
return $combinaison;
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// Nouveaux criteres
|
||||
// --------------------------------------------------------------------------- //
|
||||
function nouveauxCriteres($comb2crit, $combinaison)
|
||||
{
|
||||
if ( array_key_exists($combinaison, $comb2crit) ) {
|
||||
$ligne = $comb2crit[$combinaison];
|
||||
return $ligne;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user