136 lines
6.8 KiB
PHP
136 lines
6.8 KiB
PHP
<?php global $langs;
|
|
$csrfToken = function_exists('newToken') ? newToken() : $_SESSION['newtoken'];
|
|
$langs->loadLangs(array("admin", "ACM@ACM"));
|
|
/** @var $liste */
|
|
/** @var $listeCouleur */
|
|
?>
|
|
|
|
<script src="<?php echo DOL_URL_ROOT; ?>/custom/ACM/js/envoiePost.js"></script>
|
|
|
|
<div class="div-table-responsive">
|
|
<table class="noborder centpercent">
|
|
<tbody>
|
|
<tr class="liste_titre">
|
|
<th class="wrapcolumntitle liste_titre nowrap center">
|
|
nom
|
|
</th>
|
|
<th class="wrapcolumntitle liste_titre nowrap center">
|
|
régle
|
|
</th>
|
|
<th class="wrapcolumntitle liste_titre nowrap center">
|
|
jour
|
|
</th>
|
|
<th class="wrapcolumntitle liste_titre nowrap center">
|
|
mois
|
|
</th>
|
|
<th class="wrapcolumntitle liste_titre nowrap center">
|
|
état
|
|
</th>
|
|
<th class="wrapcolumntitle liste_titre nowrap center">
|
|
|
|
</th>
|
|
</tr>
|
|
|
|
<?php if ($liste != []) {
|
|
foreach ($liste as $item) { ?>
|
|
<tr class="oddeven">
|
|
<td class="tddict nowrap center">
|
|
<?= $langs->trans($item['nom']) ?>
|
|
</td>
|
|
<td class="tddict nowrap center">
|
|
<?= $item['regle'] ?>
|
|
</td>
|
|
<td class="tddict nowrap center">
|
|
<?= $item['jour'] ?>
|
|
</td>
|
|
<td class="tddict nowrap center">
|
|
<?= $item['mois'] ?>
|
|
</td>
|
|
<td class="tddict nowrap center">
|
|
<?php if ($item['actif'] != "actif") {?>
|
|
<a href="#" onclick="envoyerPost({action:'putActif', controleur:'admin', nom:'<?=$item['nom']?>'}, 'index.php', '<?=$csrfToken?>')">
|
|
<span class="fas fa-toggle-off size15x" style=" color: #999;" title="Désactivé"></span>
|
|
</a>
|
|
<?php } else {?>
|
|
<a href="#" onclick="envoyerPost({action:'putInactif', controleur:'admin', nom:'<?=$item['nom']?>'}, 'index.php', '<?=$csrfToken?>')">
|
|
<span class="fas fa-toggle-on font-status4 size15x" style="" title="Activé"></span>
|
|
</a>
|
|
<?php } ?>
|
|
</td>
|
|
<td class="tddict nowrap center">
|
|
<a href="#" onclick="envoyerPost({action:'supprimer', controleur:'admin', nom:'<?=$item['nom']?>'}, 'index.php', '<?=$csrfToken?>')">
|
|
<span class="fas fa-trash pictodelete" style="" title="Supprimer"></span>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
<?php } else {?>
|
|
<tr class="oddeven">
|
|
<td class="tddict nowrap center" colspan="6">
|
|
aucune valeur dans la base de donnée
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<br>
|
|
<div class="div-table-responsive">
|
|
<h2> Gestion des couleurs </h2>
|
|
<form method="post">
|
|
<input type="hidden" name="controleur" value="admin">
|
|
<input type="hidden" name="action" value="changerCouleur">
|
|
<input type="hidden" name="token" value="<?=$csrfToken?>">
|
|
<table class="noborder centpercent">
|
|
<tbody>
|
|
<tr>
|
|
<th class="left">
|
|
<input type="color" id="ACMTitreTableau" name="ACMTitreTableau" value="<?=$listeCouleur["ACMTitreTableau"]?>" />
|
|
<label for="ACMTitreTableau"><?=$langs->trans("ACMCouleur")." ".$langs->trans("ACMTitreTableau")?></label>
|
|
</th>
|
|
<th class="left">
|
|
<input type="color" id="ACMCorpsTableau" name="ACMCorpsTableau" value="<?=$listeCouleur["ACMCorpsTableau"]?>" />
|
|
<label for="ACMCorpsTableau"><?=$langs->trans("ACMCouleur")." ".$langs->trans("ACMCorpsTableau")?></label>
|
|
</th>
|
|
<th class="left">
|
|
<input type="color" id="ACMBordure" name="ACMBordure" value="<?=$listeCouleur["ACMBordure"]?>" />
|
|
<label for="ACMBordure"><?=$langs->trans("ACMCouleur")." ".$langs->trans("ACMBordure")?></label>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th class="left">
|
|
<input type="color" id="ACMFontTitreTableau" name="ACMFontTitreTableau" value="<?=$listeCouleur["ACMFontTitreTableau"]?>" />
|
|
<label for="ACMFontTitreTableau"><?=$langs->trans("ACMCouleur")." ".$langs->trans("ACMFontTitreTableau")?></label>
|
|
</th>
|
|
<th class="left">
|
|
<input type="color" id="ACMFontCorpsTableau" name="ACMFontCorpsTableau" value="<?=$listeCouleur["ACMFontCorpsTableau"]?>" />
|
|
<label for="ACMFontCorpsTableau"><?=$langs->trans("ACMCouleur")." ".$langs->trans("ACMFontCorpsTableau")?></label>
|
|
</th>
|
|
<th class="left">
|
|
</th>
|
|
</tr>
|
|
<tr><th class="left"></th><th class="left"></th><th class="left"></th></tr>
|
|
<tr>
|
|
<th class="left">
|
|
<input type="color" id="ACMConge" name="ACMConge" value="<?=$listeCouleur["ACMConge"]?>" />
|
|
<label for="ACMConge"><?=$langs->trans("ACMCouleur")." ".$langs->trans("ACMConge")?></label>
|
|
</th>
|
|
<th class="left">
|
|
<input type="color" id="ACMMalade" name="ACMMalade" value="<?=$listeCouleur["ACMMalade"]?>" />
|
|
<label for="ACMMalade"><?=$langs->trans("ACMCouleur")." ".$langs->trans("ACMMalade")?></label>
|
|
</th>
|
|
<th class="left">
|
|
<input type="color" id="ACMRecupe" name="ACMRecupe" value="<?=$listeCouleur["ACMRecupe"]?>" />
|
|
<label for="ACMRecupe"><?=$langs->trans("ACMCouleur")." ".$langs->trans("ACMRecupe")?></label>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th class="left"></th>
|
|
<th class="left"></th>
|
|
<th class="left"><input type="submit" value="<?=$langs->trans("ACMEnvoie")?>" /></th>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</div>
|