$theFavIcon ],'');}
// -----------------------------------------------------
// Req UPDATE
// -----------------------------------------------------
$theFavIcon=$theImage;
// si on n'a pas fait de upload et donc on doit recup extension
if (!empty($theFavIcon) && !isset($imageFileType) ) {
$imageFileType=substr($theFavIcon,-3);
}
// Debug
if (isset($debug[1]) && $debug[1] == '1' ) {
$debugMsg .= monDebug (1,[
'theImage' => $theImage,
'theFavIcon' => $theFavIcon,
'imageFileType' => $imageFileType
],'');
}
// -----------------------------------------------------
// Meta
// -----------------------------------------------------
switch ($imageFileType) {
case 'png':
$headMsg='';
break;
case 'gif':
$headMsg='';
break;
case 'jpg':
$headMsg='';
break;
case 'peg':
$headMsg='';
break;
case 'ico':
$headMsg='';
break;
default:
break;
}
$retour='';
// -----------------------------------------------------
// Ecriture du fichier favicon
// -----------------------------------------------------
$favFile='../Design/_favIcon/favIcon' .$_SESSION['lgCouranteCode']. '.php';
$retour=file_put_contents($favFile, $headMsg);
if ($retour!='') {$admMsg .= '
Le favicon a été mis à jour. '; $admMsgClass='ok';}
else {
$admMsg .= 'Erreur lors de la mise à jour du favicon.';
if (isset($debug[1]) && $debug[1] == '1' ) {
$debugMsg .= monDebug (1,['Retour' => $Retour,'favFile' => $favFile,'headMsg' => $headMsg,'imageFileType' => $imageFileType,'theFavIcon' => $theFavIcon
],'');
$admMsgClass='ko';
}
}
// -----------------------------------------------------
// Ecriture en bdd
// -----------------------------------------------------
include ("faviconReqUpdatePropager.php");
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Icône favori propagé à toutes les langues' => ''], '');}
}
else{
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['pas de maj favIcon' => ''], '');}
}
// -----------------------------------------------------
// Requete Select
// -----------------------------------------------------
include ("faviconReqSelect.php");
// -----------------------------------------------------
// Debug
// -----------------------------------------------------
if (isset($debug[1]) && $debug[1] == '1' ) {
$debugMsg .= monDebug (1,[
'thePopup' => $thePopup,
'theFavIcon' => $theFavIcon,
'theImage' => $theImage,
'theFaviconMsg' => $theFaviconMsg,
'lg' => $lg,
'modifLg' => $modifLg,
'lgCourante' => $_SESSION['lgCouranteCode'],
'codeOpe' => $codeOpe,
'trouveLG' =>$trouveLG,
'propager' => $propager,
'src' => $src
],'');
}
// -----------------------------------------------------
// Formulaire
// -----------------------------------------------------
echo '