production/Vue/Ajaxfiltreadherentparcollege/index.php
2025-12-01 16:12:12 +00:00

93 lines
4.1 KiB
PHP
Executable File

<?php
$codeTypeAvenant = $_SESSION['codeTypeAvenant_C'];
$estsupprimable_0 = ($codeTypeAvenant=="AFN" or $codeTypeAvenant=="REN");
$superUser = $_SESSION['superUser'];
$nbreTotal = count($adherents);
if($nbreTotal < 10){
$nbreTotal = '0'.$nbreTotal;
}else{
$nbreTotal = format_N($nbreTotal);
}
?>
<div id="div_liste_adherent" style=" margin-top:10px;">
<input type="hidden" id="total" value="<?= $nbreTotal; ?>">
<table style="margin: auto" class="table-responsive">
<tbody>
<tr>
<td width="13%" style='font-weight:bold'> <?= _("Filtre par Collège")."&nbsp;&nbsp;" ?> </td>
<td >
<select name="idCollegePolice" id="idCollegePolice" class="form-control selectpicker" data-live-search="true" onchange="filtreadherentparcollege();" style="font-size:12pt; height:30px;">
<?php liste_options_consultation($collegesPolice, $_SESSION['idCollegePolice']); ?>
</select>
</td>
</tr>
<tr>
<td colspan="2" height="8"></td>
</tr>
</tbody>
</table>
<table style="margin: auto" class="table-responsive">
<tbody>
<td><input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbreTotal" name="nbreTotal" value="Nombre de ligne : <?= $nbreTotal; ?>" readonly> </td>
</tbody>
</table>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center' width="8%"> <?= _("Numéro") ?> </th>
<th> <?= _("Nom") ?> </th>
<th> <?= _("Prénoms") ?> </th>
<th style='text-align:center'> <?= _("Produit") ?> </th>
<th style='text-align:center'> <?= _("Collège") ?> </th>
<th style='text-align:center'>Entrée</th>
<th style='text-align:center'> <?= _("Sortie") ?> </th>
<th width="5%" style='text-align:center'> <?= _("Archiver") ?> </th>
<th style='text-align:center'> <?= _("Suppr") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($adherents as $adherent):
$idAdherent=$adherent['id'];
$noAdh=$this->nettoyer($adherent['numeroAdherent']);
$garantieArchive=$this->nettoyer($adherent['garantieArchive']);
$primeArchive=$this->nettoyer($adherent['primeArchive']);
$estsupprimable = ($primeArchive=="0");
?>
<tr onclick="javascript:selectionner_adherent(<?= $idAdherent ?>,'<?= $noAdh ?>');" ondblclick="javascript:afficher_adherent_id();" valign="top">
<td align='center'><a href="javascript:selectionner_adherent(<?= $idAdherent ?>,'<?= $noAdh ?>'); afficher_adherent_id();"><span style="font-size:10pt; color:blue;background-color:#eeeeee; border:1px solid #000; border-radius:3px;"><?= $noAdh ?></span></a></td>
<!-- <td align="center"> <input type="button" value="<?= $noAdh ?>" onClick="javascript:selectionner_adherent(<?= $idAdherent ?>,'<?= $noAdh ?>'); afficher_adherent_id();"> </td>-->
<td><?= $this->nettoyer($adherent['nom']) ?></td>
<td><?= $this->nettoyer($adherent['prenoms']) ?></td>
<td align='center'><?= $this->nettoyer($adherent['codeProduit']) ?></td>
<td><?= $this->nettoyer($adherent['libelleCollege']) ?></td>
<td align='center'><?= dateLang($this->nettoyer($adherent['dateEntree'])) ?></td>
<td align='center'><?= dateLang($this->nettoyer($adherent['dateSortie'])) ?></td>
<?php if($estsupprimable==false): ?>
<?php if ($superUser=="1"): ?>
<td> <input class = "form-control btn btn-warning" type="button" value="<?= _("Désarchiver") ?>" onClick="javascript:de_archiver_adherent('<?= $idAdherent ?>');"></td>
<?php else : ?>
<td> </td>
<?php endif; ?>
<td> </td>
<?php else: ?>
<td> <input class = "form-control btn btn-info" type="button" value="<?= _("Archiver") ?>" onClick="javascript:archiver_adherent('<?= $idAdherent ?>');"></td>
<td align='center'> <input type="button" value="X" onClick="javascript:supprimer_adherent_id('<?= $idAdherent ?>');"></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>