-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRest.php
More file actions
144 lines (121 loc) · 5.15 KB
/
Copy pathRest.php
File metadata and controls
144 lines (121 loc) · 5.15 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php include("partials-front/menu-front.php") ?>
<div class="intro" style="background:url('images/Rest-images/simple2.webp') center no-repeat;height:100vh;background-size: cover;justify-content:center">
<div class="symbol">
<img src="images/1618672896262.png">
<h2>LM & STORE</h2>
</div>
</div>
<div class="Categories">
<div class="title-Categories">
<h2>EXPLORE CATEGORIES</h2>
</div>
<div class="big-box-Categories">
<?php
$sql = "SELECT * from tbl_category where tbl_category.active='Yes' and tbl_category.featured='Yes' limit 2";
$stmt = $db->prepare($sql);
$stmt->execute();
$row2 = $stmt->fetchAll();
if (count($row2) > 0) {
foreach ($row2 as $row) {
$title = $row["title"];
$id = $row["id"];
if ($row['image_name'] == "" or $row['image_name'] == null) {
$image_name = "images/category-image/no-image.webp";
} else {
$image_name = "images/category-image/" . $row['image_name'];
if (file_exists($image_name)) {
$image_name = $image_name;
} else {
$image_name = "images/category-image/no-image.webp";
}
}
echo '
<div class="box1-Categories" style="background-image: url(' . $image_name . ');">
<div class="border-categories">
<h2>' . $title . '</h2>
<a href="category-foods.php?id=' . $id . '" class="btn">
CHEK CATEGORIES
</a>
</div>
</div>
';
}
} else {
echo '
<div class="nope" style="width:100%;">
Nothing
</div>
';
}
?>
</div>
</div>
<div class="title-categories">
<h2><a href="categories.php">SEE ALL CATEGORIES</a></h2>
</div>
<div class="title-foods">
<h2>EXPLORE FOODS</h2>
</div>
<section>
<div class="swiper-container">
<div class="swiper-wrapper">
<?php
$sql2 = "SELECT * from tbl_food where tbl_food.active='Yes' and tbl_food.featured='Yes' limit 6";
$stmt2 = $db->prepare($sql2);
$stmt2->execute();
$row4 = $stmt2->fetchAll();
if (count($row4) > 0) {
foreach ($row4 as $row3) {
$food_id = $row3["id"];
$title = $row3["title"];
$price = $row3["price"];
$description = $row3["description"];
if ($row3['image_name'] == "" or $row3['image_name'] == null) {
$image_name = "images/food-image/no-image.webp";
} else {
$image_name = "images/food-image/" . $row3['image_name'];
if (file_exists($image_name)) {
$image_name = $image_name;
} else {
$image_name = "images/food-image/no-image.webp";
}
}
echo '
<div class="swiper-slide" >
<div class="card">
<div class="face face1">
<div class="content">
<img src="' . $image_name . '" >
<h3>' . $title . '</h3>
</div>
</div>
<div class="face22 face2">
<div class="content">
<h3>' . $price . ' DA</h3>
<p>
' . $description . '
</p>
<a href="order.php?id=' . $food_id . '">ORDER NOW</a>
</div>
</div>
</div>
</div>
';
}
} else {
echo '
<div class="nope">
Nothing
</div>
';
}
?>
</div>
<div class="more">
<a href="foods.php">
<h2>SEE ALL FOOD </h2>
</a>
</div>
</div>
</section>
<?php include("partials-front/footer-front.php") ?>