51 lines
1.5 KiB
PHP
Executable File
51 lines
1.5 KiB
PHP
Executable File
<?php
|
|
|
|
// -----------------------------------------------------
|
|
// Requete select
|
|
// -----------------------------------------------------
|
|
|
|
$reqSelect = "SELECT `background-image:url` as 'back', `background-repeat` as 'repeat', `background-size` as 'bsize' FROM `" . $_SESSION['nomThemeCss'] . "` WHERE nom='#bodyImg';";
|
|
|
|
$resConn = '';
|
|
$tabResult = array();
|
|
|
|
try {
|
|
$resConn = $idPdo->query($reqSelect);
|
|
|
|
if ($resConn && $resConn->rowCount() > 0) {
|
|
// Résultat trouvé
|
|
$tabResult = $resConn->fetch(PDO::FETCH_ASSOC);
|
|
$theImage = $tabResult['back'];
|
|
$backgroundRepeat = $tabResult['repeat'];
|
|
$backgroundSize = $tabResult['bsize'];
|
|
|
|
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, [
|
|
'reqSelect' => $reqSelect,
|
|
'backgroundImage' => $theImage,
|
|
'backgroundRepeat' => $backgroundRepeat,
|
|
'backgroundSize' => $backgroundSize,
|
|
'lgCouranteCode' => $_SESSION['lgCouranteCode']
|
|
], 'imgFondsReqSelect.php');
|
|
}
|
|
} else {
|
|
// Aucun enregistrement trouvé
|
|
if (isset($debug[2]) && $debug[2] == '1') {
|
|
$debugMsg .= monDebug(2, [
|
|
'reqSelect' => $reqSelect,
|
|
'message' => 'Aucune donnée trouvée pour #bodyImg'
|
|
], 'imgFondsReqSelect.php');
|
|
}
|
|
$admMsgClass = 'ko';
|
|
}
|
|
} catch (PDOException $e) {
|
|
// Erreur SQL
|
|
if (isset($debug[2]) && $debug[2] == '1') {
|
|
$debugMsg .= monDebug(2, [
|
|
'reqSelect' => $reqSelect,
|
|
'Erreur SQL' => $e->getMessage()
|
|
], 'imgFondsReqSelect.php');
|
|
}
|
|
$admMsgClass = 'ko';
|
|
}
|
|
?>
|