extranet/www/pages/conventions.php

136 lines
3.4 KiB
PHP
Raw Normal View History

<?php
2010-04-27 08:09:23 +00:00
if (!page_checkParams()) die('Paramètres incorrects !');
2009-04-01 12:45:45 +00:00
$tabInfo = $_SESSION['tabInfo'];
2010-04-27 08:09:23 +00:00
if (isset($_REQUEST['idEntreprise']) && $_REQUEST['idEntreprise']*1<>0)
$idCom=$_REQUEST['idEntreprise'];
else
$idCom=false;
require_once 'cache/cache.php';
2009-07-20 16:17:33 +00:00
require_once 'partenaires/classMTva.php';
require_once 'partenaires/classMMap.php';
require_once 'partenaires/classMCoface.php';
require_once 'common/dates.php';
if (($siret*1)==0 || ($siren*1)<100){ $fileName = $page2.'-'.$idEntreprise;
}else{ $fileName = $page2.'-'.$siret; }
cache_filename($fileName);
if( cache_exist() && !hasModeEdition() ){
$conventions = cache_get('conventions');
}else{
try {
$O = $client->getListeConventions($siren);
$conventions = $O['result'];
cache_delete();
cache_add('conventions', $conventions);
} catch (SoapFault $fault) {
require_once 'soaperror.php';
processSoapFault($client,$fault,$tabInfo);
die();
}
}
?>
<div id="center">
<h1 class="titre">CONVENTIONS COLLECTIVES APPLICABLES</h1>
<table border="0" align="left">
<tr>
<td width="30">&nbsp;</td>
<td width="200" colspan="2" 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>
<td width="30">&nbsp;</td>
<td width="200" colspan="2" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="3">&nbsp;</td>
</tr>
</table>
2009-07-20 16:17:33 +00:00
<h2>Conventions collectives</h2>
<table>
<?
2009-07-20 16:17:33 +00:00
if (count($conventions)>0)
{
foreach ($conventions as $i=>$conv)
{
?>
<tr>
<td colspan="4">
<table>
<tr>
<td width="20">&nbsp;</td>
<td width="90" class="StyleInfoData"><u><a href="http://www.legifrance.gouv.fr/rechConvColl.do?champActivite=&champIDCC=&champNumeroBrochure=<?=substr($conv['idCC'],0,4)?>&bouton=Rechercher" target="_blank">Brochure <?=substr($conv['idCC'],0,4)?></a></u></td>
<td width="300" class="StyleInfoData"><b><?=$conv['nomCC']?></b>
</td>
<td class="StyleInfoData"><font size="1"><i>Journal Officiel
<?php
if (trim($conv['dateCC'])<>'') echo ', '.$conv['dateCC'];
if (trim($conv['nbPageCC'])*1>0) echo ', '.$conv['nbPageCC'].' pages.';
if (trim($conv['isbnCC'])<>'') echo '<br/>ISBN '.$conv['isbnCC'];
?>
</i></font></td>
</tr>
</table>
<hr width="80%"/>
</td>
</tr>
<?
}
} else {
/** Aucune Info Réglementée pour cette entreprise **/
?>
<tr>
<td width="30">&nbsp;</td>
<td width="100" class="StyleInfoLib">&nbsp;</td>
<td colspan="2" class="StyleInfoData">N&eacute;ant</td>
</tr>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<?
}
?>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
</table>
2010-04-12 14:49:55 +00:00
<?php
2010-05-24 14:23:31 +00:00
// --------------------------------------------------------------------------- //
// Export
// --------------------------------------------------------------------------- //
require_once 'export.php';
if (isset($siret) == true) {
$fileName = $page.'-'.$siret;
} else {
$fileName = $page.'-'.$idEntreprise;
}
$parseTab = new tabExport;
$parseTab->tab = array($conventions);
$array2csv = new ExportCSV;
$array2csv->records = $parseTab->convertTable();
$array2csv->writeCSV($fileName);
$array2xml = new ExportXML;
$array2xml->rootName = $page;
$array2xml->defaultTagName = substr($page, 0 , -1);
$array2xml->records = $conventions;
$array2xml->writeXML($fileName);
2010-04-12 14:49:55 +00:00
require_once 'cgu/cgu.php';
2010-05-24 14:23:31 +00:00
print '<p class="confidentiel blockh2">'.afficheCgu();
2010-04-12 14:49:55 +00:00
?>
2010-05-24 14:23:31 +00:00
</p>
</div>