alpha_full/admin/agencement/titre/reqSelectCss.php
2026-04-06 22:58:51 +02:00

29 lines
1.1 KiB
PHP
Executable File

<?php
// -----------------------------------------------------
// Recup image depuis CSS
// -----------------------------------------------------
$reqSelect="Select `background-image:url` as 'back', `background-repeat` as 'repeat', `background-size` as 'bsize' from `" .$_SESSION['nomThemeCss']. "` WHERE nom='#header-containerImg';";
if (isset($debug[2]) && $debug[2] == '1') $debugMsg .= monDebug(2,['reqSelect' => $reqSelect],'reqSelectCss.php');
$resConn='';
$tabResult=array();
$resConn=$idPdo->query($reqSelect) ;
if ($resConn) { // si la requête a fonctionnée
$tabResult = $resConn->fetch(PDO::FETCH_ASSOC);
$theImage=$tabResult['back'];
$backgroundRepeat=$tabResult['repeat'];
$backgroundSize=$tabResult['bsize'];
$_SESSION['theImageTitre']=$theImage;
if (isset($debug[2]) && $debug[2] == '1') {
$debugMsg .= monDebug(2, [
'theImage' => $theImage,
'backgroundRepeat' => $backgroundRepeat,
'backgroundSize' => $backgroundSize
], '');
}
}
else {
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['Il n\'y a pas d\'image' => ''], '');}
$admMsgClass='ko';
}
?>