forked from gburton/CE-Phoenix
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproduct_info.php
30 lines (21 loc) · 1.03 KB
/
product_info.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/*
$Id$
CE Phoenix, E-Commerce made Easy
https://phoenixcart.org
Copyright (c) 2021 Phoenix Cart
Released under the GNU General Public License
*/
require 'includes/application_top.php';
if (!isset($_GET['products_id'])) {
Href::redirect($Linker->build('index.php'));
}
require language::map_to_translation('product_info.php');
$product_info_query = $db->query("SELECT p.*, pd.* FROM products p, products_description pd where p.products_status = 1 and p.products_id = " . (int)$_GET['products_id'] . " and pd.products_id = p.products_id and pd.language_id = " . (int)$_SESSION['languages_id']);
if ($product_info = $product_info_query->fetch_assoc()) {
$db->query("UPDATE products_description SET products_viewed = products_viewed+1 WHERE products_id = " . (int)$_GET['products_id'] . " and language_id = " . (int)$_SESSION['languages_id']);
require $Template->map(__FILE__, 'page');
} else {
require $Template->map('product_info_not_found.php', 'page');
}
require 'includes/application_bottom.php';