-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.php
97 lines (81 loc) · 4.22 KB
/
menu.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<section id="advertisement">
<div class="container">
<img src="images/shop/PLP-Coffee_2_2.png" alt="" />
</div>
</section>
<section>
<div class="container">
<div class="row">
<div class="col-sm-3">
<?php include 'sidebar.php'; ?>
</div><!--/category-productsr-->
<div class="col-sm-9 padding-right">
<div class="features_items"><!--features_items-->
<h2 class="title text-center">Products</h2>
<?php
if(isset($_POST['search'])) {
$query = "SELECT * FROM `tblpromopro` pr , `tblproduct` p , `tblcategory` c
WHERE pr.`PROID`=p.`PROID` AND p.`CATEGID` = c.`CATEGID` AND PROQTY>0
AND ( `CATEGORIES` LIKE '%{$_POST['search']}%' OR `PRODESC` LIKE '%{$_POST['search']}%' or `PROQTY` LIKE '%{$_POST['search']}%' or `PROPRICE` LIKE '%{$_POST['search']}%')";
}elseif(isset($_GET['category'])){
$query = "SELECT * FROM `tblpromopro` pr , `tblproduct` p , `tblcategory` c
WHERE pr.`PROID`=p.`PROID` AND p.`CATEGID` = c.`CATEGID` AND PROQTY>0 AND CATEGORIES='{$_GET['category']}'";
}else{
$query = "SELECT * FROM `tblpromopro` pr , `tblproduct` p , `tblcategory` c
WHERE pr.`PROID`=p.`PROID` AND p.`CATEGID` = c.`CATEGID` AND PROQTY>0 ";
}
$mydb->setQuery($query);
$res = $mydb->executeQuery();
$maxrow = $mydb->num_rows($res);
if ($maxrow > 0) {
$cur = $mydb->loadResultList();
foreach ($cur as $result) {
?>
<form method="POST" action="cart/controller.php?action=add">
<input type="hidden" name="PROPRICE" value="<?php echo $result->PROPRICE; ?>">
<input type="hidden" id="PROQTY" name="PROQTY" value="<?php echo $result->PROQTY; ?>">
<input type="hidden" name="PROID" value="<?php echo $result->PROID; ?>">
<div class="col-sm-4">
<div class="product-image-wrapper">
<div class="single-products">
<div class="productinfo text-center">
<img src="<?php echo web_root.'admin/products/'. $result->IMAGES; ?>" alt="" />
<h2>€ <?php echo $result->PRODISPRICE; ?></h2>
<p><?php echo $result->PRODESC; ?></p>
<button type="submit" name="btnorder" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>
</div>
<div class="product-overlay">
<div class="overlay-content">
<h2>€ <?php echo $result->PRODISPRICE; ?></h2>
<p><?php echo $result->PRODESC; ?></p>
<button type="submit" name="btnorder" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</button>
</div>
</div>
</div>
<div class="choose">
<ul class="nav nav-pills nav-justified">
<li>
<?php
if (isset($_SESSION['CUSID'])){
echo ' <a href="'.web_root. 'customer/controller.php?action=addwish&proid='.$result->PROID.'" title="Add to wishlist"><i class="fa fa-plus-square"></i>Add to wishlist</a></a>
';
}else{
echo '<a href="#" title="Add to wishlist" class="proid" data-target="#smyModal" data-toggle="modal" data-id="'. $result->PROID.'"><i class="fa fa-plus-square"></i>Add to wishlist</a></a>
';
}
?>
</li>
</ul>
</div>
</div>
</div>
</form>
<?php }
}else{
echo '<h1>No Products Available</h1>';
}?>
</div><!--features_items-->
</div>
</div>
</div>
</section>