80 lines
3.2 KiB
PHP
Executable File
80 lines
3.2 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Etre admin
|
|
// -----------------------------------------------------
|
|
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin']=='O' ) {
|
|
|
|
// -----------------------------------------------------
|
|
// Init
|
|
// -----------------------------------------------------
|
|
$trouveLG=true;
|
|
$theNomZone="";
|
|
$idMl=1;
|
|
|
|
// -----------------------------------------------------
|
|
// POST
|
|
// -----------------------------------------------------
|
|
if (isset($_POST['theNomZone'])) {$theNomZone=$_POST['theNomZone'];}
|
|
if (!empty($_GET['idMl'])) {$idMl=$_GET['idMl'];}
|
|
else
|
|
{if (isset($_POST['idMl'])) {$idMl=$_POST['idMl'];}}
|
|
|
|
if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug(2, ['codeOpe=' => $codeOpe, 'theNomZone=' => $theNomZone,'idMl=' => $idMl], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Req insert
|
|
// -----------------------------------------------------
|
|
$erreurSQL==0;
|
|
if (isset($_POST["creer"]) && $_POST["creer"]!='') {
|
|
include ("gt.reqSelectMax.php");
|
|
$theIdZone=$nextIDItem+1;
|
|
if ($theIdZone =='' || $theIdZone ==0) {$theIdZone=1;}
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['nouvel idItem :' => $theIdZone], '');}
|
|
include ("zone.reqInsert.php");
|
|
}
|
|
|
|
echo '<form name="zoneCreateModale" id="zoneCreateModale" method="POST" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Zone Form
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneFormModales" >';
|
|
|
|
// -----------------------------------------------------
|
|
// Champs cachés
|
|
// -----------------------------------------------------
|
|
echo '<input type="hidden" name="theIdZone" value="' .$theIdZone. '" />';
|
|
echo '<input type="hidden" name="idMl" id="idMl" value="' .$idMl. '" />';
|
|
|
|
// -----------------------------------------------------
|
|
// Libelle
|
|
// echo '<div style="border:1px solid lightgrey;border-radius:7px;margin:3px;padding:3px;align:top;" >';
|
|
$title="Libellé de la zone";
|
|
echo '<div class="libChampsWebmaster" title="' .$title. '" style="width:95%;" >';
|
|
echo '<span> Libellé de la zone (pour information) : </span>';
|
|
echo '<input type="text" class="inputWebmaster" name="theNomZone" id="theNomZone" value="' .$theNomZone. '" />';
|
|
echo '</div>';
|
|
echo '</div>'; //Zone formModale
|
|
|
|
// -----------------------------------------------------
|
|
// Zone Validate
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneValidateModales" style="width:100%;" >';
|
|
echo '<br>';
|
|
if (isset($_POST["creer"]) && $_POST["creer"]!='') {
|
|
echo '<span class="boutonsWebmaster" onClick="window.location=\'./frmModale.php?affModale=6-2&idMl=' .$idMl. '\';" style="width:100px;" >';
|
|
echo '<i class="fad fa-chevron-circle-left"></i>';
|
|
echo ' Retour </span>';
|
|
}
|
|
else {
|
|
echo '<input class="boutonsWebmaster" type="submit" name="creer" value="Créer" />';
|
|
}
|
|
echo '<div>'; //zone validate
|
|
echo '</form>';
|
|
}
|
|
else {
|
|
$confPath="../_conf";
|
|
include ("./adminInclude/redirectionAdmin.php");
|
|
}
|
|
?>
|