-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
216 lines (211 loc) · 9.41 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
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Customer</title>
<link rel="stylesheet" type="text/CSS" href="css/main.css">
<link rel="stylesheet" type="text/CSS" href="css/home.css">
<script src="popup-notification/popup-notification.js"></script>
<?php include('loader/loading-div.html') ?>
<script src="js/responsiveNavigation.js" defer></script>
</head>
<body>
<script defer>
history.replaceState({}, '', 'http://localhost/shop-finder/index.php')
</script>
<!-- menu start -->
<nav class="nav-bar" responsiveNavigation=false>
<ul>
<a href="index.php" class="no-text-decoration">
<li class="index highlight">home</li>
</a>
<a href="search.php" class="no-text-decoration">
<li class="category">search</li>
</a>
<a href="order.php" class="no-text-decoration">
<li class="order">orders</li>
</a>
<a href="profile.php" class="no-text-decoration">
<li class="profile">profile</li>
</a>
<?php
$user = (!isset($_SESSION['customer-id'])) ? "<a href='log-in.php' class='no-text-decoration'><li class='login'>log in</li></a>" :
"<a href='log-out.php' class='no-text-decoration'><li class='login'>log out</li></a>";
echo $user;
?>
<?php
if (isset($_SESSION['customer-id'])) {
include('data-base/constant.php');
$id = $_SESSION['customer-id'];
$sql1 = "select profile_image from customer where id=$id";
$res = mysqli_query($conn, $sql1);
while ($row = $res->fetch_assoc()) {
echo "
<li class='sre-icon-list'>
<a href='profile.php' class='sre-icon-link'>
<div class='sre-main-small-image-container'>
<div class='sre-profile-image-small-container'>
<img src='" . $row['profile_image'] . "' class='sre-img'>
</div>
</div>
</a></li>
";
}
}
?>
</ul>
<button class="nav-button"></button>
</nav>
<!-- menu end -->
<!--body-->
<div class="body1 main-height">
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Grocery</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Vegetable Shop</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Meat</div>
</a>
</div>
<div class="image-container fir">
<?php include('animated/category-image-1.html'); ?>
</div>
<div class="image-container">
<?php include('animated/category-image-2.html'); ?>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Digital Electronics</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Home Appliances</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Mobile Phones</div>
</a>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Electronics</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Computer H/S & Accessories</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Home Decor Items</div>
</a>
</div>
<div class="image-container">
<?php include('animated/category-image-3.html'); ?>
</div>
<div class="image-container">
<?php include('animated/category-image-4.html'); ?>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Clothing</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Footwear</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Fashion Accessories</div>
</a>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Jewellery</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Health & Beauty Supplements</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Ladies Center</div>
</a>
</div>
<div class="image-container">
<?php include('animated/category-image-5.html'); ?>
</div>
<div class="image-container">
<?php include('animated/category-image-6.html'); ?>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Sports & Fitness Equipments</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Toys & Games</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Baby Care Products</div>
</a>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Medical shops</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Kitchen Wears</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Garden Wears</div>
</a>
</div>
<div class="image-container">
<?php include('animated/category-image-7.html'); ?>
</div>
<div class="image-container">
<?php include('animated/category-image-8.html'); ?>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Book Store</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Study Materials</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Printing Store</div>
</a>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Restaurants</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Bakery</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Fruit Shops</div>
</a>
</div>
<div class="image-container">
<?php include('animated/category-image-9.html'); ?>
</div>
<div class="image-container">
<?php include('animated/category-image-10.html'); ?>
</div>
<div class="category-main-container">
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Furniture</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Showrooms</div>
</a>
<a href="category-page.php?category=''" class="category-link">
<div class="category-container">Workshops</div>
</a>
</div>
</div>
<script>
Array.prototype.forEach.call(document.querySelectorAll(".category-container"),
(name, index) => {
name.parentElement.setAttribute("href", "search.php?category=" + name.innerHTML)
})
</script>
<!--footer-->
<?php include('elements/footer.html') ?>