2009-07-20 16:17:33 +00:00
< ?
2010-04-27 08:09:23 +00:00
if ( ! page_checkParams ()) die ( 'Paramètres incorrects !' );
2009-07-20 16:17:33 +00:00
require_once 'partenaires/classMTva.php' ;
require_once 'partenaires/classMMap.php' ;
require_once 'common/dates.php' ;
2010-05-18 15:46:45 +00:00
require_once 'scoresws/scoresws.php' ;
2009-03-05 16:19:38 +00:00
2011-03-24 09:54:16 +00:00
isset ( $_REQUEST [ 'actif' ]) ? $actif = $_REQUEST [ 'actif' ] : $actif = - 1 ;
isset ( $_REQUEST [ 'dep' ]) ? $dep = $_REQUEST [ 'dep' ] : $dep = 0 ;
2010-08-11 15:30:07 +00:00
2009-08-27 07:28:00 +00:00
$raisonSociale = $_SESSION [ 'tabInfo' ][ 'entrep' ][ 'raisonSociale' ];
2011-03-24 09:54:16 +00:00
$etabs = scoresws_etablissements ( $siret , $siren , $idEntreprise , $dep , $actif );
2009-09-14 15:47:52 +00:00
?>
2009-08-27 07:28:00 +00:00
< div id = " center " >
< h1 class = " titre " > LISTE DES & Eacute ; TABLISSEMENTS </ h1 >
2009-07-20 16:17:33 +00:00
2009-08-27 07:28:00 +00:00
< table >
< tr >
< 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 >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Raison Sociale </ td >
< td width = " 350 " class = " StyleInfoData " >< ? = $raisonSociale ?> </td>
</ tr >
2011-08-23 10:23:27 +00:00
< ? php
if ( $actif == - 1 && is_array ( $etabs ) && count ( $etabs ) > 0 ){
$nbEtabActif = 0 ;
$nbEtabRadie = 0 ;
foreach ( $etabs as $i => $etab ) {
if ( $etab [ 'Actif' ] == 1 ){
$nbEtabActif ++ ;
} else {
$nbEtabRadie ++ ;
}
}
?>
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td colspan = " 2 " class = " StyleInfoData " >
L 'entreprise à <?=$nbEtabActif?> établissement<?php if ($nbEtabActif>0) echo ' s ';?> actif<?php if ($nbEtabActif>0) echo ' s ' ; ?>
et < ? = $nbEtabRadie ?> établissement<?php if ($nbEtabRadie>0) echo 's';?> radié<?php if ($nbEtabRadie>0) echo 's';?>.
</ td >
</ tr >
< ? php } ?>
2011-03-24 09:54:16 +00:00
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td width = " 200 " class = " StyleInfoLib " > Actif / Inactif </ td >
< td width = " 350 " class = " StyleInfoData " >
< form name = " options " method = " post " action = " <?= $_SERVER['REQUEST_URI'] ?> " >
< select name = " actif " >
2011-10-06 08:50:00 +00:00
< option value = " -1 " < ? php if ( $actif ==- 1 ) echo " selected " ; ?> >Tous</option>
< option value = " 1 " < ? php if ( $actif == 1 ) echo " selected " ; ?> >Actif</option>
< option value = " " < ? php if ( $actif == 0 ) echo " selected " ; ?> >Inactif</option>
2011-03-24 09:54:16 +00:00
</ select >
< input type = " submit " name = " selection " value = " Ok " >
</ form >
</ td >
</ tr >
2009-08-27 07:28:00 +00:00
</ table >
< h2 >& Eacute ; tablissements </ h2 >
< table >
< tr >
< td width = " 30 " >& nbsp ; </ td >
< td colspan = " 2 " width = " 550 " class = " StyleInfoData " >
< table >
< ? php
2011-03-24 09:54:16 +00:00
if ( is_array ( $etabs ) && count ( $etabs ) > 0 )
2009-08-27 07:28:00 +00:00
{
2011-03-24 09:54:16 +00:00
foreach ( $etabs as $i => $etab )
{
if ( $etab [ 'Siege' ] == 1 ) $type = 'siège ' ;
else $type = 'établ. ' ;
if ( $etab [ 'Actif' ] == 1 ) $type .= 'actif' ;
else $type .= 'inactif' ;
if ( $etab [ 'Nic' ] * 1 == 0 || $etab [ 'Nic' ] * 1 >= 99990 ) $type .= ' provisoire' ;
$lien = '<a title="Voir la fiche d\'identité" href="/?page=identite&siret=' . $siren . $etab [ 'Nic' ] . '&idEntreprise=' . $idEntreprise . '">' ;
?>
< tr >
< td class = " StyleInfoData " width = " 30 " >
< b >< a title = " Voir la fiche d'identité " href = " /?page=identite&siret=<?= $siren . $etab['Nic'] ?>&idEntreprise=<?= $idEntreprise ?> " >< ? = $lien . $etab [ 'Nic' ] ?> </a></b>
</ td >
< td class = " StyleInfoData " width = " 80 " >< ? = $type ?> </td>
< td class = " StyleInfoData " width = " 190 " >
2010-08-11 15:12:45 +00:00
< ? php
2011-03-24 09:54:16 +00:00
if ( $etab [ 'Enseigne' ] != '' ) {
2010-08-11 15:12:45 +00:00
?>
2011-03-24 09:54:16 +00:00
< b >< ? = $etab [ 'Enseigne' ] ?> </b><br/>
2010-08-11 15:12:45 +00:00
< ? php
}
?>
2011-03-24 09:54:16 +00:00
< ? = $etab [ 'Adresse' ] ?> <br/>
< ? php
if ( $etab [ 'Adresse2' ] != '' ) { ?>
< ? = $etab [ 'Adresse2' ] ?> <br/>
< ? php
}
?>
< b >< ? = $etab [ 'CP' ] ?> <?=$etab['Ville']?></b>
< ? php
if ( $etab [ 'Tel' ] != '' ) echo '<br/><i>Tél : ' . $etab [ 'Tel' ] . '</i> ' ;
if ( $etab [ 'Fax' ] != '' ) echo '<br/><i>Fax : ' . $etab [ 'Fax' ] . '</i>' ;
?>
</ td >
< td class = " StyleInfoData " width = " 260 " >
< ? = $etab [ 'NafEtab' ] . ' : ' . $etab [ 'NafEtabLib' ] ?>
< ? php
if ( $etab [ 'Actif' ] == 1 &&
isset ( $etab [ 'EffEtTrLib' ]) &&
isset ( $etab [ 'EffEtTr' ]) &&
! in_array ( $etab [ 'EffEtTr' ], array ( 'N/C' , 'NN' , 0 )) ){
?>
< br />< i >< ? = $etab [ 'EffEtTrLib' ] ?> </i>
< ? php
}
?>
</ td >
</ tr >
< ? php
}
2009-08-27 07:28:00 +00:00
}
2009-09-14 15:40:12 +00:00
?>
</ table >
</ td >
</ tr >
< tr >
2010-03-18 16:27:18 +00:00
< td width = " 30 " >& nbsp ; </ td >
< td colspan = " 2 " width = " 506 " class = " StyleInfoData " >
2011-03-24 09:54:16 +00:00
< ? php
if ( count ( $etabs ) == 0 ) {
?>
Aucun & eacute ; tablissement n ' est pr & eacute ; sent dans notre base
< ? php
} elseif ( hasPref ( 'cartes' )) {
$iframe_href = '/?page=carte&siret=' . $siren . '&actif=' . $actif ;
?>
< iframe src = " <?= $iframe_href ?> " width = 506 height = 505 marginheight = " 1 " marginwidth = " 1 " scrolling = " No " frameborder = 0 ></ iframe >
< ? php
}
?>
2010-03-18 16:27:18 +00:00
</ td >
2009-08-27 07:28:00 +00:00
</ tr >
2009-09-14 15:40:12 +00:00
2009-08-27 07:28:00 +00:00
</ table >
2010-04-12 14:49:55 +00:00
< p class = " confidentiel blockh2 " >
< ? php
require_once 'cgu/cgu.php' ;
echo afficheCgu ();
?>
</ p >
2009-08-27 07:28:00 +00:00
</ div >
2010-03-18 16:27:18 +00:00
< ? php
2011-02-21 17:09:22 +00:00
require_once 'export/genexport.php' ;
2009-03-05 16:19:38 +00:00
?>