155 lines
4.8 KiB
PHP
155 lines
4.8 KiB
PHP
<? 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);
|
|
|
|
if ($_REQUEST['vue']=='histo')
|
|
$histo=true;
|
|
else
|
|
$histo=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->getLiens($siren, true);//false);
|
|
$liens=$O['result'];
|
|
} catch (SoapFault $fault) {
|
|
include_once(realpath(dirname(__FILE__).'/../../').'/includes/soaperror.php');
|
|
processSoapFault($client,$fault,$tabInfo);
|
|
die();
|
|
}
|
|
$raisonSociale=$tabInfo['entrep']['raisonSociale'];
|
|
?>
|
|
<table width="580" border="0" align="left" bgcolor="#FFFFFF">
|
|
<tr>
|
|
<td colspan="3"><img src="./img/rub_liensfi.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_actio.png" width="576" height="27"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td colspan="2" width="550" class="StyleInfoData"><table><?
|
|
if (@count($liens['actionnaires'])>0) {
|
|
foreach ($liens['actionnaires'] as $i=>$lien) {
|
|
if ($lien['Actif']==0) {
|
|
$font1='<font color="gray"><i>';
|
|
$font2='</i></font>';
|
|
} else
|
|
$font1=$font2='';
|
|
?><tr><td class="StyleInfoData" width="100"><?
|
|
echo $font1;
|
|
if ($lien['Pmin']*1>0) echo $lien['Pmin'].' %';
|
|
elseif ($lien['MajMin']=='+') echo 'major.';
|
|
elseif ($lien['MajMin']=='-') echo 'minor.';
|
|
elseif ($lien['MajMin']=='C') echo 'major.';
|
|
elseif ($lien['MajMin']=='S') echo 'minor.';
|
|
else echo ' ';
|
|
echo $font2;?></td>
|
|
<td class="StyleInfoLib" width="300"><?
|
|
echo $font1;
|
|
echo utf8_decode($lien['RaisonSociale']);
|
|
echo $font2;
|
|
?></td>
|
|
<td class="StyleInfoData" width="150"><?
|
|
echo $font1;
|
|
if ( $lien['Siren']<>'' && $lien['Siren']<>0) {
|
|
echo 'Siren <a href="./?page=identite&siret='. $lien['Siren'] .'">'. $lien['Siren'].'</a>';
|
|
}
|
|
else ' ';
|
|
|
|
if ($lien['Pays']<>'France') echo '<b>'.utf8_decode($lien['Pays']);
|
|
echo $font2;
|
|
?></b></td>
|
|
</tr>
|
|
<? }
|
|
} else { ?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="550" colspan="2" class="StyleInfoData">Aucun actionnaire référencé par nos services</td>
|
|
</tr>
|
|
<? } ?>
|
|
<tr>
|
|
<td colspan="3"> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3"><img src="./img/srub_part.png" width="576" height="27"></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td colspan="2" width="550" class="StyleInfoData"><table><?
|
|
if (@count($liens['participations'])>0) {
|
|
foreach ($liens['participations'] as $i=>$lien) {
|
|
if ($lien['Actif']==0) {
|
|
$font1='<font color="gray"><i>';
|
|
$font2='</i></font>';
|
|
} else
|
|
$font1=$font2='';
|
|
?><tr><td class="StyleInfoData" width="100"><?
|
|
echo $font1;
|
|
if ($lien['Pmin']*1>0) echo $lien['Pmin'].' %';
|
|
elseif ($lien['MajMin']=='+') echo 'major.';
|
|
elseif ($lien['MajMin']=='-') echo 'minor.';
|
|
elseif ($lien['MajMin']=='C') echo 'major.';
|
|
elseif ($lien['MajMin']=='S') echo 'minor.';
|
|
else echo ' ';
|
|
echo $font2;?></td>
|
|
<td class="StyleInfoLib" width="300"><?
|
|
echo $font1;
|
|
echo utf8_decode($lien['RaisonSociale']);
|
|
echo $font2;
|
|
?></td>
|
|
<td class="StyleInfoData" width="150"><?
|
|
echo $font1;
|
|
if ( $lien['Siren']<>'' && $lien['Siren']<>0) {
|
|
echo 'Siren <a href="./?page=identite&siret='. $lien['Siren'] .'">'. $lien['Siren'].'</a>';
|
|
}
|
|
else ' ';
|
|
|
|
if ($lien['Pays']<>'France') echo '<b>'.utf8_decode($lien['Pays']);
|
|
echo $font2;?></b></td>
|
|
</tr>
|
|
<? }
|
|
} else { ?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="550" colspan="2" class="StyleInfoData">Aucune participation référencée par nos services</td>
|
|
</tr>
|
|
<? } ?>
|
|
<tr>
|
|
<td colspan="3"> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|