Formattage

This commit is contained in:
Michael RICOIS 2014-10-14 15:17:40 +00:00
parent a55032de17
commit d47ed7fe0b

View File

@ -76,9 +76,8 @@ class MTel
'telephonie',
'siren,nic,dateProvPartenaire,typeTel,infoTel,LPAD(telephone,10,0) AS telephone,actif,partenaire,idUtilisateur,dateInsert,dateInsert*1 AS dateInsertYmd,dateConfPartenaire,partenaireConf,nbConf,idUpdate,dateUpdate,dateUpdate*1 AS dateUpdateYmd',
"siren=$siren $strNic $strActif AND dateSuppr=0 ORDER BY typeTel ASC, nbConf DESC", false, MYSQL_ASSOC);
if (count($ret)>0) {
if (count($ret)>0)
{
$this->enCache=true;
foreach ($ret as $tabTel)
{
@ -116,8 +115,9 @@ class MTel
}
}
} elseif ($this->accesDistant) {
}
elseif ($this->accesDistant)
{
$this->enCache=false;
$tabPost = array(
'p_ACTION'=>'',
@ -243,8 +243,10 @@ class MTel
);
}
if (preg_match_all('/<tr>(?:.*)<th>(?:.*)<span>(.*)(tél|fax)(?:.*)<\/span>(?:.*)<\/th>(?:.*)<td>(?:.*)<span>(.*)<\/span>(?:.*)<\/td>(?:.*)<\/tr>/Uis', $body, $matches)) {
foreach ($matches[2] as $j=>$tmp) {
if (preg_match_all('/<tr>(?:.*)<th>(?:.*)<span>(.*)(tél|fax)(?:.*)<\/span>(?:.*)<\/th>(?:.*)<td>(?:.*)<span>(.*)<\/span>(?:.*)<\/td>(?:.*)<\/tr>/Uis', $body, $matches))
{
foreach ($matches[2] as $j=>$tmp)
{
$lib=$tmp;
$precis=trim(strtr($matches[1][$j], array('-'=>' ')));
$num=trim(strtr($matches[3][$j],array('&nbsp;'=>'','<br />'=>'')));
@ -252,8 +254,8 @@ class MTel
}
$tabTel=array_values($tabTel);
foreach ($tabTel as $tabT) {
foreach ($tabTel as $tabT)
{
$tabRet[]=array(
'siren'=>$siren,
'nic'=>substr($res['siret'],-5),
@ -278,7 +280,8 @@ class MTel
}
}
if ($last) {
if ($last)
{
$tabRet=array();
foreach($tabLast as $typeTel=>$tabPriorite) {
ksort($tabPriorite);