alpha_full/admin/choixIco/choixIcone.form.php
2026-04-06 22:58:51 +02:00

186 lines
9.9 KiB
PHP
Executable File

<?php
// $nomFicAppelant = basename(__FILE__);
// -----------------------------------------------------
// Form
// -----------------------------------------------------
echo '<form name="choixIconeForm" id="choixIconeForm" method="POST" enctype="multipart/form-data" >';
// -----------------------------------------------------
// Champs cachés
// pour awesone ou svg => flag pour afficher le bouton syle--
echo '<input type="hidden" name="affAdmin" id="affAdmin" value="' .$affAdmin. '" >';
echo '<input type="hidden" name="upSvg" id="upSvg" value="' .$upSvg. '" >';
echo '<input type="hidden" name="lgCourante" id="lgCourante" value="' .$_SESSION['lgCouranteCode']. '" >';
echo '<input type="hidden" name="codeOpe" id="codeOpe" value="' .$codeOpe. '" >';
echo '<input type="hidden" name="theStyle" id="theStyle" value="' .$style. '" >';
echo '<input type="hidden" name="numeroMenuPrpal" id="numeroMenuPrpal" value="' .$numeroMenuPrpal. '" >';
echo '<input type="hidden" id="idLanguenav" name="idLanguenav" value="' .$idLanguenav. '" >';
echo '<input type="hidden" id="textesAffSection" name="textesAffSection" value="' .$textesAffSection. '" >';
echo '<input type="hidden" id="theIdPage" name="theIdPage" value="' .$theIdPage. '" >';
echo '<input type="hidden" id="nomCss" name="nomCss" value="' .$nomCss. '" >';
echo '<input type="hidden" id="theVoletCss" name="theVoletCss" value="' .$theVoletCss. '" >';
echo '<input type="hidden" id="theIdItem" name="theIdItem" value="' .$theIdItem. '" >';
echo '<input type="hidden" id="agencementOnglet" name="agencementOnglet" value="' .$agencementOnglet. '" >';
echo '<input type="hidden" id="theOldImage" name="theOldImage" value="' .$theOldImage. '" >';
echo '<input type="hidden" id="numeroSousMenu" name="numeroSousMenu" value="' .$numeroSousMenu. '" >';
echo '<input type="hidden" id="appel" name="appel" value="' .$appel. '" >';
echo '<input type="hidden" id="niveau" name="niveau" value="' .$niveau. '" >';
echo '<span class="libChampsWebmaster" >';
// -----------------------------------------------------
// Propager
// -----------------------------------------------------
$title="En cochant cette case l'image sera reproduite dans chaque langue";
echo '<span title="' .$title. '">Propager l\'icône aux autres langues : </span>';
if ($propager==1) {$checked='checked';} else {$checked='';}
echo '<input title="' .$title. '" onClick="toggleProp(this.value);" type="checkbox" name="propager" id="propager" value="1" '.$checked.' >';
echo '</span>';
echo '<span class="libChampsWebmaster" >';
echo 'Icône actuelle : ';
// -----------------------------------------------------
// Champ ico : si posté = theIco, sinon la premiere fois DbIco vient de session (depuis menuDeroulant)
// -----------------------------------------------------
if ($theIco!='') {
if(!isset($niveau)) $niveau=1;
$test=substr($theIco,-3);
if ($test=='jpg' || $test=='peg' || $test=='gif' || $test=='ico' || $test=='png' || $test=='bmp') {
if(file_exists($theIco)) {echo '<img width="50" src="' .$theIco. '" valign="middle" />';}
if(file_exists('.' .$theIco)) { echo '<img width="50" src=".' .$theIco. '" valign="middle" />';}
if(file_exists('../.' .$theIco)) { echo '<img width="50" src="../.' .$theIco. '" valign="middle" />';}
}
else {
echo '<i class="' .$theIco. '" style="vertical-align:middle; background:white; padding:15px" ></i>';
}
}
echo '</span>';
echo '<span class="libChampsWebmaster" style="width:100%;" >';
echo 'Fichier / nom : ';
echo '<input class="inputWebmaster" style="width:100%;" id="theIco" name="theIco" value="' .$theIco. '" title="Votre icône">&#160;';
echo '</span>';
// -----------------------------------------------------
// Liien vers page fontAwesome
// -----------------------------------------------------
echo '<div><a style="color:blue" href="https://fontawesome.com/v6/search" target="_blank" title="Ne prendre que le nom, sans balises"><u>Aller sur la page web des icônes Font Awesome</u></a></div>';
// echo '<br><div><a href="https://glyphsearch.com/" target="_blank">Page web des icônes glyphsearch</a></div>';
echo '<span class="libChampsWebmaster" >';
echo 'Sélectionnez :<br>';
echo '</span>';
echo '<span class="libChampsWebmaster" style="padding:10px;" >';
// -----------------------------------------------------
// Styles ico ronds Gallerie 1
// -----------------------------------------------------
include ($includePathAdmin. "/ressources/listeIcoRonds.php");
echo '<ul id="Gallerie1" name="Gallerie1" >';
for ($i=0; $i<count($listIco); $i++) {
echo '<li id="gallerie-1" value="/include/biblio/icones/listeIco1/' .$listIco[$i]. '" >';
echo '<img src="/include/biblio/icones/listeIco1/' .$listIco[$i]. '" alt="' .$listIco[$i]. '" title="/' .$listIco[$i]. '" />';
echo '<input type="hidden" id="Gallerie1-opt" value="/include/biblio/icones/listeIco1/' .$listIco[$i]. '" >';
echo '</li>';
}
echo '</ul>';
// -----------------------------------------------------
// Icos Gallerie 2
// -----------------------------------------------------
echo '&#160;';
include ($includePathAdmin. "/ressources/listeIcoAccess.php");
echo '<ul id="Gallerie2" name="Gallerie2" >';
for ($i=0; $i<count($listIco2); $i++) {
echo '<li id="gallerie-2" >';
echo '<img src="/include/biblio/icones/listeIco2/' .$listIco2[$i]. '" alt="' .$listIco2[$i]. '" title="' .$listIco2[$i]. '" />';
echo '<input type="hidden" id="Gallerie2-opt" value="/include/biblio/icones/listeIco2/' .$listIco2[$i]. '" >';
echo '</li>';
}
echo '</ul>';
// -----------------------------------------------------
// Class awesome Gallerie 3
// -----------------------------------------------------
echo '&#160;';
include ($includePathAdmin. "/ressources/listeIcoAwesome.php");
echo '<ul id="fontAwesome" >';
for ($i=0; $i<count($listIco3); $i++) {
echo '<li id="Awesome" name="Awesome" >';
echo '<i border="0" class="' .$listIco3[$i]. '" style="--fa-primary-color: #2E5AAC !important; --fa-secondary-color: grey !important; color: black !important; font-size:1.5rem !important" ></i>';
echo '<input type="hidden" id="fontAwesome-opt" value="' .$listIco3[$i]. '" >';
echo '</li>';
}
echo '</ul>';
echo '</span>';
echo '<span class="libChampsWebmaster" style="padding:10px;" >';
// -----------------------------------------------------
// Comics Gallerie 4
// -----------------------------------------------------
include ($includePathAdmin. "/ressources/listeIcoComic.php");
echo '<ul id="Gallerie4" name="Gallerie4" >';
for ($i=0; $i<count($listIco4); $i++) {
echo '<li id="gallerie-4" >';
echo '<img width="20" src="/include/biblio/icones/Comic_icons/' .$listIco4[$i]. '" alt="' .$listIco4[$i]. '" title="' .$listIco4[$i]. '" />';
echo '<input type="hidden" id="Gallerie4-opt" value="/include/biblio/icones/Comic_icons/' .$listIco4[$i]. '" >';
echo '</li>';
}
echo '</ul>';
// -----------------------------------------------------
// icos_ronds 2 Gallerie 5
// -----------------------------------------------------
echo '&#160;';
include ($includePathAdmin. "/ressources/listeIcoRonds2.php");
echo '<ul id="Gallerie5" class="inputWebmaster" >';
for ($i=0; $i<count($listIco5); $i++) {
echo '<li id="gallerie-5" >';
echo '<img width="20" src="/include/biblio/icones/icos_ronds/' .$listIco5[$i]. '" alt="' .$listIco5[$i]. '" title="' .$listIco5[$i]. '" />';
echo '<input type="hidden" id="Gallerie5-opt" value="/include/biblio/icones/icos_ronds/' .$listIco5[$i]. '" >';
echo '</li>';
}
echo '</ul>';
// -----------------------------------------------------
// Pastel_Icons 2 Gallerie 6
// -----------------------------------------------------
echo '&#160;';
include ($includePathAdmin. "/ressources/listeIcoPastel.php");
echo '<ul id="Gallerie6" class="inputWebmaster" >';
for ($i=0; $i<count($listIco6); $i++) {
echo '<li id="gallerie-6" >';
echo '<img width="20" src="/include/biblio/icones/Pastel_Icons/' .$listIco6[$i]. '" alt="' .$listIco6[$i]. '" title="' .$listIco6[$i]. '" />';
echo '<input type="hidden" id="Gallerie6-opt" value="/include/biblio/icones/Pastel_Icons/' .$listIco6[$i]. '" >';
echo '</li>';
}
echo '</ul>';
echo '</span>';
// -----------------------------------------------------
// Libre choix
// -----------------------------------------------------
echo '<span class="libChampsWebmaster" >';
echo '<label for="fileToUpload" >';
echo '<span class="boutonsWebmaster" title="Cliquez ici pour parcourir les dossiers de votre ordinateur. Formats : png, jpg, bmp, gif . " >';
echo '<i class="fad fa-download"></i>';
echo 'Parcourir...&#160;';
echo '</span>';
echo '</label>';
echo '<input onChange="uploadImg(\'' .$idLanguenav. '\', document.getElementById(\'fileToUpload\').files[0].name , \'' .$theIco. '\' );" style="display:none;" type="file" name="fileToUpload" id="fileToUpload" >';
// echo '<input onChange="alert(\'' .$idLanguenav. ' \' + \' ' .$theIco. '\' );" style="display:block;" type="file" name="fileToUpload" id="fileToUpload" >';
echo '</span>';
// -----------------------------------------------------
// Gallerie file
// -----------------------------------------------------
echo '<div style="display:block; width:100%; border:1px solid lightgrey; padding:0px; margin: auto;" >';
echo '<iframe id="iFr" style="transform: scale(0.95); margin:auto; margin-top:0px;" height="300" width="100%" src="/include/biblio/gallerie.php?scope=choixIco&siteDossier=' .$_SESSION['siteDossier']. '&server=' .$_SESSION['server']. '&src=Biblio" >';
echo '</iframe>';
echo '</div>';
echo '</form>';
?>