donc je passe par session if (isset($_SESSION['idPrd'])) $idPrd=$_SESSION['idPrd']; if (isset($_GET['idPrd'])) { $idPrd=$_GET['idPrd'];} if (isset($_POST['idPrd'])) { $idPrd=$_POST['idPrd'];} if (isset($idPrd)) $_SESSION['idPrd']=$idPrd; // idCat if (isset($_SESSION['idCat'])) $idCat=$_SESSION['idCat']; if (isset($_GET['idCat'])) { $idCat=$_GET['idCat'];} if (isset($_POST['idCat'])) { $idCat=$_POST['idCat'];} if (isset($idCat)) $_SESSION['idCat']=$idCat; if (isset($_POST['theType'])) { $theType=$_POST['theType']; $_SESSION['theType']=$theType;} if (isset($_GET['theType'])) { $theType=$_GET['theType']; $_SESSION['theType']=$theType;} echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; if ( $debugFileG == 1 ) { echo '
fn =' .$fn. ""; echo ' | pic =' .$pic. ""; echo ' | codeOpe =' .$codeOpe. ""; echo ' | siteDossier =' .$siteDossier. ""; echo ' | server ='; if (isset($_SESSION['server'])) echo $_SESSION['server']; echo ' | scope =' .$scope. ""; echo ' | scope2 =' .$scope2. ""; echo ' | src =' .$src; echo ' | idFam ='; if (isset($idFam)) echo $idFam; echo ' | idPrd ='; if (isset($idPrd)) echo $idPrd; echo ' | propager =' .$propager; echo ' | theType =' .$theType; echo '
URI => ' .$_SERVER['REQUEST_URI']; // echo '
' .$_SERVER['HTTP_REFERER']; // echo '
POST '. var_dump($_POST); // echo '
GET '. var_dump($_GET); } echo '
'; if ($codeOpe=="majImage") { switch ($scope) { case 'logo': $folder= "/Design/_logo/"; $page= "/Design/_logo/"; break; case 'favIcon': $folder= "/Design/_favIcon/"; $page= "/Design/_favIcon/"; break; case 'titre': $folder= "/Design/_titre/"; $page= "/Design/_titre/"; break; case 'bandeau': $folder= "/Design/_bandeau/"; $page= "/Design/_bandeau/"; break; case 'fonds': $folder= "/Design/_fonds/"; $page= "/Design/_fonds/"; break; case 'maint': $folder= "/Design/_constr/"; $page= "/Design/_constr/"; break; case 'cat_p': case 'creaCat_p': $folder= "/Catalogue/_images_categories/petites/"; $page= "/Catalogue/_images_categories/petites/"; break; case 'cat_g': case 'creaCat_g': $folder= "/Catalogue/_images_categories/grandes/"; $page= "/Catalogue/_images_categories/grandes/"; break; case 'sous_cat': case 'creaSousCat': $folder= "/Catalogue/_images_sousCategories/"; $page= "/Catalogue/_images_sousCategories/"; break; case '1': // case 'creaArt1': $folder= "/Catalogue/_images_produits/petites/"; $page= "/Catalogue/_images_produits/petites/"; break; case '2': // case 'creaArt2': $folder= "/Catalogue/_images_produits/grandes/"; $page= "/Catalogue/_images_produits/grandes/"; break; case '3': // case 'creaArt3': $folder= "/Catalogue/_images_produits/gauches/"; $page= "/Catalogue/_images_produits/gauches/"; break; case '4': // case 'creaArt4': $folder= "/Catalogue/_images_produits/droites/"; $page= "/Catalogue/_images_produits/droites/"; break; case '5': // case 'creaArt5': $folder= "/Catalogue/_images_produits/dessus/"; $page= "/Catalogue/_images_produits/dessus/"; break; case '6': // case 'creaArt6': $folder= "/Catalogue/_images_produits/dessous/"; $page= "/Catalogue/_images_produits/dessous/"; break; case '7': // case 'creaArt7': $folder= "/Catalogue/_images_produits/videos/"; $page= "/Catalogue/_images_produits/videos/"; break; case 'choixIco': $folder= "/Design/_icones_web/"; $page= "/Design/_icones_web/"; break; case 'accImgFondsPers': case 'accImgFondsPersCreate': $folder= "/Design/_pageAccueil/"; $page= "/Design/_pageAccueil/"; break; } switch ($src) { case 'Design': $file = '/datas/07Prod/wwwRoot/'.$siteDossier.'/Design/'.$fn; break; case 'Biblio': $file = '/datas/07Prod/include/biblio/'.$fn; break; case 'Catalogue': $file = '/datas/07Prod/wwwRoot/'.$siteDossier.'/Catalogue/'.$fn; break; } $newFile = '/datas/07Prod/wwwRoot/'.$siteDossier.$folder.$pic; $continue=true; if ($debugFileG==1) { echo '
file =' .$file; echo '
newFile =' .$newFile; echo '
$_POST[theType] =' .$$_POST['theType']; } if ($file != $newFile) { try{ if (!copy($file, $newFile)) { $error = error_get_last(); $continue=false; echo 'Erreur lors de la copie (Catalogue) !'; if ($error) { echo '
';
						echo 'Type : ' . $error['type'] . "\n";
						echo 'Message : ' . $error['message'] . "\n";
						echo 'Fichier : ' . $error['file'] . "\n";
						echo 'Ligne : ' . $error['line'] . "\n";
						echo '
'; } echo ''; echo ''; ?>' Message: ' .$file. ' ' .$newFile. ''; } else{ if ($debugFileG==1) echo "Image $file copiée vers $newFile\n"; echo 'Image copiée avec succès '; // echo ""; } } // catch exception catch(Exception $e) { echo '
Message: ' .$e->getMessage(). '
'; } } else if ($debugFileG==1) { echo "Image $file deja existante vers $newFile\n"; echo ""; } if ( $continue===true){ switch ($scope) { case 'favIcon': echo ''; break; case 'logo': echo ''; break; case 'titre': echo ''; break; case 'bandeau': echo ''; break; case 'fonds': echo ''; break; case 'maint': echo ''; break; case 'cat_p': // image petite dans modif img catégorie echo ''; break; case 'creaCat_p': // image petite dans creation catégorie echo ''; break; case 'cat_g': // image grande dans modif catégorie echo ''; break; case 'creaCat_g': // image grande dans creation catégorie : idem petite pour le lien echo ''; break; case 'creaSousCat': // creation de sous categorie echo ''; break; case 'creaArt': echo ''; break; case 'choixIco': echo ''; break; case 'accImgFondsPers': echo ''; break; case 'accImgFondsPersCreate': echo ''; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': echo ''; break; // code endormi pour l'instant : trop complexe // case 'creaArt1': // case 'creaArt2': // case 'creaArt3': // case 'creaArt4': // case 'creaArt5': // case 'creaArt6': // case 'creaArt7': } } } ?>