ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/computer3/litsolide.com/ODLDDD_2/includes/ |
Upload File : |
<?php
//****************************************************************************************//
//******************************* Menu du haut (catégories) ******************************//
//****************************************************************************************//
$sqlm = $GLOBALS['bdd']->query('SELECT id, seo, parent_id, name, picture FROM marques
WHERE status = 1 AND parent_id = 0
ORDER BY position');
$marques = $sqlm->fetchAll();
$sql = $GLOBALS['bdd']->query('SELECT * FROM categories
WHERE status = 1
ORDER BY position');
$categories = $sql->fetchAll();
$sqlc = $GLOBALS['bdd']->query('SELECT location, title, id, seo FROM cms
WHERE status = 1
ORDER BY position');
$cms = $sqlc->fetchAll();
$sqlb = $GLOBALS['bdd']->query('SELECT seo, title, picture, date_insere FROM blog
WHERE status = 1
ORDER BY position');
$blog = $sqlb->fetchAll();
$sqlmm = $GLOBALS['bdd']->query('SELECT * FROM pos_menu
WHERE status = 1
ORDER BY position');
$pos_menu = $sqlmm->fetchAll();
$sqlp = $GLOBALS['bdd']->query("SELECT * FROM pos_menu WHERE name = 'produits'");
$menpp = $sqlp->fetch();
$position_produits = $menpp['position'];
$status_produits = $menpp['status'];
//////////////////////////////////////////////////////////////////////////////// MENU ETENDU
if ($grande_contenance >0){
function afficher_menu($parent, $niveau, $array, $status_produits, $topMenu, $position_produits, $pos_menu, $situer, $tslesarticles, $formulaire_contact, $bloc_6, $bloc_0, $bloc_1, $bloc_2, $bloc_3, $bloc_4, $bloc_5, $cms, $articles, $marques, $marq_names_menu, $sous_marq, $menu_impro, $txt_events, $act_events, $discount_existe, $margeMenu, $act_marq, $AffiPrix ) {
// Produits aleatoires
$act_prodmen = "1"; // Activation prod aleatoire
if ($AffiPrix >0) {
$sql = $GLOBALS['bdd']->query('SELECT pa.id_attribute, p.id, p.seo, p.name, p.price, p.discount, pp.picture, p.hstock, p.stock, m.name AS lamarque FROM products p
INNER JOIN products_pictures pp
ON pp.id_product = p.id
LEFT JOIN products_marques pm
ON pm.id_product = p.id
LEFT JOIN marques m
ON m.id= pm.id_marque
LEFT JOIN products_attributes pa
ON pa.id_product = p.id
WHERE p.status = 1 AND p.featured = 1 AND pp.position = 1 AND p.hstock < 1
ORDER BY RAND()');
$men = $sql->fetch();
$menu_image = $men['picture'];
} else {
$sql = $GLOBALS['bdd']->query('SELECT pa.id_attribute, p.id, p.seo, p.name, p.price, p.discount, pp.picture, p.hstock, p.stock, m.name AS lamarque FROM products p
INNER JOIN products_pictures pp
ON pp.id_product = p.id
LEFT JOIN products_marques pm
ON pm.id_product = p.id
LEFT JOIN marques m
ON m.id= pm.id_marque
LEFT JOIN products_attributes pa
ON pa.id_product = p.id
WHERE p.status = 1 AND p.featured = 1 AND pp.position = 1
ORDER BY RAND()');
$men = $sql->fetch();
$menu_image = $men['picture'];
}
/////////////////////////////////////////////////
// MENU
$html = "";
$niveau_precedent = 0;
if (!$niveau && !$niveau_precedent) {
$html .= "\n<ul class=\"dropdown dropdown-linear dropdown-columnar\" >\n";
// SI MODULE AVANT PRODUITS
///////////////////////////
foreach ($pos_menu AS $poss) {
if ($poss['position'] < $position_produits) {
$name_module = $poss['name'];
include('menu/'. $name_module .'.php');
}
}
}
if ($status_produits >0) {
/////////////////////////////////////////////////////////////////
// Produits
$pop=0;
foreach ($array AS $noeud) { $pop=$pop+1;
if ($parent == $noeud['parent_id']) {
if ($niveau_precedent < $niveau) {
if ($topMenu > 0) { $popy = "2"; } else { $popy = "20000"; }
if ($popy > 0) {
if ($pop ==$popy) {
$html .= "\n<ul><li style='display: inline;background: #fff;float: right;margin-top:35px;'><a href=\"produit-".$men['seo']." \" style='margin-left:0;border:1px solid #eee;background: transparent;color: #000; font-weight: bold;padding:20px 0 20px 0' >
<figure class='bloc_une' style='background: transparent; padding: 0; width: 100%; margin-top: 0px; margin-bottom: 0px; margin-left:auto; border:0; border-radius: 0'><img src='uploadfiles/products/mini/" . $menu_image . "' alt='' title='' style='height: 120px;display: inline;margin-top: 5px;border-radius: 4px' />
<figcaption class='bloc_une' style='margin-top:10px'>". $men['name'] ."";
if (!empty($men['lamarque'])) {
$html .= "<br /><span style='font-size: 14px; color: #cc0000;'>". $men['lamarque'] ."</span><br />";
} else {
$html .= "<br />";
}
if ($AffiPrix >0) {
$html .= "";
$price = number_format($men['price'], 2, ',', ' ');
if ($men['discount'] < 1) {
$html .= "<br /><span style='font-size: 24px; color: #cc0000;font-weight:100;'>". $price ." €</span>";
} else {
$prom = $men['price'] - $men['price'] * ($men['discount'] / 100);
$prom = number_format($prom, 2, ',', ' ');
$html .= "<br /><span style='font-size: 18px;color: #000;font-weight:100;text-decoration:line-through'>". $price ." €</span>";
$html .= "<br /><br /><span style='font-size: 24px;color: #cc0000;font-weight:100'>". $prom ." €</span>";
}
} else {
$html .= "<br /><span style='font-size: 22px;color: #000;font-weight:100; '><i class=\"fa fa-eye fa-2x\" ></i></span>";
}
$html .= "</figcaption></figure></a></li>";
} else {
$html .= "\n<ul>\n";
}
} else {
$html .= "\n</ul>\n";
}
}
// image sur categories
if ($noeud['parent_id'] >0) { $limage = "<img src='uploadfiles/categories/" . $noeud['vignette_menu'] . "' alt='' title='' style='height: 72px;display: inline;margin-top: 0px;border-radius: 0px' />"; } else { $limage = ""; }
if (($noeud['parent_id'] >0) AND (!empty($noeud['vignette_menu']))){
$html .= "<li>" .$limage. "<br /><a href=\"categorie-" . $noeud['seo'] . "\" class=\"dir\"> " . stripcslashes($noeud['name']) . " </a>";
} else {
$html .= "<li><a href=\"categorie-" . $noeud['seo'] . "\" class=\"dir\"> " . stripcslashes($noeud['name']) . " </a>";
}
// fin image sur categories
// $html .= "<li><a href=\"categorie-" . $noeud['seo'] . "\" class=\"dir\"> " . stripcslashes($noeud['name']) . " </a>";
$niveau_precedent = $niveau;
$html .= afficher_menu($noeud['id'], ($niveau + 1), $array, $status_produits, $topMenu, $position_produits, $pos_menu, $situer, $tslesarticles, $formulaire_contact, $bloc_6, $bloc_0, $bloc_1, $bloc_2, $bloc_3, $bloc_4, $bloc_5, $cms, $blog, $marques, $marq_names_menu, $sous_marq, $menu_impro, $txt_events, $act_events, $discount_existe, $margeMenu, $act_marq, $AffiPrix) ;
}
}
}
if (($niveau_precedent == $niveau) && ($niveau_precedent != 0))
{
$html .= "</ul>\n</li>\n";
}
elseif ($niveau_precedent == $niveau)
{
/////////////////////////////////////////////////////////////////
// SI MODULE APRES PRODUITS
////////////////////////////
// SI MODULE AVANT PRODUITS
///////////////////////////
foreach ($pos_menu AS $poss) {
if ($poss['position'] > $position_produits) {
$name_module = $poss['name'];
include('menu/'. $name_module .'.php');
}
}
////////////////////////////
// Fin menu
$html .= "</ul>\n";
} else {
$html .= "</li>\n";
}
return $html;
}
$smarty->assign("menu", afficher_menu(0, 0, $categories, $status_produits, $topMenu, $position_produits, $pos_menu, $situer, $tslesarticles, $formulaire_contact, $bloc_6, $bloc_0, $bloc_1, $bloc_2, $bloc_3, $bloc_4, $bloc_5, $cms, $blog, $marques, $marq_names_menu, $sous_marq, $menu_impro, $txt_events, $act_events, $discount_existe, $margeMenu, $act_marq, $AffiPrix));
}
/////////////////////////////////////////////////////////////////////////////////////////////
//****************************************************************************************//
//*********************************** Menu Responsive ************************************//
//****************************************************************************************//
function afficher_menu_responsive($parent, $niveau, $array, $bloc_4, $bloc_5, $cms, $articles, $marques, $marq_names_menu, $sous_marq, $menu_impro, $txt_events, $act_events, $act_marq, $AffiPrix) {
$html = "";
$niveau_precedent = 0;
if (!$niveau && !$niveau_precedent) {
$html .= "\n<ul class=\"nav\">\n";
if(in_array(basename($_SERVER['PHP_SELF']), array('index.php')))
{
$html .= "<li class=\"active\"><a href=\"index.php\">ACCUEIL</a>";
}
else
{
$html .= "<li><a href=\"index.php\">ACCUEIL</a>";
}
if($act_marq >0)
{
$html .= '<li><a href="#" class="dir">'.strtoupper($marq_names_menu).'</a>' . "\n";
$html .= "<ul>\n";
foreach ($marques AS $marq) {
$html .= "<li><a href=\"w-" . $marq['seo'] . "\" class=\"dir\"><b>" . stripcslashes($marq['name']) . "</b></a>";
}
$html .= "</ul></li>\n";
}
}
foreach ($array AS $noeud) {
if ($parent == $noeud['parent_id']) {
if ($niveau_precedent < $niveau) {
$html .= "\n<ul>\n";
}
//$html .= "<a onclick="javascript: showmenu(document.getElementById('sousmenu1'));" style="cursor: pointer;">" . $noeud['nom'] . "</a>";
if(in_array(basename($_SERVER['PHP_SELF']), array('category.php')) && $_GET['seo'] == $noeud['seo'])
{
$html .= "<li class=\"active\"><a href=\"categorie-" . $noeud['seo'] . "\">" . stripcslashes(strtoupper($noeud['name'])) . "</a>";
}
else
{
$html .= "<li><a href=\"categorie-" . $noeud['seo'] . "\">" . stripcslashes(strtoupper($noeud['name'])) . "</a>";
}
//$html .= "<li><a href=\"<? echo format_url($noeud['nom'])); .html"\">" . $noeud['nom'] . "</a>";
$niveau_precedent = $niveau;
$html .= afficher_menu_responsive($noeud['id'], ($niveau + 1), $array, $bloc_4, $bloc_5, $cms, $blog, $marques, $marq_names_menu, $sous_marq, $menu_impro, $txt_events, $act_events, $act_marq, $AffiPrix);
}
}
if (($niveau_precedent == $niveau) && ($niveau_precedent != 0))
{
$html .= "</ul>\n</li>\n";
}
elseif ($niveau_precedent == $niveau)
{
if ($AffiPrix >0) {
if ($discount_existe >0) {
if (in_array(basename($_SERVER['PHP_SELF']), array('discounts.php')))
{
$html .= '<li class="active"><a href="promotions">'.$menu_impro.'</a></li>' . "\n";
}
else
{
$html .= '<li><a href="promotions">'.$menu_impro.'</a></li>' . "\n";
}
}
}
if (in_array(basename($_SERVER['PHP_SELF']), array('events.php')))
{
$html .= '<li class="active"><a href="evenements">'.strtoupper($txt_events).'</a></li>' . "\n";
}
else
{
$html .= '<li><a href="evenements">'.strtoupper($txt_events).'</a></li>' . "\n";
}
if (in_array(basename($_SERVER['PHP_SELF']), array('blog.php')))
{
$html .= '<li class="active"><a href="blog">'.strtoupper($bloc_4).'</a></li>' . "\n";
}
else
{
$html .= '<li><a href="blog">'.strtoupper($bloc_4).'</a></li>' . "\n";
}
if (in_array(basename($_SERVER['PHP_SELF']), array('contact.php')))
{
$html .= '<li class="active"><a href="contact.php">'.strtoupper($bloc_5).'</a></li>' . "\n";
}
else
{
$html .= '<li><a href="contact.php">'.strtoupper($bloc_5).'</a></li>' . "\n";
}
$html .= "</ul>\n";
}
else
{
$html .= "</li>\n";
}
return $html;
}
$smarty->assign("menu_responsive", afficher_menu_responsive(0, 0, $categories, $bloc_4, $bloc_5, $cms, $blog, $marques, $marq_names_menu, $sous_marq, $menu_impro, $txt_events, $act_events, $act_marq, $AffiPrix));
?>