133 lines
4.4 KiB
PHP
133 lines
4.4 KiB
PHP
<?if (!$_SESSION['connected'])
|
|
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
|
/*elseif ($_SESSION['tabInfo']['login']<>'ylenaour') {
|
|
echo ('Vous n\'avez pas les droits nécessaires pour utiliser cette fonctionnalité');
|
|
$siret=$_REQUEST['siret'];
|
|
}*/
|
|
else
|
|
{
|
|
$tabInfo = $_SESSION['tabInfo'];
|
|
$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['idEntreprise']) && $_REQUEST['idEntreprise']*1<>0) $idCom=$_REQUEST['idEntreprise'];
|
|
else $idCom=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']));
|
|
|
|
require_once 'index_auth.php';
|
|
|
|
try {
|
|
$O = $client->getListeConventions($siren);
|
|
$conventions=$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="4"><img src="./img/rub_convcoll.png" width="577" height="36" /></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="550" colspan="3"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4"><img src="./img/srub_convcoll.png" width="576" height="27" /></td>
|
|
</tr>
|
|
<?
|
|
/* if ($idCom) {
|
|
|
|
foreach ($annonces as $ann) {
|
|
if ($ann['id']==$_REQUEST['id']) {/*'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'],*/
|
|
if (count($conventions)>0) {
|
|
/** Affichage de la liste des conventions collectives
|
|
**/
|
|
|
|
/*
|
|
[] => Industries metallurgiques OETAM (Region parisienne)
|
|
[infoCC] => Industries metallurgiques OETAM (Region parisienne)
|
|
|
|
*/
|
|
foreach ($conventions as $i=>$conv) {?>
|
|
<tr>
|
|
<td width="580" colspan="4">
|
|
<table>
|
|
<tr>
|
|
<td width="20"> </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="350" class="StyleInfoData"><b><?=$conv['nomCC']?></b><?
|
|
//if (trim($conv['nomCC'])<>trim($conv['infoCC'])) echo '<br/><font size="1">'.$conv['infoCC'].'</font>';?>
|
|
</td>
|
|
<td width="200" class="StyleInfoData"><font size="1"><i>Journal Officiel<?
|
|
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"> </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>
|
|
<pre>
|
|
<?
|
|
//print_r($annonces);
|
|
?>
|
|
</pre>
|