127 lines
4.7 KiB
PHP
127 lines
4.7 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 !');
|
|
|
|
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
|
$siren=substr($siret,0,9);
|
|
|
|
if (isset($_REQUEST['idan']) && $_REQUEST['idan']*1<>0) $idCom=$_REQUEST['idan'];
|
|
else $idCom=false;
|
|
|
|
require_once 'partenaires/classMTva.php';
|
|
require_once 'partenaires/classMMap.php';
|
|
require_once 'partenaires/classMCoface.php';
|
|
require_once 'common/dates.php';
|
|
|
|
$tabInfo = $_SESSION['tabInfo'];
|
|
|
|
try {
|
|
$O = $client->getInfosReg($siren, $idCom);
|
|
$annonces=$O['result'];
|
|
} catch (SoapFault $fault) {
|
|
require_once 'soaperror.php';
|
|
processSoapFault($client,$fault,$tabInfo);
|
|
die();
|
|
}
|
|
$raisonSociale=$tabInfo['entrep']['raisonSociale'];
|
|
?>
|
|
<table width="580" border="0" align="left" bgcolor="#FFFFFF" id="center">
|
|
<tr>
|
|
<td colspan="4"><h1>INFORMATIONS REGLEMENTEES</h1></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="200" colspan="2" 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" colspan="2" class="StyleInfoLib">Raison Sociale</td>
|
|
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="100"> </td>
|
|
<td width="100"> </td>
|
|
<td width="350"> </td>
|
|
</tr> <tr>
|
|
<td colspan="4"><h2>Informations réglementées <span style="font-weight:normal; font-size:x-small">(sources diffuseurs: BusinessWire / Hugin / actunews / DI Release)</span></h2></td>
|
|
</tr>
|
|
<?
|
|
if ($idCom) {
|
|
|
|
foreach ($annonces as $ann) {
|
|
if ($ann['id']==$_REQUEST['idan']) {/*'id' =>$ann['id'],
|
|
'' =>$ann['source'],
|
|
'DateParution' =>$ann['DateParution'],
|
|
'raisonSociale' =>utf8_encode($ann['raisonSociale']),
|
|
'titre' =>utf8_encode($ann['titre']),
|
|
'communique' =>utf8_encode($ann['communique']),
|
|
'communiqueHtml'=>utf8_encode($ann['communiqueHtml']),
|
|
'pj' =>$ann['pj'],
|
|
'url' =>$ann['url'],*/
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="550" colspan="3" class="StyleInfoData">Information <?=$ann['source']?> du <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution'])?>. Entrée en base S&D : <?=WDate::dateT('Y-m-d','d/m/Y',$ann['dateInsertionSD'])?></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="550" colspan="3" class="StyleInfoLib"><b><?=utf8_decode($ann['titre'])?></b></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<?
|
|
//$texte=preg_replace("/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/", '<a href="/?page=identite&siret=$1" title="Voir la fiche d\'identité de cette entreprise">$1</a>', $ann['texteAnnonce']);
|
|
//$texte=preg_replace("/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/", '<a href="/?page=identite&siret=$1" title="Voir la fiche d\'identité de cette entreprise">$1</a>', $ann['texteAnnonce']);
|
|
$texte=preg_replace_callback("/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/", replace_siren, utf8_decode($ann['communique']));//communiqueHtml
|
|
/*if (preg_match('/<body(?:.*|)>(.*)<\/body>/UiS', $texte, $matches))
|
|
$texte=$matches[1];*/
|
|
?><td width="550" colspan="3"><?=$texte?></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" align="center" class="StyleInfoData"><a href="Javascript:history.back()">Revenir à la liste des annonces</a></td>
|
|
</tr>
|
|
<?
|
|
}
|
|
}
|
|
|
|
} else {
|
|
if (count($annonces)>0) {
|
|
/** Affichage de la liste des infos reg
|
|
**/
|
|
foreach ($annonces as $i=>$ann) {?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="100" class="StyleInfoLib">Le <?=WDate::dateT('Y-m-d','d/m/Y',$ann['DateParution'])?></td>
|
|
<td width="450" colspan="2" class="StyleInfoData"><a href="/?page=infosreg&siret=<?=$siret?>&idan=<?=$ann['id']?>"><?=utf8_decode($ann['titre'])?></a></td>
|
|
</tr>
|
|
<? }
|
|
} else {
|
|
/** Aucune Info Réglementée pour cette entreprise
|
|
**/
|
|
?>
|
|
<tr>
|
|
<td width="30"> </td>
|
|
<td width="100" class="StyleInfoLib"> </td>
|
|
<td width="450" colspan="2" class="StyleInfoData">Néant</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
</tr>
|
|
<?
|
|
}
|
|
}
|
|
?>
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
</tr>
|
|
</table>
|