alpha_full/admin/catalog/articles/art.uploadImages.modale.php
2026-04-06 22:58:51 +02:00

78 lines
3.0 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
// -----------------------------------------------------
// Etre admin
// -----------------------------------------------------
if (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin']=='O' ) {
$affOngImg='1';
$theImage =' ';
$lienImgPrdPt ='';
$lienImageGd ='';
// -----------------------------------------------------
// Post
// -----------------------------------------------------
if (isset($_GET['theImage'])) {$theImage=$_GET['theImage']; }
if (isset($_POST['theImage'])) {$theImage=$_POST['theImage']; }
if (isset($_GET['affOngImg'])) {$affOngImg=$_GET['affOngImg']; }
if (isset($_POST['affOngImg'])) { $affOngImg=$_POST['affOngImg']; }
if (isset($_POST['imageFam'])) {$imageFam=$_POST['imageFam'];}
// -----------------------------------------------------
// Update
// -----------------------------------------------------
if ($codeOpe=="faireMaj" || $codeOpe=="majGallerie" ) {
$uploadOk=1;
if (isset($_FILES["fileToUpload"]["tmp_name"])) {
include "./catalog/upload/caseImageUploadPtImagArticle.php";
}
else
{if (isset($debug[1]) && $debug[1] == '1' ) { $debugMsg .= monDebug(2, ['pas de upload' => ''], '');} }
include ("reqUpdateImgPrd.php");
}
// -----------------------------------------------------
// Delete images
// -----------------------------------------------------
if ($codeOpe=='deleteImg') {
include ("./catalog/req/req.art.delete.modaleImage.php");
}
// -----------------------------------------------------
// Debug
// -----------------------------------------------------
if (isset($debug[1]) && $debug[1] == '1' ) {include ("./catalog/upload/debugUpload.php");}
// -----------------------------------------------------
// Form
// -----------------------------------------------------
echo '<form name="uploadPrdF" id="uploadPrdF" method="POST" enctype="multipart/form-data" >';
// -----------------------------------------------------
// zone Form
// -----------------------------------------------------
echo '<div id="zoneFormModales" >';
// -----------------------------------------------------
// Champs cachés
// -----------------------------------------------------
echo '<input type="hidden" name="codeOpe" id="codeOpe" value="' .$codeOpe. '" >';
echo '<input type="hidden" name="idPrd" value="' .$idPrd. '" >';
echo '<input type="hidden" name="affOngImg" value="' .$affOngImg. '" >';
// -----------------------------------------------------
// Menus onglet upload pour toutes les images
// echo '<div style="background-color:transparent;border:0px;" >';
include ("menuImgArt.php");
// echo '</div>';
// -----------------------------------------------------
// Formulaire
// -----------------------------------------------------
include ("formImgPrdUp.php");
echo '</div>'; // zoneform
echo '</form>';
}
else {include ("./adminInclude/redirectionAdmin.php"); }
?>