upToDate()) { $palmares_livres = $cache_mv->getObject('palm_liv_cache'); $count_palm = count($palmares_livres); } if (!$palmares_livres) { // objets $avant = new TMiseEnAvant(); $rec = new TInforecord(); // recuperation des meilleures ventes $palmares_existe = false; if ($avant->getVraiPalmares($MAG_ID, false, true, DUREE_PALMARES, false, TAILLE_PALMARES_FULL)) $palmares_existe = true; /*elseif ($avant->getVraiPalmares($MAG_ID, true, true, DUREE_PALMARES, false, TAILLE_PALMARES_FULL)) $palmares_existe = true; elseif ($avant->getMeaFromMagId($MAG_ID, TMiseEnAvant::TYPE_PALMARES) && count($avant->ListeLivres) > 2) $palmares_existe = true;*/ // ($mag_id, $palma_general = false, $numilog = true, $since = null, $filtre_erotique = true, $max_palm = 15) if ($palmares_existe) { $nb = 0; // print_r($avant->ListeLivres); foreach ($avant->ListeLivres as $ordre => $livre) { $rec->findById($livre['record_id']); if (!$rec->Id) continue; $rec->triFormat($MAG_ID); $palmares_livres[] = array( 'record_id' => $livre['record_id'], 'ean' => $rec->Ean, 'titre' => $rec->Titre, 'auteur' => $rec->Auteurs, 'editeur' => $rec->Editeur, 'img' => $rec->getImage('m',IMG_DEFAUT), 'infos_prix' => $rec->getPrixVente(), 'one_format' => $rec->getVirginFormat(), 'url' => RewriteDetail($rec->Ean, $rec->Titre.'-'.$rec->Auteurs) ); if (++$nb >= TAILLE_PALMARES_FULL) break; } unset($nb); $count_palm = count($palmares_livres); if ($count_palm < 3) $palmares_existe = false; $cache_mv->setObject("palm_liv_cache",$palmares_livres); } } // if(!$count_palm) header("Location: /index.php"); $NOMBRE = 20; // par page if($count_palm < $NOMBRE && $count_palm > 0) $NOMBRE = $count_palm; $page_mv = (isset($_GET['page'])) ? $_GET['page'] : 1; $DEBUT = ($page_mv-1) * $NOMBRE; $FIN = $DEBUT + $NOMBRE -1; if (!isset($tri)) $tri=""; $NB_PAGES = ceil($count_palm/$NOMBRE); $tabAffichPalm = array(); foreach ($palmares_livres as $k=>$palm) { if($k < $DEBUT) continue; $tabAffichPalm[$k] = $palm; if($k >= $FIN) break; } $nav = ''; // include HTML include 'tet_html.php'; include "menu.php"; ?>

  • TOP VENTES NUMÉRIQUES

$livre) { if(($i) % 4 == 0) echo '

*/?>



'; //echo 'nbpage : '.$NB_PAGES.' - $page_mv : '.$page_mv; ?>