Michael RICOIS e67b99500b Merge
2012-06-25 08:32:16 +00:00

136 lines
3.6 KiB
PHTML

<div id="center">
<h1>LISTE DES &Eacute;TABLISSEMNTS</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>
<?php
if ($this->actif == -1 && is_array($this->etabs) && count($this->etabs)>0){
?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" class="StyleInfoData">
L'entreprise à <?=$this->nbEtabActif?> établissement<?php if ($this->nbEtabActif>0) echo 's';?> actif<?php if ($this->nbEtabActif>0) echo 's';?>
et <?=$this->nbEtabRadie?> établissement<?php if ($this->nbEtabRadie>0) echo 's';?> radié<?php if ($this->nbEtabRadie>0) echo 's';?>.
</td>
</tr>
<?php } ?>
<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="<?=$this->url(array(
'action' => 'etablissements',
'siret' => $this->siret,
'id' => $this->id,
));?>">
<select name="actif">
<option value="-1"<?=($this->actif==-1)? ' selected' : '';?>>Tous</option>
<option value="1"<?=($this->actif==1)? ' selected' : '';?>>Actif</option>
<option value="0"<?=($this->actif==0)? ' selected' : '';?>>Inactif</option>
</select>
<input type="submit" name="selection" value="Ok">
</form>
</td>
</tr>
</table>
</div>
<h2>&Eacute;tablissements</h2>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<table>
<?php
if (count($this->etabs)>0)
{
foreach ($this->etabs as $etab)
{
if ($etab->Siege==1) $type = 'siège ';
else $type = 'établ. ';
if ($etab->Actif==1) $type.= 'actif';
else $type.= 'inactif';
if(intval($etab->Nic)==0 || intval($etab->Nic)>=99990) $type.=' provisoire';
$href = $this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $this->siren.$etab->Nic,
'id' => $this->id,
));
?>
<tr>
<td class="StyleInfoData" width="30">
<b><a title="Voir la fiche d'identité" href="<?=$href?>"><?=$etab->Nic?></a></b>
</td>
<td class="StyleInfoData" width="80"><?=$type?></td>
<td class="StyleInfoData" width="190">
<?php
if ($etab->Enseigne!='') {
?>
<b><?=$etab->Enseigne?></b><br/>
<?php
}
?>
<?=$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&eacute;l : '.$etab->Tel.'</i>&nbsp;&nbsp;&nbsp;';
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 && !empty($etab->EffEtTrLib) && !empty($etab->EffEtTr) && !in_array($etab->EffEtTr, array('N/C', 'NN', 0)) ){
?>
<br/><i><?=$etab->EffEtTrLib?></i>
<?php
}
?>
</td>
</tr>
<?php
}
}
?>
</table>
</td>
</tr>
<?php if($this->hasPrefCarte){?>
<tr>
<td align="center" colspan="3">
<?=$this->action('carte', 'identite', null, array('siret'=>$this->siret, 'id'=>$this->id, 'actif'=>$this->actif) )?>
</td>
</tr>
<?php }?>
</table>
</div>
<?php if (empty($this->AutrePage)):?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php endif;?>
</div>