ÿØÿà 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/lavignotte.com/ |
Upload File : |
<?php
$smarty->assign("act_partage", $act_partage);
$smarty->assign("url_partage", $url_partage);
$smarty->assign("go_retour", $_SERVER["HTTP_REFERER"]);
if (!isset($_GET['ct'])) {
// Etape 1 - Cherche et affiche les pages du menu distant CATEGORIES Click & Collect
/**********************************************************************************/
$sql= $GLOBALS_2['bdd']->prepare('SELECT *, p.partage AS partage, p.id AS pid, c.meta_keywords AS motscle, c.parent_id AS parent_idc, c.name AS namec, c.id AS idc FROM products p
RIGHT JOIN products_categories pc
ON pc.id_product = p.id
RIGHT JOIN categories c
ON c.id = pc.id_category
WHERE c.status = 1
GROUP BY c.id
ORDER BY c.position ');
$sql->execute();
$result = $sql->fetchAll();
$smarty->assign("category", $result);
} else {
// Etape 2 - Cherche et affiche les produits du menu distant CATEGORIES Click & Collect
/**********************************************************************************/
$ct = $_GET['ct'];
$smarty->assign("ct", $ct);
$sql= $GLOBALS_2['bdd']->prepare('SELECT *, p.partage AS partage, p.name AS namep, c.name AS namec, p.id AS pid FROM products p
RIGHT JOIN products_categories pc
ON pc.id_product = p.id
RIGHT JOIN categories c
ON c.id = pc.id_category
RIGHT JOIN products_pictures pp
ON pp.id_product = p.id
WHERE pp.position = 1 AND pc.id_category = '.$ct.'
ORDER BY p.position ');
$sql->execute();
$result = $sql->fetchAll();
$cat_vignette_menu = $result[0]['vignette_menu'];
$smarty->assign("cat_vignette_menu", $cat_vignette_menu);
$cat_name = $result[0]['namec'];
$smarty->assign("cat_name", $cat_name);
$smarty->assign("product", $result);
}
?>