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

69 lines
3.1 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
$ID='';
$env='';
$valeur='';
$idEnvTab=array();
$descEnvTab=array();
$valEnvTab=array();
// -----------------------------------------------------
// Post
// -----------------------------------------------------
if (isset($_POST['ID'])) {$ID=$_POST['ID'];}
if (isset($_POST['env'])) {$env=$_POST['env'];}
if (isset($_POST['valeur'])) {$valeur=$_POST['valeur'];}
if (isset($_POST['codeOpe'])) {$codeOpe=$_POST['codeOpe'];}
// -----------------------------------------------------
// Update
// -----------------------------------------------------
if ($codeOpe==='upEnv') {include ("env.reqUpdate.php"); $refresh='Oui';}
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de update' => ''], '');}
// -----------------------------------------------------
// Select
// -----------------------------------------------------
include ($includePath. "/req/01-init.environnement.php");
// -----------------------------------------------------
// Debug
// -----------------------------------------------------
if (isset($debug[1]) && $debug[1] == '1') {include ("env.debug.php");}
// -----------------------------------------------------
// Formulaire
// -----------------------------------------------------
echo '<form name="envF" id="envF" method="POST" style="margin:auto; height: 100%;" >';
// -----------------------------------------------------
// Champs cachés (certains postés par le JS )
// -----------------------------------------------------
echo '<input type="hidden" value="' .$paramAff. '" name="paramAff" >';
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="env" id="env" value="' .$env. '" />';
echo '<input type="hidden" name="valeur" id="valeur" value="' .$valeur. '" />';
// -----------------------------------------------------
// Liste des env
// -----------------------------------------------------
echo '<div id="zoneFormWbm" class="fondColorListe" style="width:100%; text-align:left; display:grid; padding:0px; margin:0px; overflow: visible; height:1%;" >';
echo '<span style="grid-column:1;" class="libelleLV">Variable</span>';
echo '<span class="libelleLV" style="grid-column:2;">Valeur</span>';
for ($i=0; $i<count($idEnvTab); $i++) {
echo '<span class="celluleLV" style="margin-top:0.5px;"> ';
echo '<input type="hidden" id="ID' .$i. '" value="' .$idEnvTab[$i]. '" >';
// echo '<span style="display:inline;">(' .$idEnvTab[$i]. ')</span>';
echo '<input class="inputLV" style="grid-column:1;" type="text" onChange="upEnv(' .$i. ');" id="env' .$i. '" value="' .$descEnvTab[$i]. '" title="env" >';
echo '</span>';
echo '<span class="celluleLV" style="margin-top:0.5px;"> ';
echo '<input class="inputLV" style="grid-column:2;" type="text" onChange="upEnv(\'' .$i. '\');" id="valeur' .$i. '" value="' .$valEnvTab[$i]. '" title="valeur" >';
echo '</span>';
}
echo '</div>';
echo '</form>';
?>