';
else echo '
';
if (isset($debug[1]) && $debug[1] == '1' ) $debugMsg .=monDebug (1 , ['typeDeRecherche' => $typeDeRecherche ],'barreDesPromos.php');
// ---------------------------------------------------
// Promos
// ---------------------------------------------------
$reqSelect="SELECT count('idPrd') as `nb` FROM produits WHERE promo >0 and statusPrd=1;";
$resConn=$idPdo->query($reqSelect);
if ($resConn) {
$result = $resConn->fetch(PDO::FETCH_ASSOC);
$isPromoB=intval($result['nb']);
}
if ($isPromoB>0) {
$numCol=1;
if (isset($debug[1]) && $debug[1] == '1' ) $debugMsg .='isPromoB = ' .$isPromoB;
if ($typeDeRecherche==2) dynamiqItemImage (0, 0, 'actifBtnPromo', 'span', '-', 'menu', 2, 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
else dynamiqItemImage (0, 0, 'itemBarrePromo', 'span', '-', 'menu', 2, 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
}
// ---------------------------------------------------
// Les meilleurs choix
// ---------------------------------------------------
$reqSelect="SELECT count('idPrd') as `nb` FROM produits WHERE gondole=1 and statusPrd=1;";
$resConn='';
$resConn=$idPdo->query($reqSelect);
if ($resConn) {
$result = $resConn->fetch(PDO::FETCH_ASSOC);
$isGondoleB=intval($result['nb']);
}
if ($isGondoleB>0) {
$numCol=2;
if (isset($debug[1]) && $debug[1] == '1' ) $debugMsg .='isGondoleB = ' .$isGondoleB;
if ($typeDeRecherche==1) dynamiqItemImage (0, 0, 'actifBtnPromo', 'span', '-', 'menu', 3 , 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
else dynamiqItemImage (0, 0, 'itemBarrePromo', 'span', '-', 'menu', 3 , 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
}
// ---------------------------------------------------
// Nouveautés
// ---------------------------------------------------
$reqSelect="SELECT count('idPrd') as `nb` FROM produits WHERE new=1 and statusPrd=1;";
$resConn='';
try {
$resConn=$idPdo->query($reqSelect);
if ($resConn) {
$result = $resConn->fetch(PDO::FETCH_ASSOC);
$isNewB=intval($result['nb']);
}
if ($isNewB>0) {
$numCol=3;
if (isset($debug[1]) && $debug[1] == '1' ) $debugMsg .='isNewB = ' .$isNewB;
if ($typeDeRecherche==3) dynamiqItemImage (0, 0, 'actifBtnPromo', 'span', '-', 'menu', 30 , 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
else dynamiqItemImage (0, 0, 'itemBarrePromo', 'span', '-', 'menu', 30 , 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
}
}
catch (PDOException $e) {
// error
if (isset($debug[2]) && $debug[2] == '1') { $debugMsg .= monDebug(2, ['barrePromo fail message :' => $e->getMessage()], '');}
}
// ---------------------------------------------------
// Tous nos articles
// ---------------------------------------------------
$numCol=4;
if ($typeDeRecherche==0) dynamiqItemImage (0, 0, 'actifBtnPromo', 'span', '-', 'menu', 4, 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
else dynamiqItemImage (0, 0, 'itemBarrePromo', 'span', '-', 'menu', 4, 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
// ---------------------------------------------------
// Nos rayons
// ---------------------------------------------------
$numCol=5;
if ($typeDeRecherche==4 || $affPageSite==15) dynamiqItemImage (0, 0, 'actifBtnPromo', 'span', '-', 'menu', 28, 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
else dynamiqItemImage (0, 0, 'itemBarrePromo', 'span', '-', 'menu', 28, 'iconeBarrePromo', 'txtBarrePromo', '-varStyle-');
echo '
';
?>