if (!$_SESSION['connected']) die();
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
$id=trim(preg_replace('/[^0-9]/', '', $_REQUEST['id']))*1; // Si id=0 alors non communiqué
if (($siret*1)==0 && $id==0) die('Paramètres incorrects !');
$siren=substr($siret,0,9);
$mil=false;
include_once(INCLUDE_PATH.'/partenaires/classMTva.php');
include_once(INCLUDE_PATH.'/partenaires/classMMap.php');
//include_once(INCLUDE_PATH.'partenaires/classMCoface.php');
include_once(FWK_PATH.'/common/dates.php');
/** 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) {
include_once(realpath(dirname(__FILE__).'/../../').'/includes/soaperror.php');
processSoapFault($client,$fault,$tabInfo);
die();
}
$raisonSociale=$tabInfo['entrep']['raisonSociale'];
?>
|
|
Numéro identifiant Siren |
=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?> |
|
Raison Sociale |
=$raisonSociale?> |
|
|
|
|