-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHOMEPAGE.php
More file actions
340 lines (268 loc) · 12.7 KB
/
Copy pathHOMEPAGE.php
File metadata and controls
340 lines (268 loc) · 12.7 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
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
330
331
332
333
334
335
336
337
338
339
340
<?php
session_start();
$_SESSION['email'];
$email=$_SESSION['email'] ;
require 's_header.php';
require 'b_db_key.php';
$sql="SELECT * FROM buyer where email='$email'";
$conn = connect_db();
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$name = $row["name"];
?>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="HOMEPAGE.css">
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css' />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
body
{
background-color: white;
}
.container
{
width:60%;
height: 50%;
align-items: center;
}
h2
{
text-align: center;
}
.asd
{
border: 1px solid ;
}
.footer
{
background-color: #181818;
width:100%;
padding:30px;
color: white;
}
table {
border-collapse: collapse;
width: 100%;
color: #588c7e;
font-family: monospace;
font-size: 15px;
text-align: center;
}
th {
background-color: #588c7e;
color: white;
}
tr:nth-child(odd) {background-color: #f2f2f2}
.zoom {
padding: 50px;
background-color: transparent;
transition: transform .2s; /* Animation */
width: 200px;
height: 200px;
margin: 0 auto;
}
.zoom:hover {
transform: scale(1.5); /* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar">
<div class="container-fluid">
<div class="navbar-header">
<li><a class="btn btn-outline-info" href="HOMEPAGE.php"><i class="fas fa-store" style="color:black;"> <h4>APNA BAZAAR</h4></i></a></li>
</div>
<ul class="nav navbar-nav">
<li ><a href="HOMEPAGE.php" class="btn-inline-info"><i class="fas fa-home" style="color:black;"><h4>HOME</h4></i></a></li>
<li class="dropdown">
<a href="javascript:void(0)" class="dropbtn"><i class="fas fa-th-list mt-2" style="color:black;"><h4>CATEGORY</h4></i></a>
<div class="dropdown-content">
<form action='b_retrive.php' method='POST'>
<button class = 'btn btn-outline-info' class="fas fa-food" type = 'submit' value = 'FOODS' name= 'FOODS'><h4><i class="fas fa-apple-alt" style="color:black;"> FOODS </i></h4></button><br>
<button class = 'btn btn-outline-info' type = 'submit' value = 'PERSONAL_CARE' name= 'PERSONAL_CARE'><h4><i class="fas fa-spa" style="color:black;"> PERSONAL CARE</i></h4></button><br>
<button class = 'btn btn-outline-info' type = 'submit' value = 'FASHION' name= 'FASHION'><h4><i class="fas fa-tshirt" style="color:black;"> FASHION</i></h4></button><br>
</form>
</div>
</li>
<li ><a href="show_cart.php" class="btn-inline-info"><i class="fas fa-shopping-cart" style="color:black;"><h4>MY CART</h4></i></a></li>
<li ><a href="my_orders.php" class="btn-inline-info"><i class="fas fa-check" style="color:black;"><h4>PLACED ORDERS</h4></i></a></li>
<li>
<form class="navbar-form pull-left" role="search" action=<?php
$search_url='p_search.php'; echo $search_url; ?> method="post">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for products" name="q">
<div class="input-group-btn">
<button type="submit" class="btn btn-default" name="submit"> .
<span class="glyphicon glyphicon-search"></span>
</button>
</div>
</div>
</form>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li ><a href="sign_in_as.php" class="btn-inline-info"><i class="fa fa-sign-out"style="color:black;"><h4>LOGOUT</h4></i></a></li>
<li><a><i><h4><?php echo $name ?></h4></i></a></li>
</ul>
</div>
</nav>
<br>
<br>
<br>
<br>
<br>
<div class="container">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="banner1.jpg" alt="food baner" align="center" width="1040px" height="1040px" >
</div>
<div class="item">
<img src="banner2.png" alt="personal care baner" align="center" width="100%" height="50%" >
</div>
<div class="item">
<img src="banner3.png" alt="fashion baner" align="center" width="100%" height="50%" >
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="container-fluid">
<hr><p><h2>RECOMMENDED PRODUCTS</h2></p><hr>
<?php
$conn = connect_db();
$sql = "SELECT * FROM products where pid in(6,7,8,11,15)";
$result = $conn->query($sql);
$sql = $result->fetch_assoc();
if($sql)
{
echo "<table>";
echo "<tr>";
echo "<th></th>";
echo "<th>    PRODUCT ID   </th>";
echo "<th>    PRODUCT NAME   </th>";
echo "<th>    CATEGORY   </th>";
echo "<th>    SELLER ID   </th>";
echo "<th>    PRICE   </th>";
echo "<th>    STOCK   </th>";
echo "<th>    ADD TO CART   </th>";
echo "</tr>";
echo "<tr>";
echo "<td>     <div class='zoom'>" . "<img src='".$sql['image']."'alt='IMAGE' width=100 height=100>" . "<?div> </td>";
echo "<td>    " . $sql['pid'] . "</td>";
echo "<td>    " . $sql['p_name'] . "</td>";
echo "<td>    " . $sql['category'] . "</td>";
echo "<td>    " . $sql['sid'] . "</td>";
echo "<td>    " . $sql['price'] . "</td>";
echo "<td>    " . $sql['stock'] . "</td>";
echo "<td><form action='cart_add.php' method='POST'><button class = 'btn btn-success' type = 'submit' value='".$sql['pid']."' name= 'SUBMIT' ><i class='fas fa-shopping-cart'>" . ' ADD TO CART' . "</i></button></form></td>";
echo "</tr> <br>";
while($row = $result->fetch_assoc()){
echo "<tr>";
echo "<td>     <div class='zoom'>" . "<img src='".$row['image']."'alt='IMAGE' width=100 height=100>" . "<?div> </td>";
echo "<td>    " . $row['pid'] . "</td>";
echo "<td>    " . $row['p_name'] . "</td>";
echo "<td>    " . $row['category'] . "</td>";
echo "<td>    " . $row['sid'] . "</td>";
echo "<td>    " . $row['price'] . "</td>";
echo "<td>    " . $row['stock'] . "</td>";
echo "<td><form action='cart_add.php' method='POST'><button class = 'btn btn-success' type = 'submit' value='".$sql['pid']."' name= 'SUBMIT' ><i class='fas fa-shopping-cart'>" . ' ADD TO CART' . "</i></button></form></td>";
echo "</tr><br>";
}
echo "</table>";
}
else{
echo "You have no products registered!!!!";
}
?>
<!-- <div class="col-sm-6 col-md-4 col-lg-3 mb-2">
<div class="card-deck">
<div class="card p-2 border-secondary mb-2">
<img src="chakli-recipe.jpg" class="card-img-top" height="250">
<div class="card-body p-1">
<h4 class="card-title text-center text-info">Chakali</h4>
<h5 class="card-text text-center text-danger"><i class="fas fa-rupee-sign"></i> 100/-</h5>
</div>
<div class="card-footer p-1">
<center><h5>BUY NOW....!!!</h5></center>
<form action='cart_add.php' method='POST'><button class = 'btn btn-outline-info' type = 'submit' value='' name= 'SUBMIT' >" . 'add to cart' . "</button></form>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3 mb-2">
<div class="card-deck">
<div class="card p-2 border-secondary mb-2">
<img src="chakli-recipe.jpg" class="card-img-top" height="250">
<div class="card-body p-1">
<h4 class="card-title text-center text-info">Chakali</h4>
<h5 class="card-text text-center text-danger"><i class="fas fa-rupee-sign"></i> 100/-</h5>
</div>
<div class="card-footer p-1">
<center><h5>BUY NOW....!!!</h5></center>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3 mb-2">
<div class="card-deck">
<div class="card p-2 border-secondary mb-2">
<img src="chakli-recipe.jpg" class="card-img-top" height="250">
<div class="card-body p-1">
<h4 class="card-title text-center text-info">Chakali</h4>
<h5 class="card-text text-center text-danger"><i class="fas fa-rupee-sign"></i> 100/-</h5>
</div>
<div class="card-footer p-1">
<center><h5><span style="text-decoration:blink;">BUY NOW....!!!</span></h5></center>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4 col-lg-3 mb-2">
<div class="card-deck">
<div class="card p-2 border-secondary mb-2">
<img src="chakli-recipe.jpg" class="card-img-top" height="250">
<div class="card-body p-1">
<h4 class="card-title text-center text-info">Chakali</h4>
<h5 class="card-text text-center text-danger"><i class="fas fa-rupee-sign"></i> 100/-</h5>
</div>
<div class="card-footer p-1" style="text-decoration: blink; ">
<center><h5>BUY NOW....!!!</style></h5></center>
</div>
</div>
</div>
</div>
-->
</div>
<div class="footer" align="center">
<a href="#"><i class="fa fa-facebook-official"></i></a>
<a href="https://in.pinterest.com/"><i class="fa fa-pinterest-p"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="https://www.instagram.com"><i class="fa fa-instagram"></i></a>
<a href="https://www.youtube.com/"><i class="fa fa-youtube"></i></a>
<p align="center">COPYRIGHT 2020 by MCOE</p>
</div>
</body>
</html>