162 lines
6.5 KiB
PHP
Executable File
162 lines
6.5 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Init
|
|
// -----------------------------------------------------
|
|
include ("../../../_include/headers.php");
|
|
$_SESSION['jeviensDeIndex']=3;
|
|
$_SESSION['jeviensDeAdminIndex']=2;
|
|
include ("./_modales/modale.init.php");
|
|
$env='';
|
|
$valeur ='';
|
|
|
|
// -----------------------------------------------------
|
|
// Post
|
|
// -----------------------------------------------------
|
|
if (isset($_POST['codeOpe'])) {$codeOpe=$_POST['codeOpe'];}
|
|
if (isset($_POST['env'])) {$env=$_POST['env'];}
|
|
if (isset($_POST['valeur'])) {$valeur=$_POST['valeur'];}
|
|
|
|
// -----------------------------------------------------
|
|
// Debug
|
|
// -----------------------------------------------------
|
|
if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug(2, ['DEBUG page Create' => ''], '');}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['env' => $env], '');}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['valeur' => $valeur], '');}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['submit' => ''], '');}
|
|
$admMsg .= '<br>';
|
|
}
|
|
|
|
// -----------------------------------------------------
|
|
// Html
|
|
// -----------------------------------------------------
|
|
echo '<!DOCTYPE html>';
|
|
echo '<html>';
|
|
echo '<head>';
|
|
echo '<title>Environnements</title>';
|
|
include_once ("../adminInclude/admin.head.php");
|
|
echo '</head>';
|
|
|
|
// -----------------------------------------------------
|
|
// Body
|
|
// -----------------------------------------------------
|
|
echo '<body onLoad="charge();" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Req insert
|
|
// -----------------------------------------------------
|
|
if (isset($_POST["submit"]) && $_POST["submit"]=="valider") {
|
|
include ("./env.reqInsert.php");
|
|
}
|
|
else {
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de insert' => ''], '');}
|
|
}
|
|
|
|
echo '<div id="modaleGene" >';
|
|
echo '<div class="popupGene" >';
|
|
echo '<div id="zonePageModales" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Zone Titre
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneTitreModales" > ';
|
|
|
|
// -----------------------------------------------------
|
|
// Titre de page
|
|
// -----------------------------------------------------
|
|
echo '<img border="0" valign="top" align="center" src="' .$includeAdminDesign. '/admin.bmp" alt="env" title="env" /> ';
|
|
echo '<span class="titreWbm" >Création de variable d\'environnement</span>';
|
|
|
|
// -----------------------------------------------------
|
|
// Bouton fermer
|
|
// -----------------------------------------------------
|
|
echo '<a href="./frmAdmin.php?affAdmin=12¶mAff=1" target="_parent" >';
|
|
echo '<span onClick="document.getElementById(\'modaleGene\').style.display=\'none\';" title="fermer la fenêtre" class="fad fa-times-circle btn_close" style="font-size:1rem;"></span>';
|
|
echo '</a>';
|
|
echo '</div>';
|
|
|
|
// -----------------------------------------------------
|
|
// Boite aide
|
|
// -----------------------------------------------------
|
|
echo '<div id="boiteAide" onMouseOver="charge();" >';
|
|
echo '<div align="center" >';
|
|
echo '<a href="https://123ventes.com" >'; include ($includeAdminDesign. "/123ventes.html"); echo '</a>';
|
|
echo '<br><br></div>';
|
|
echo '
|
|
<div class="popupAide" id="over">
|
|
<p>
|
|
<i class="fa-duotone fa-circle-info"></i>
|
|
<br><br>Vous pouvez ici créer ou modifier une variable d\'environnement.
|
|
<br><br><i class="fad fa-hands-helping"></i>
|
|
Attention operation sensible !
|
|
Une nouvelle env implique le code correspondant ( développement )
|
|
</p>
|
|
</div>
|
|
';
|
|
echo '</div>';
|
|
|
|
echo '<div id="zoneFormModales" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Form
|
|
// -----------------------------------------------------
|
|
echo '<form action="env.create.modale.php" name="creaEnv" method="POST" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Champs du formulaire
|
|
// -----------------------------------------------------
|
|
echo '<div class="libChampsWebmaster" >';
|
|
echo 'env : ';
|
|
echo '<input class="inputWebmaster" style="width:50%;" type="text" value="' .$env. '" name="env"/>';
|
|
echo '<br>';
|
|
|
|
echo '<span >Valeur : </span>';
|
|
echo '<input class="inputWebmaster" style="width:50%;" type="text" value="' .$valeur. '" name="valeur"/>';
|
|
echo '<br>';
|
|
|
|
echo '</div>';
|
|
echo '</div>';
|
|
|
|
echo '<div id="zoneValidateModales" >';
|
|
// -----------------------------------------------------
|
|
// Btn valider
|
|
// -----------------------------------------------------
|
|
if (isset($_POST["submit"]) && ($_POST["submit"]=="valider") && $resConn) {
|
|
echo '<br>';
|
|
echo '<span class="boutonsWebmaster" title="Fin" onClick="location.href=\'./frmAdmin.php?affAdmin=12¶mAff=4 \';" >';
|
|
echo '<i class="fad fa-chevron-circle-left"></i> ';
|
|
echo ' Retour </span>';
|
|
}
|
|
else {
|
|
echo '<br>';
|
|
echo '<label for="submit" >';
|
|
echo '<span class="boutonsWebmaster" title="Cliquez sur ce bouton pour valider" >';
|
|
echo '<i class="fad fa-check-circle"></i> ';
|
|
echo 'Valider</span>';
|
|
echo '</label>';
|
|
echo '<input class="boutonsWebmaster" style="display:none;" value="valider" name="submit" id="submit" type="submit" />';
|
|
|
|
echo ' ';
|
|
echo '<span class="boutonsWebmaster" title="Fin" onClick=" location.href=\'./frmAdmin.php?affAdmin=12¶mAff=4 \';" >';
|
|
echo '<i class="fa-duotone fa-arrow-rotate-left"></i> ';
|
|
echo 'Annuler</span>';
|
|
}
|
|
|
|
echo '</div>';
|
|
echo '</form>';
|
|
// -----------------------------------------------------
|
|
// usr Msg
|
|
// -----------------------------------------------------
|
|
if ($admMsg!='') {
|
|
echo '<div id="zoneMsgModale" >'; //Astuce pour avoir la barre message correcte (il n'y a pas de preview ici)
|
|
include ($includePathAdmin. "/adminMsg.php");
|
|
echo '</div>'; //usrMsg
|
|
}
|
|
echo '</div>'; //form
|
|
echo '</div>'; //page
|
|
echo '</div>'; //popup
|
|
echo '</div>'; //modale
|
|
|
|
echo '</body>';
|
|
echo '</html>';
|
|
?>
|