blob: 33fc6f5c0bb550f81e80e88bb00e0c1901cbcc26 (
plain)
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
31
32
33
34
|
<?php
session_start();
require_once('vendor.inc.php');
if(isset($_GET['id']))
{
$id = $_GET['id'];
}
else
{
header('Location: categories.php');
}
if(isset($_GET['catid']))
{
$catid = $_GET['catid'];
}
$product = ProductQuery::create()->findOneById($id);
if ( !is_object($product) )
{
header('Location: categories.php');
}
$smarty = new Smarty;
$smarty->assign('loggedin', isset($_SESSION['username']));
$smarty->assign('product', $product);
$smarty->assign('id', $id);
$smarty->assign('catid', $catid);
$smarty->display('productdetails.tpl')
?>
|