Correction information tabInfoUser

This commit is contained in:
Michael RICOIS 2012-01-09 14:06:29 +00:00
parent a704a7f9b9
commit 59a50fce3b

View File

@ -132,23 +132,26 @@ class WsScore
$nic=''; $nic='';
} }
if ($tabInfoUser['clientTest']=='Oui' || $tabInfoUser['typeCompte']=='TEST') { if ($this->tabInfoUser['clientTest']=='Oui' || $this->tabInfoUser['typeCompte']=='TEST') {
$test=1; $test=1;
} else { } else {
$test=0; $test=0;
} }
$tabRdvInsee=array(); $tabRdvInsee=array();
if ($service=='identite') { if (in_array($service, array('identite')))
if ($siren>1000 && $nic>9) $strNic=" AND nic=$nic "; {
elseif ($siren==0 && $ref>0) $strNic=" AND id=$ref "; if ($siren>1000 && $nic>9) $strNic=" AND nic=$nic ";
elseif ($siren>1000) $strNic=" AND siege=1 ORDER BY actif DESC, nic DESC "; elseif ($siren==0 && $ref>0) $strNic=" AND id=$ref ";
elseif ($siren>1000) $strNic=" AND siege=1 ORDER BY actif DESC, nic DESC ";
else return; else return;
$rep=$iDbCrm->select('jo.etablissements', 'siren, nic, actif, siege, raisonSociale, adr_cp, adr_ville, source', "siren=$siren $strNic", false, MYSQL_ASSOC); $rep = $iDbCrm->select('jo.etablissements',
$tabRep=$rep[0]; 'siren, nic, actif, siege, raisonSociale, adr_cp, adr_ville, source',
$rs= $tabRep['raisonSociale']; "siren=$siren $strNic", false, MYSQL_ASSOC);
$cp= $tabRep['adr_cp']; $tabRep = $rep[0];
$vil=$tabRep['adr_ville']; $rs = $tabRep['raisonSociale'];
$cp = $tabRep['adr_cp'];
$vil = $tabRep['adr_ville'];
$tabRdvInsee['source']=$tabRep['source']; $tabRdvInsee['source']=$tabRep['source'];
if ($tabRep['actif']==0) if ($tabRep['actif']==0)
$tabRdvInsee['actifInsee']=0; $tabRdvInsee['actifInsee']=0;