92 lines
3.7 KiB
PHP
Executable File
92 lines
3.7 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
// -----------------------------------------------------
|
|
// Etre admin
|
|
// -----------------------------------------------------
|
|
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin']=='O' ) {
|
|
|
|
// -----------------------------------------------------
|
|
// Init
|
|
// -----------------------------------------------------
|
|
$trouveLG=true;
|
|
$idMl=1;
|
|
|
|
// -----------------------------------------------------
|
|
// POST
|
|
// -----------------------------------------------------
|
|
if (!empty($_GET['theIdZone'])) {$theIdZone=$_GET['theIdZone'];}
|
|
else
|
|
{if (isset($_POST['theIdZone'])) {$theIdZone=$_POST['theIdZone'];}}
|
|
|
|
if (!empty($_GET['idMl'])) {$idMl=$_GET['idMl'];}
|
|
else
|
|
{if (isset($_POST['idMl'])) {$idMl=$_POST['idMl'];}}
|
|
|
|
if (isset($_POST['poidsMin'])) {$poidsMin=$_POST['poidsMin'];}
|
|
if (isset($_POST['poidsMax'])) {$poidsMax=$_POST['poidsMax'];}
|
|
if (isset($_POST['idPrix'])) {$idPrix=$_POST['idPrix'];}
|
|
|
|
if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug(2, ['theIdZone=' => $theIdZone], '');}
|
|
|
|
// -----------------------------------------------------
|
|
// Req insert
|
|
// -----------------------------------------------------
|
|
$erreurSQL==0;
|
|
if (isset($_POST["creer"]) && $_POST["creer"]!='') {
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['nouvel idItem :' => $theIdZone], '');}
|
|
include ("gt.reqInsertTranche.php");
|
|
}
|
|
|
|
|
|
echo '<form method="POST" >';
|
|
|
|
// -----------------------------------------------------
|
|
// 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. '" />';
|
|
|
|
// -----------------------------------------------------
|
|
// Champs
|
|
// -----------------------------------------------------
|
|
echo '<span class="libChampsWebmaster fondColorListe" style="width:100%;padding:10px; flex-direction: column;" >';
|
|
echo 'Poids min :<input class="inputWebmaster" id="poidsMin" name="poidsMin" />';
|
|
echo '<br>Poids max :<input class="inputWebmaster" id="poidsMax" name="poidsMax" />';
|
|
echo '<br>Prix : <input class="inputWebmaster" id="idPrix" name="idPrix" />';
|
|
echo '</span>';
|
|
echo '</div>'; //formModale
|
|
|
|
// -----------------------------------------------------
|
|
// Validate
|
|
// -----------------------------------------------------
|
|
echo '<div id="zoneValidateModales" style="width:100%;" >';
|
|
if (isset($_POST["creer"]) && $_POST["creer"]!='') {
|
|
echo '<span class="boutonsWebmaster" onClick="window.location=\'gt.createTranche.modale.php?idMl=' .$idMl. '&theIdZone=' .$theIdZone. '\';" >';
|
|
echo '<i class="fad fa-plus"></i>';
|
|
echo 'Nouvelle tranche';
|
|
echo '</span>';
|
|
}
|
|
else {
|
|
echo '<span class="boutonsWebmaster" >';
|
|
echo '<i class="fad fa-plus"></i> ';
|
|
echo '<input type="submit" name="creer" value="Créer la tranche" >';
|
|
echo '</span>';
|
|
}
|
|
echo '<span class="boutonsWebmaster" onClick="window.location=\'./frmModale.php?affModale=6-3&idMl=' .$idMl. '&theIdZone=' .$theIdZone. '\';" style="width:100px;" >';
|
|
echo '<i class="fad fa-chevron-circle-left"></i>';
|
|
echo ' Retour';
|
|
echo '</span>';
|
|
echo '</div>'; //validate
|
|
echo '</form>';
|
|
|
|
}
|
|
else {
|
|
$confPath="../_conf";
|
|
include ("./adminInclude/redirectionAdmin.php");
|
|
}
|
|
?>
|