2011-08-22 15:19:52 +00:00

85 lines
2.4 KiB
PHTML

<div id="center">
<h1>LISTE DES &Eacute;V&Eacute;NEMENTS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">
Num&eacute;ro identifiant Siren
</td>
<td width="350" class="StyleInfoData">
<?=$this->SirenTexte($this->siren)?>
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array(
'source' => 'insee',
'siret' => $this->siret
))?>
</td>
</tr>
</table>
</div>
<h2>&Eacute;v&eacute;nements INSEE</h2>
<div class="paragraph">
<table>
<?php
if (count($this->evens)>0) {
foreach ($this->evens as $i=>$even)
{
if ($even->Siege==1) $type='siège';
else $type='établissement';
$lien = '<a title="Voir la fiche d\'identité" href="'.$this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $this->siren.$even->Nic,
'id' => $this->id,
)).'">';
$lien2 = '<a title="Voir la fiche d\'identité" href="'.$this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $even->SiretAss,
)).'">';
?>
<tr>
<td width="30">&nbsp;</td>
<td class="StyleInfoLib" width="60" valign="top">
<?=WDate::dateT('Ymd','d/m/Y',$even->DateInfo)?>
</td>
<td class="StyleInfoData" width="480">
<b><?=$even->EvenLib?></b>&nbsp;<i> - NIC <?=$lien.$even->Nic.'</a>'?>
le <?=WDate::dateT('Ymd','d/m/Y',$even->EvenDate)?></i>
<?php
if (trim($even->EvenLibDet)<>'')
echo '<br/>'.str_replace(', ','<br/>', $even->EvenLibDet);
if ($even->SiretAss*1<>0 && $even->TypeSiretAss<>'')
echo '<br/>Siret du '.$even->TypeSiretAss.' : '.$lien2.substr($even->SiretAss,0,9).' '.substr($even->SiretAss,9,5).'</a>';
elseif ($even->SiretAss*1<>0 && $even->TypeSiretAss=='')
echo '<br/>Siret associ&eacute; : '.$lien2.substr($even->SiretAss,0,9).' '.substr($even->SiretAss,9,5).'</a>';
?>
</td>
</tr>
<?php
}
} elseif ( count($evens)==0 ) {
?>
<tr>
<td class="StyleInfoData" width="580">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Aucun &eacute;v&egrave;nement n\'est pr&eacute;sent dans notre base
</td>
</tr>';
<?php }?>
</table>
</div>
</div>