ÿØÿà 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/ |
Upload File : |
<?php
/*
Module : Front-Office - Accueil
Date : Juin 2015
Version Shop : V15.6
Auteur : Guillaume MADIOT - Computer 64
*/
//****************************************************************************************//
//************************************* Configuration ************************************//
//****************************************************************************************//
// Chargement fichiers de configuration.
require('libs/Smarty.class.php');
// Démarrage du moteur TPL.
$smarty = new Smarty;
// Chargement des Fonctions Globals.
require('fonctions.php');
//****************************************************************************************//
//**************************************** Article ***************************************//
//****************************************************************************************//
$sql = $GLOBALS['bdd']->prepare('SELECT id, title, picture, content, date_insere, date_edit, author, source FROM blog
WHERE seo = :seo AND status = 1');
$sql->execute(array('seo' => $_GET['seo']));
$result = $sql->fetchAll();
$article = $result[0]['id'];
$smarty->assign("article", $result[0]);
// Facebook partage
$img_facebook= $result[0]['picture'];
$Image_facebook_defaut = "logo.png";
if ($img_facebook==''){ $img_facebook=$Image_facebook_defaut; $dossier_faceb = "templates/shop/img/"; } else { $dossier_faceb = "uploadfiles/blog/"; $img_facebook=$img_facebook; }
$url_img_faceb = $dossier_faceb . $img_facebook;
$smarty->assign("img_facebook", $url_img_faceb);
$smarty->assign("seo", $_GET['seo']);
//****************************************************************************************//
//************************************ Produits associés *********************************//
//****************************************************************************************//
$sql = $GLOBALS['bdd']->prepare('SELECT pa.id_attribute, p.id, p.avis, p.note, p.seo, p.name, p.price, p.cle_tva, p.discount, p.hstock, p.stock, pp.picture, m.name AS lamarque FROM products p
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
INNER JOIN products_pictures pp
ON pp.id_product = p.id
INNER JOIN blog_products bp
ON bp.id_product = p.id
WHERE p.status = 1 AND bp.id_blog = :article AND pp.position = 1
GROUP BY p.id ORDER BY p.position');
$sql->execute(array('article' => $article));
$result = $sql->fetchAll();
$smarty->assign("products", $result);
//*************************************** Affichage **************************************//
$smarty->display('blog-article.tpl');
?>