-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
329 lines (302 loc) · 14.9 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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<head>
<!-- Meta Tags -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Title -->
<title>Home - Grain Mill Market and Delivery</title>
<!-- Style Sheet -->
<link rel="stylesheet" type="text/css" href="CSS/global.css"/>
<link rel="stylesheet" type="text/css" href="CSS/header.css">
<link rel="stylesheet" type="text/css" href="CSS/index.css"/>
<link rel="stylesheet" type="text/css" href="CSS/footer.css"/>
<link rel="stylesheet" type="text/css" href="CSS/market.css"/>
</head>
<?php
class Index
{
public $queryExecution;
public $terminator;
public $DB_Connector;
public function __construct()
{
$this->DB_Connector = include "commons/DB_connector.php";
}
public function includeHeader()
{
require_once "commons/Header.php";
}
public function includeFooter()
{
require_once "commons/footer.php";
}
public function display()
{
$this->includeHeader();
$this->displayBody();
$this->includeFooter();
}
public function fetchProducts(){
$proSelector = "SELECT * FROM products ORDER BY RAND()";
$this->queryExecution = mysqli_query($this->DB_Connector, $proSelector);
return $this->queryExecution;
}
protected function displayBody()
{
?>
<div class="container">
<main>
<div class="hero">
<div class="hero-contents">
<video controls align="left" autoplay muted>
<source src="images/video.mp4" type="video/mp4"/>
<source src="movie.ogg" type="video/ogg"/>
Your browser does not support the video tag.
</video>
<div class="hero-text">
<h1>Grain-Mill Market and Delivery</h1>
<h2>Get it Milled.</h2>
<a href="pages/market.php">Shop Now</a>
<a href="pages/register.php">Register</a>
</div>
</div>
</div> <!-- hero -->
<!-- About -->
<div id="about">
<h3 class="main_title">ABOUT US</h3>
<div class="container">
<div class="about-img">
<img src="img/about.png" alt="about" usemap="#image-map"/>
<!-- Image Map Generated by http://www.image-map.net/ -->
<map name="image-map">
<area
target=""
alt="ater"
title="ater"
href="pages/market.php"
coords="293,452,91"
shape="circle"
/>
<area
target=""
alt="misr"
title="misr"
href="functions/productDetails.php?pro-detail-id=?"
coords="476,378,81"
shape="circle"
/>
<area
target=""
alt="bakela"
title="bakela"
href="pages/market.php"
coords="114,341,91"
shape="circle"
/>
<area
target=""
alt="boleke"
title="boleke"
href="pages/market.php"
coords="225,136,113"
shape="circle"
/>
<area
target=""
alt="shimbra"
title="shimbra"
href="functions/productDetails.php?pro-detail-id=?"
coords="409,207,82"
shape="circle"
/>
<area
target="_blank"
alt="kitel"
title="kitel"
href="pages/login.php"
coords="236,325,279,340,318,344,364,344,380,313,348,278,314,256,263,252,212,265"
shape="poly"
/>
</map>
</div>
<div class="about-section">
<p class="about-description">
We strive to offer excellent services to our prestigious customers &
are known for trusted & superior quality of products. All the
products are stored safely in our clean & updated store.
Understanding our customer's need & demand, we provide a wide
variety of pulses & cereals of high nutritional value. With the
professional approach to a traditional niche, we offer prompt &
on-time services.
</p>
</div>
</div>
</div>
<!-- Products -->
<div id="products">
<div class="container">
<div class="products-grid">
<?php
$this->terminator = 1;
$profetch = $this->fetchProducts();
while ($proShow = mysqli_fetch_assoc($profetch)){ ?>
<div class="products-section">
<a href="functions/productDetails.php?pro_detail_id=<?php echo $proShow['ID'] ?>">
<h3 class="product-name"><?php echo $proShow['Name']?></h3>
<img src="admin/<?php echo $proShow['Picture']?>" alt="<?php echo $proShow['Name']?>"/>
<h4 class="product-name">Price: <?php echo $proShow['Price']?>/Kg</h4>
<h4 class="product-name">Milling Price: <?php echo $proShow['milling_price']?>/Kg</h4>
</a>
</div>
<?php
if ($this->terminator === 6){
break;
}
$this->terminator++; } ?>
</div>
<div class="load-more">
<br>
<a href="pages/market.php">Load More</a><br><hr>
</div>
<style>
.products-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
.products-section {
display: flex;
flex-direction: column;
align-items: center;
}
.product-name {
margin-top: 10px;
font-size: 14px;
}
</style>
</div>
</div>
<!-- features -->
<div id="features">
<h3 class="main_title" align="center">Services</h3>
<div class="feature__content">
<div class="feature__data">
<div>
<!-- <img src="images/beans.jpg" height="220" class="feature__img"/>-->
<span class="feature__subtitle">
<h4 class="feature-title">Variety of Grains and Mill Products</h4>
<p class="feature-description">
We offer a wide selection of grains and mill products, from wheat
to barley, oats to rye, and more. Our selection is sure to meet
all your needs for baking, cooking, or brewing.
</p>
</span>
</div>
<div>
<span class="feature__rounder"></span>
<span class="feature__line"></span>
</div>
</div>
<div class="feature__data">
<div></div>
<div>
<span class="feature__rounder"></span>
<span class="feature__line"></span>
</div>
<div>
<!-- <img-->
<!-- src="images/beans.jpg"-->
<!-- height="220"-->
<!-- />-->
<span class="feature__subtitle">
<h4 class="feature-title">Automated Delivery System</h4>
<p class="feature-description">
Our automated delivery system allows customers to order their
grains and mill products with ease and convenience. We offer fast
and reliable delivery services to ensure that your orders arrive
on time.
</p>
</span>
</div>
</div>
<div class="feature__data">
<div>
<!-- <img-->
<!-- src="images/beans.jpg"-->
<!-- height="220"-->
<!-- />-->
<span class="feature__subtitle">
<h4 class="feature-title">Quality Assurance</h4>
<p class="feature-description">
All of our grains and mill products are sourced from trusted
suppliers who guarantee the highest quality standards in the
industry. We take pride in providing our customers with the best
products available.
</p>
</span>
</div>
<div>
<span class="feature__rounder"></span>
<span class="feature__line"></span>
</div>
</div>
<div class="feature__data">
<div></div>
<div>
<span class="feature__rounder"></span>
<!-- <span class="qualification__line"></span> -->
</div>
<div>
<!-- <img-->
<!-- src="images/beans.jpg"-->
<!-- height="220"-->
<!-- />-->
<span class="feature__subtitle">
<h4 class="feature-title">Secure Payment System</h4>
<p class="feature-description">
We use a secure payment system that ensures your information is
kept safe and secure at all times. You can rest assured that your
transactions are safe with us.
</p>
</span>
</div>
</div>
</div>
</div>
<!-- gallery -->
<div id="gallery">
<div class="container">
<h3 class="main_title">gallery</h3>
<div class="section">
<div class="gallery-section" align="center">
<img src="images/gallery/1.jpg" alt=""/>
<img src="images/gallery/2.jpg" alt=""/>
<img src="images/gallery/3.jpg" alt=""/>
</div>
</div>
</div>
</div>
<!-- Team -->
<div id="team">
<h3 class="main_title" align="center">Team</h3>
<div class="team-container">
<?php
$Devs = "SELECT * FROM developers";
$DevsQuery = mysqli_query($this->DB_Connector, $Devs);
while ($Developers=mysqli_fetch_assoc($DevsQuery)){
?>
<div class="team-member">
<img src="<?php echo $Developers['Picture']?>" width="200"/>
<p class="title"><?php echo $Developers['First_Name'].$Developers['Last_name']?></p>
<p class="subtitle"><?php echo $Developers['Job']?></p>
</div>
<?php } ?>
</div>
</div>
</main> <!-- Main Area -->
</div>
<?php
}
}
$page = new Index();
$page->display();
?>