extranet/www/pages/evenements.php

91 lines
2.7 KiB
PHP
Raw Normal View History

<?php
2010-04-27 08:09:23 +00:00
if (!page_checkParams()) die('Paramètres incorrects !');
2009-05-20 15:49:08 +00:00
require_once 'partenaires/classMTva.php';
require_once 'partenaires/classMMap.php';
require_once 'common/dates.php';
require_once 'scoresws/scoresws.php';
2009-03-05 16:19:38 +00:00
$mil=false;
2009-05-20 15:49:08 +00:00
?>
<div id="center">
<h1 class="titre">LISTE DES &Eacute;V&Eacute;NEMENTS</h1>
<table>
<tr>
2009-05-20 15:49:08 +00:00
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?></td>
</tr>
<tr>
2009-05-20 15:49:08 +00:00
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
</tr>
</table>
2009-11-05 13:49:08 +00:00
<h2>&Eacute;v&eacute;nements INSEE</h2>
<table>
2009-05-20 15:49:08 +00:00
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?php
$evens = scoresws_evenements($siret, $siren, $idEntreprise);
2009-05-20 15:49:08 +00:00
?>
<table>
<?php
if (is_array($evens) && count($evens)>0) {
foreach ($evens as $i=>$even)
{
if ($even['Siege']==1) $type='siège';
else $type='établissement';
$lien='<a title="Voir la fiche d\'identité" href="/?page=identite&siret='.$siren.$even['Nic'].'&idEntreprise='.$idEntreprise.'">';
$lien2='<a title="Voir la fiche d\'identité" href="/?page=identite&siret='.$even['SiretAss'].'&idEntreprise='.$idEntreprise.'">';
?>
<tr>
<td class="StyleInfoLib" width="60"><?=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>
<?
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>
<?
}
} elseif (is_array($evens) && 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
} elseif ($evens===false) {
2009-05-20 15:49:08 +00:00
}
?>
</table>
2009-07-21 07:17:54 +00:00
<?php
2011-02-21 17:09:22 +00:00
require_once 'export/genexport.php';
2009-05-20 15:49:08 +00:00
?>
2009-07-21 07:17:54 +00:00
</td>
2009-05-20 15:49:08 +00:00
</tr>
<tr>
<td width="30">&nbsp;</td>
2009-05-22 09:53:48 +00:00
<td colspan="3" width="550" class="StyleInfoData">
2009-07-21 07:17:54 +00:00
<?php
2009-05-20 15:49:08 +00:00
require_once 'surveillance/surveillance.php';
echo getSurveillance('insee', $siret);
2009-05-20 15:49:08 +00:00
?>
</td>
</tr>
</table>
2010-04-12 14:49:55 +00:00
<p class="confidentiel blockh2">
<?php
require_once 'cgu/cgu.php';
echo afficheCgu();
?>
</p>
</div>