2009-02-17 13:14:53 +00:00
|
|
|
|
<? if (!$_SESSION['connected']) die();
|
|
|
|
|
|
|
|
|
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
|
|
|
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Param<61>tres incorrects !');
|
|
|
|
|
|
|
|
|
|
$id=trim(preg_replace('/[^0-9]/', '', $_REQUEST['id']))*1; // Si id=0 alors non communiqu<71>
|
|
|
|
|
if (($siret*1)==0 && $id==0) die('Param<61>tres incorrects !');
|
|
|
|
|
$siren=substr($siret,0,9);
|
|
|
|
|
$mil=false;
|
|
|
|
|
|
2009-02-20 13:04:46 +00:00
|
|
|
|
include_once(INCLUDE_PATH.'/partenaires/classMTva.php');
|
|
|
|
|
include_once(INCLUDE_PATH.'/partenaires/classMMap.php');
|
2009-02-17 13:14:53 +00:00
|
|
|
|
//include_once(INCLUDE_PATH.'partenaires/classMCoface.php');
|
2009-02-20 13:04:46 +00:00
|
|
|
|
include_once(FWK_PATH.'/common/dates.php');
|
2009-02-17 13:14:53 +00:00
|
|
|
|
|
|
|
|
|
/** Utilisation du WS **/
|
|
|
|
|
$client = new SoapClient(null, array( 'trace' => 1,
|
|
|
|
|
'soap_version' => SOAP_1_1,
|
|
|
|
|
'location' => WEBSERVICE_URL,
|
|
|
|
|
'uri' => WEBSERVICE_URI,
|
|
|
|
|
'login' => $_SESSION['tabInfo']['login'],
|
|
|
|
|
'password' => $_SESSION['tabInfo']['password']));
|
|
|
|
|
try {
|
|
|
|
|
$O = $client->getListeEtablissements($siren);
|
|
|
|
|
$etabs=$O['result'];
|
|
|
|
|
} catch (SoapFault $fault) {
|
|
|
|
|
echo '<pre>'.$client->__getLastResponse().'</pre>';
|
|
|
|
|
echo 'ERREUR SOAP :'.EOL;
|
|
|
|
|
print_r($fault);
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$raisonSociale=$tabInfo['entrep']['raisonSociale'];
|
|
|
|
|
?>
|
|
|
|
|
<table width="580" border="0" align="left" bgcolor="#FFFFFF">
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="3" align="center"><img src="./img/rub_etablissements.png" width="577" height="36" /></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="30"> </td>
|
|
|
|
|
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
|
|
|
|
<td width="350" class="StyleInfoData"><?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="30"> </td>
|
|
|
|
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
|
|
|
|
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="3"> </td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="3"><img src="./img/srub_etablissements.png" width="576" height="27" /></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="30"> </td>
|
|
|
|
|
<td colspan="2" width="550" class="StyleInfoData"><table><?foreach ($etabs as $i=>$etab) {
|
|
|
|
|
|
|
|
|
|
if ($etab['Siege']==1) $type='si<73>ge ';
|
|
|
|
|
else $type='<27>tablissement ';
|
|
|
|
|
if ($etab['Actif']==1) $type.='actif';
|
|
|
|
|
else $type.='inactif';
|
|
|
|
|
|
|
|
|
|
$lien='<a title="Voir la fiche d\'identit<69>" href="/?page=identite&siret='.$siren.$etab['Nic'].'">';
|
|
|
|
|
?><tr><td class="StyleInfoData" width="30"><b><?=$lien.$etab['Nic']?></a></b></td>
|
|
|
|
|
<td class="StyleInfoData" width="120"><?=$type?></td>
|
|
|
|
|
<td class="StyleInfoData" width="150"><?
|
|
|
|
|
if ($etab['Enseigne']<>'') echo '<b>'.$etab['Enseigne'].'</b><br/>';
|
|
|
|
|
echo $etab['Adresse'] .'<br/>';
|
|
|
|
|
if ($etab['Adresse2']<>'') echo $etab['Adresse2'].'<br/>';
|
|
|
|
|
echo '<b>'.$etab['CP'].' '.$etab['Ville'].'</b>';
|
|
|
|
|
if ($etab['Tel']<>'') echo '<br/><i>Tél : '.$etab['Tel'].'</i> ';
|
|
|
|
|
if ($etab['Fax']<>'') echo '<br/><i>Fax : '.$etab['Fax'].'</i>';
|
|
|
|
|
?></td>
|
|
|
|
|
<td class="StyleInfoData" width="260"><?=$etab['NafEtab'].' : '.$etab['NafEtabLib']?></td>
|
|
|
|
|
</tr><?
|
|
|
|
|
}
|
|
|
|
|
if (count($etabs)==0)
|
|
|
|
|
echo '<tr><td class="StyleInfoData" width="580"> Aucun établissement n\'est présente dans notre base</td></tr>';
|
|
|
|
|
elseif (preg_match('/CARTES/i', $_SESSION['tabInfo']['pref']))
|
|
|
|
|
echo '<tr><td colspan="4"> </td></tr><tr><td class="StyleInfoData" colspan="4" width="580" align="center"><iframe src="/?page=carte&siret='.$siren.'" width=505 height=505 marginheight="1" marginwidth="1" scrolling="No" frameborder=1></iframe></td></tr>';
|
|
|
|
|
?></table></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
</table>
|