-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
90 lines (78 loc) · 3.08 KB
/
index.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
<?php
include("include/connect.php");
$query = "select * from category";
$results1 = mysqli_query($conn,$query) or die("Cannot connect");
$query1 = "select * from product";
$results2 = mysqli_query($conn,$query1) or die("Cannot connect");
$query3 = "select * from product";
$results3 = mysqli_query($conn,$query3);
$t = mysqli_num_rows($results3);
?>
<!doctype html>
<html lang="en">
<head>
</head>
<body>
<?php
include ('header.php');
?>
<!---- content box--->
<div class="ui main container">
<div class="ui grid">
<div class="three wide column">
<div class="ui vertical menu">
<a class="item">
<div class="header"><h3>Products Categories</h3></div>
</a>
<?php
while ($row = mysqli_fetch_assoc($results1))
{
?>
<a class="item" href="categoryDetails.php?id=<?php echo $row['id']; ?>" > <?php echo strtoupper($row['name']); ?> </a>
<?php } ?>
</div>
</div>
<div class="thirteen wide column">
<div class="ui fluid message">
<h3 style="align-self: flex-start">Featured Products <div style="float: right"><?php echo $t ?>+ featured products</div></h3>
<div class="ui three column grid">
<?php
while ($row = mysqli_fetch_assoc($results2))
{
?>
<div class="column">
<div class="ui segment">
<a class="item">
<center>
<img src='product_images/<?php echo $row["prod_image"]?>'> <br>
<strong><?php echo mb_strtoupper($row["name"]);?></strong><br>
Price : Rs
<?php echo $row["price"];?><br>
<div class="ui vertical animated blue button" tabindex="0">
<div class="hidden content"> <a href="productDetails.php?id=<?php echo $row["id"]?>">Shop</a></div>
<div class="visible content">
<i class="shop icon"></i>
</div>
</div>
<div class="ui animated google button" tabindex="0">
<div class="hidden content"> <a href="productDetails.php?id=<?php echo $row["id"]?>">Details</a></div>
<div class="visible content">
<i class="content icon"></i>
</div>
</div>
</center>
</a>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<!----- footer------>
<?php
include('footer.php');
?>
</body>
</html>