42 lines
1.9 KiB
PHP
Executable File
42 lines
1.9 KiB
PHP
Executable File
<?php
|
|
|
|
$result='';
|
|
$resConn='';
|
|
$reqSelect="SELECT * FROM `design` WHERE idTheme=" .$_SESSION['idTheme']. " ORDER by `idCoul` ;";
|
|
if (isset($debug[7]) && $debug[7] == '1') { $debugMsg .= monDebug(2, ['reqSelect' => $reqSelect], 'coulGeneReqSelectAll.php');}
|
|
$resConn=$idPdo->query($reqSelect);
|
|
$z=0;
|
|
if ($resConn) {
|
|
// si la requête a fonctionnée
|
|
if ($resConn->rowCount()>0) {
|
|
// si la requête a retourné au moins un enregistrement
|
|
while ($result=$resConn->fetch(PDO::FETCH_ASSOC)) {
|
|
$tabIdColor[$z]=$result['idCoul'];
|
|
$tabDescColor[$z]=$result['description'];
|
|
$tabBgColor[$z]=$result['bgColor'];
|
|
$tabFontColor[$z]=$result['fontColor'];
|
|
$test='';
|
|
$test=strpos($tabBgColor[$z],'gradient' );
|
|
if ($test =="") {$test=strpos($tabBgColor[$z],'linear');}
|
|
if ($test =="") {$test=strpos($tabBgColor[$z],'transparent');}
|
|
if ($test =="") {$test=strpos($tabBgColor[$z],'inherit');}
|
|
if (substr($tabBgColor[$z], 0,1)!="#" && strlen($tabBgColor[$z])> 1 && $test=="") $tabBgColor[$z]="#" .$tabBgColor[$z];
|
|
|
|
if (substr($tabFontColor[$z], 0,1)!="#" && strlen($tabFontColor[$z])> 1 && $tabFontColor[$z]!="inherit") $tabFontColor[$z]="#" .$tabFontColor[$z];
|
|
if (isset($debug[7]) && $debug[7] == '1') {
|
|
$debugMsg .= monDebug(1, [
|
|
'idCoul=' => $tabIdColor[$z],
|
|
'description=' => $tabDescColor[$z],
|
|
'tabBgColor=' => $tabBgColor[$z],
|
|
'tabFontColor=' => $tabFontColor[$z]
|
|
], '');
|
|
}
|
|
$z++;
|
|
} //while
|
|
if (isset($debug[7]) && $debug[7] == '1' ) {$admMsg .="Il est possible de retrouver les données couleurs generiques. "; $admMsgClass='ok';}
|
|
}
|
|
else
|
|
{$admMsg .="Il est impossible de retrouver les données couleurs generiques. "; $admMsgClass='ko';}
|
|
}
|
|
else {$admMsg .="Nous sommes désolés, les données couleurs generiques ne peuvent pas être affichées"; $admMsgClass='ko';}
|
|
?>
|