112 lines
4.3 KiB
PHP
Executable File
112 lines
4.3 KiB
PHP
Executable File
<?php
|
|
$nbreTotal = count($tabjoursferiers);
|
|
if($nbreTotal < 10){
|
|
$nbreTotal = '0'.$nbreTotal;
|
|
}
|
|
|
|
if (est_anglophone()){
|
|
if($existeselection){
|
|
$libbouton = "Uncheck all";
|
|
}else{
|
|
$libbouton = "Check all";
|
|
}
|
|
}else{
|
|
if($existeselection){
|
|
$libbouton = "Décocher tous";
|
|
}else{
|
|
$libbouton = "Cocher tous";
|
|
}
|
|
}
|
|
|
|
?>
|
|
<table style="margin: auto; width:50%;" class="table-responsive">
|
|
<tbody>
|
|
<tr>
|
|
<td width="3%" align="center">Année</td>
|
|
<td width="7%" ><INPUT class="form-control" TYPE="number" min="2020" step="1" id="annee" NAME="annee" value="<?= date('Y'); ?>" onchange="afficheDonneesTableChoisie('Ajaxtblisterjoursferiers');"></td>
|
|
|
|
<td align="center" width="3%" > <?= _("Pays") ?> </td>
|
|
<td width="20%">
|
|
<SELECT onChange="afficheDonneesTableChoisie('Ajaxtblisterjoursferiers');" class="form-control" id="codePays" NAME="codePays">
|
|
<?php liste_options($pays,$_SESSION['codePaysSociete']); ?>
|
|
</SELECT>
|
|
</td>
|
|
</tr>
|
|
<tr style="height:20px;">
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="div_liste_jour">
|
|
<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="Lignes Total : <?= $nbreTotal; ?>" readonly> </td>
|
|
</tbody>
|
|
</table>
|
|
<input type="hidden" id="total" value="<?= $nbreTotal; ?>">
|
|
<input type="hidden" id="selectionne" value="<?= $existeselection ? 'true' : 'false'; ?>">
|
|
<table id="tableLister" class="table table-striped table-bordered table-hover table-condensed table-responsive">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center">ID</th>
|
|
<th class="text-center">Date</th>
|
|
<th class="text-center">Libellé</th>
|
|
<th class="text-center">
|
|
<button type="button" style="font-size:10pt; font-weight: bold; width:100%; background-color:#4caf50; color: white;" class="form-control btn" onclick="javascript:cocherDecocherTout($('#fichier_lister').val());" > <?= $libbouton; ?> </button>
|
|
</th>
|
|
<th class="text-center">Modifier</th>
|
|
<th class="text-center">Supprimer</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($tabjoursferiers as $v):
|
|
$idData = $this->nettoyer($v['id']);
|
|
|
|
if (est_anglophone()){
|
|
if($this->nettoyer($v['demiJournee'])=="1"){
|
|
$libelle = $this->nettoyer($v['libelleEng'])." (half day)";
|
|
}else{
|
|
$libelle = $this->nettoyer($v['libelleEng']);
|
|
}
|
|
|
|
}else{
|
|
if($this->nettoyer($v['demiJournee'])=="1"){
|
|
$libelle = $this->nettoyer($v['libelle'])." (demi-journée)";
|
|
}else{
|
|
$libelle = $this->nettoyer($v['libelle']);
|
|
}
|
|
}
|
|
$dateFerier = $this->nettoyer($v['dateFerier']);
|
|
$day = jour_fr(date('D', strtotime($dateFerier)));
|
|
$jour = date('d', strtotime($dateFerier));
|
|
$mois = mois_court_fr(date('F', strtotime($dateFerier)));
|
|
$ladate = $day." ".$jour."-".$mois."-".date('Y', strtotime($dateFerier));
|
|
?>
|
|
<tr valign="top">
|
|
<td class="text-center" width="5%"><?= $this->nettoyer($v['id']);; ?></td>
|
|
<td class="text-center" width="15%"><?= $ladate; ?></td>
|
|
<td class="text-left" width="55%"><?= $libelle; ?></td>
|
|
<td class="text-center" width="10%">
|
|
<?php
|
|
if($this->nettoyer($v['choix'] == '0')){
|
|
$check ='';
|
|
}
|
|
else{
|
|
$check = 'checked';
|
|
}
|
|
?>
|
|
<INPUT TYPE="checkbox" class="custom-control-input" style="width: 2rem;height: 2rem;" id="choix" NAME="choix" value="<?=(($this->nettoyer($v['choix'])==0)? 0 : 1);?>" onclick="if (this.checked) this.value=1; else this.value=0;cocherDecocherUn($('#fichier_lister').val(),<?= $idData; ?>);" <?= $check;?>>
|
|
</td>
|
|
<td class="text-center" width="10%">
|
|
<button style="width:100%" class ="form-control btn btn-primary" type="button" id="btn-editer" name="Modifier"
|
|
onclick="JAVASCRIPT:formModifTableRef(<?= $idData; ?>);" >Modifier</button>
|
|
</td>
|
|
<td class="text-center" width="10%">
|
|
<button style="width:100%" class = "form-control btn btn-danger" type="button" id="btn-supprimer" name="Supprimer"
|
|
onclick="JAVASCRIPT:supprimeLigneListe(<?= $idData; ?>)">Supprimer</button>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|