79 lines
3.9 KiB
PHP
Executable File
79 lines
3.9 KiB
PHP
Executable File
<?php
|
|
|
|
$idBeneficiaire = $beneficiaire['id'];
|
|
|
|
$datejour = date('Y-m-d');
|
|
|
|
|
|
$estcouvert = ($beneficiaire['dateEcheancePolice']>=$datejour) ? "1" : "0";
|
|
$estsorti = "0";
|
|
|
|
$dateSortieBeneficiaire = $beneficiaire['dateSortieBeneficiaire'];
|
|
|
|
if( $dateSortieBeneficiaire > "2000-01-01")
|
|
{
|
|
$estsorti = ($dateSortieBeneficiaire<=$datejour)? "1" : "0";
|
|
$estcouvert = ($estcouvert && ($dateSortieBeneficiaire>$datejour)) ? "1" : "0";
|
|
}
|
|
|
|
$dateEffetCouvert = $beneficiaire['dateEffetCouvert'];
|
|
$codeEtatBeneficiaire = $beneficiaire['codeEtatBeneficiaire'];
|
|
$etatbeneficiaireEng = $beneficiaire['etatbeneficiaireEng'];
|
|
$etatbeneficiaire = $beneficiaire['etatbeneficiaire'];
|
|
?>
|
|
|
|
<input class="sr-only" id="estcouvert" name="estcouvert" type="text" value= "<?= $estcouvert ?>" >
|
|
<input class="sr-only" id="estsorti" name="estsorti" type="text" value= "<?= $estsorti ?>" >
|
|
|
|
|
|
<?php if($idBeneficiaire > "0"): ?>
|
|
<table class="table table-condensed" style="font-size:10pt; padding:0px; height:30px;">
|
|
<tbody>
|
|
<tr>
|
|
<td width="15%"> <?= _("Couverture") ?> </td>
|
|
<?php if ($estcouvert=="1") : ?>
|
|
<td width="25%" align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= dateLang($this->nettoyer($beneficiaire['dateEntreeBeneficiaire']), $_SESSION['p_lang']).' - '.dateLang($beneficiaire['dateEcheancePolice'], $_SESSION['p_lang']) ?> </td>
|
|
<?php else: ?>
|
|
<td width="25%" align="center" style='font-size:10pt; background-color:red;color:white;'> <?= dateLang($this->nettoyer($beneficiaire['dateEntreeBeneficiaire']), $_SESSION['p_lang']).' - '.dateLang($beneficiaire['dateEcheancePolice'], $_SESSION['p_lang']) ?> </td>
|
|
<?php endif; ?>
|
|
|
|
<td align="center" width="11%"> <?= _("Naissance") ?> </td>
|
|
<?php if ($estcouvert=="1") : ?>
|
|
<td colspan="3" align="center" style='font-size:10pt; background-color:blue;color:white;'><?= dateLang($this->nettoyer($beneficiaire['dateNaissance']), $_SESSION['p_lang']).' => '.$beneficiaire['ageBeneficiaire'].' '. _('ans') ?></td>
|
|
<?php else: ?>
|
|
<td colspan="3" align="center" style='font-size:10pt; background-color:red;color:white;'> <?= dateLang($this->nettoyer($beneficiaire['dateNaissance']), $_SESSION['p_lang']).' => '.$beneficiaire['ageBeneficiaire'].' '. _('ans') ?> </td>
|
|
<?php endif; ?>
|
|
|
|
<td width="8%" align="center"> <?= _("Etat") ?> </td>
|
|
<?php if ($dateEffetCouvert=="0") : ?>
|
|
<td width="12%" align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Non renouvelé") ?> </td>
|
|
<?php else: ?>
|
|
<?php if ($estcouvert=="1") : ?>
|
|
<?php if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US"): ?>
|
|
<?php if ($codeEtatBeneficiaire=="V"): ?>
|
|
<td width="12%" align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= $etatbeneficiaireEng ?> </td>
|
|
<?php else: ?>
|
|
<td width="12%" align="center" style='font-size:10pt; background-color:red;color:white;'> <?= $etatbeneficiaireEng ?> </td>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<?php if ($codeEtatBeneficiaire=="V"): ?>
|
|
<td width="12%" align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= $etatbeneficiaire ?> </td>
|
|
<?php else: ?>
|
|
<td width="12%"align="center" style='font-size:10pt; background-color:red;color:white;'> <?= $etatbeneficiaire ?> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php else: ?>
|
|
<?php if ($estsorti=="1"): ?>
|
|
<td width="12%" align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Retiré") ?> </td>
|
|
<?php else: ?>
|
|
<td width="12%" align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Expiré") ?> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
|