alpha_full/admin/param/gParam/gParam.php
2026-04-06 22:58:51 +02:00

69 lines
3.3 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
// -----------------------------------------------------
// Init
// -----------------------------------------------------
$ID='';
$gDesc='';
$valeur='';
// -----------------------------------------------------
// Post
// -----------------------------------------------------
if (isset($_POST['ID'])) {$ID=$_POST['ID'];}
if (isset($_POST['gDesc'])) {$gDesc=$_POST['gDesc'];}
if (isset($_POST['valeur'])) {$valeur=$_POST['valeur'];}
if (isset($_POST['codeOpe'])) {$codeOpe=$_POST['codeOpe'];}
// -----------------------------------------------------
// Update
// -----------------------------------------------------
if ($codeOpe==='upParam') {include ("gParam.reqUpdate.php");}
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update' => ''], '');}
// -----------------------------------------------------
// Select : refresh oui pour recup des changements
// -----------------------------------------------------
$refresh='Oui';
include ($includePath. "/req/19-init.param.php");$refresh='N';
// -----------------------------------------------------
// Debug
// -----------------------------------------------------
if (isset($debug[1]) && $debug[1] == '1') {include ("gParam.debug.php");}
// -----------------------------------------------------
// Formulaire
// -----------------------------------------------------
echo '<form name="gParam" id="gParam" method="POST" >';
// -----------------------------------------------------
// Champs cachés (certains postés par le JS )
// -----------------------------------------------------
echo '<input type="hidden" name="codeOpe" id="codeOpe" value="' .$codeOpe. '" >';
echo '<input type="hidden" name="ID" id="ID" value="' .$ID. '" >';
echo '<input type="hidden" name="gDesc" id="gDesc" value="' .$gDesc. '" >';
echo '<input type="hidden" name="valeur" id="valeur" value="' .$valeur. '" >';
echo '<input type="hidden" name="paramAff" id="paramAff" value="' .$paramAff. '" >';
// -----------------------------------------------------
// Liste des params
// -----------------------------------------------------
echo '<div id="zoneFormWbm" class="fondColorListe" style="width:100%; text-align:left; display:grid; grid-gap:0px; padding:0px; margin:0px; " >';
echo '<span class="libelleLV" style="grid-column:1;text-align:left; position:sticky; top:124px; z-index:10">Paramètre</span>';
echo '<span class="libelleLV" style="grid-column:2;text-align:left; position:sticky; top:124px; z-index:10">Valeur</span>';
for ($i=0; $i<count($paramId); $i++) {
// if ($paramDesc[$i]!="'") {
echo '<input type="hidden" id="ID' .$i. '" value="' .$paramId[$i]. '" >';
echo '<span class="celluleLV" style="margin-top:1px;text-align:left;"> ';
echo '<input class=" inputLV" style="grid-column:1;" type="text" onChange="upGParam(' .$i. ');" id="gDesc' .$i. '" value="' .$paramDesc[$i]. '" title="Paramètre global" >';
echo '</span>';
echo '<span class="celluleLV" style="margin-top:1px;text-align:left;"> ';
echo '<input class=" inputLV" style="grid-column:2;" type="text" onChange="upGParam(\'' .$i. '\');" id="valeur' .$i. '" value="' .$paramVal[$i]. '" title="valeur" >';
echo '</span>';
// }
}
echo '</div>';
echo '</form>';
?>