alpha_full/admin/SEO/gID/gID.create.modale.php
2026-04-06 22:58:51 +02:00

96 lines
3.7 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
// -----------------------------------------------------
// Etre admin
// -----------------------------------------------------
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin']=='O' ) {
// -----------------------------------------------------
// Init
// -----------------------------------------------------
$description='';
$gScript ='';
// -----------------------------------------------------
// Post
// -----------------------------------------------------
if (isset($_POST['codeOpe'])) {$codeOpe=$_POST['codeOpe'];}
if (isset($_POST['description'])) {$description=$_POST['description'];}
if (isset($_POST['gScript'])) {$gScript=$_POST['gScript'];}
// -----------------------------------------------------
// Debug
// -----------------------------------------------------
if (isset($debug[1]) && $debug[1] == '1') { $debugMsg .= monDebug(2, ['description' => $description, 'Script' => $gScript], 'gID.create.modale.php');}
// -----------------------------------------------------
// Req insert
// -----------------------------------------------------
if (isset($_POST["submit"]) && $_POST["submit"]=="valider") {
include ("./gID.reqInsert.php");
include ("gID.makeFichier.php");
}
else {
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Pas de insert' => ''], '');}
}
// -----------------------------------------------------
// Form
// -----------------------------------------------------
echo '<form name="gIDF" method="POST" >';
// -----------------------------------------------------
// Zone Form
// -----------------------------------------------------
echo '<div id="zoneFormModales" >';
// -----------------------------------------------------
// Champs du formulaire
// -----------------------------------------------------
echo '<div class="libChampsWebmaster" >';
echo 'description : ';
echo '<input class="inputWebmaster" style="width:50%;" type="text" value="' .$description. '" name="description"/>';
echo '<br>';
echo '<span >Valeur : </span>';
echo '<input class="inputWebmaster" style="width:50%;" type="text" value="' .$gScript. '" name="gScript"/>';
echo '</div>';
echo '</div>';
// -----------------------------------------------------
// Zone validate
// -----------------------------------------------------
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=24&=2 \';" >';
echo '<i class="fad fa-chevron-circle-left"></i>&#160;';
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>&#160;';
echo 'Valider</span>';
echo '</label>';
echo '<input class="boutonsWebmaster" style="display:none;" value="valider" name="submit" id="submit" type="submit" />';
echo '&#160;';
echo '<span class="boutonsWebmaster" title="Fin" onClick=" location.href=\'./frmAdmin.php?affAdmin=24&=2 \';" >';
echo '<i class="fa-duotone fa-arrow-rotate-left"></i>&#160;';
echo 'Annuler</span>';
}
echo '</div>';
echo '</form>';
}
else {
$confPath="../_conf";
include ("./adminInclude/redirectionAdmin.php");
}
?>