production/Vue/Ajaxtrancheage/affichertrancheage.php
2025-12-01 16:12:12 +00:00

71 lines
2.4 KiB
PHP
Executable File

<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
<thead>
<tr>
<th rowspan="2" style='text-align:center' width="7%"> <?= _("No") ?> </th>
<th rowspan="2" style='text-align:center' width="10%"> <?= _("Code") ?> </th>
<th rowspan="2" style='text-align:center' width="39%"> <?= _("Age Minimum") ?> </th>
<th style='text-align:center' width="39%"> <?= _("Age Maximum") ?> </th>
<th style='text-align:center' width="5%">
<button type="button" class="form-control btn btn-danger" onClick="javascript:vider_entete_trancheage();">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</th>
</tr>
<tr>
<th style='text-align:center' >
<INPUT title="" style='text-align:center; font-size:10pt; width:20%; margin:auto;' class="form-control" type="text" id="ageMax" NAME="ageMax" value="0" onkeyup="controle_numerique(this);" >
</th>
<th style='text-align:center'>
<button type="button" class="form-control btn btn-primary" onClick="javascript:ajouter_une_trancheage();">
<i class="fa fa-plus" aria-hidden="true"></i>
</button>
</th>
</tr>
<?php if (isset($_SESSION['messageTrancheAge']) && $_SESSION['messageTrancheAge']>' '): ?>
<tr>
<th style='text-align:center' colspan="4">
<div class="alert alert-info" style="height:30px; padding:5px;" >
<H4><?= $_SESSION['messageTrancheAge'] ?></H4>
</div>
</th>
</tr>
<?php endif; ?>
</thead>
<tbody>
<?php
$i = 0;
foreach ($tranhesage as $tranheage):
$idTrancheage = $tranheage['idTrancheage'];
$maxAgeMax = $tranheage['maxAgeMax'];
$ageMax = $tranheage['ageMax'];
$i++;
?>
<tr valign="top">
<td align='center'><?= $i; ?></td>
<td align='center'><?= $this->nettoyer($tranheage['codeTrancheAge']) ?></td>
<td align='center'><?= $this->nettoyer($tranheage['ageMin']) ?></td>
<td align='center'><?= $this->nettoyer($tranheage['ageMax']) ?></td>
<td>
<?php if($ageMax==$maxAgeMax): ?>
<button type="button" class="form-control btn btn-danger" onClick="javascript:supprimer_derniere_tranche_age('<?=$idTrancheage?>');">
<i class="fa fa-minus" aria-hidden="true"></i>
</button>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php
$_SESSION['messageTrancheAge'] = '';
?>