forked from edaviage/818N-E_Commerce_Application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_product.php
214 lines (187 loc) · 9.48 KB
/
search_product.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
<?php
include("./includes/connect.php");
include("./functions/common_functions.php");
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ecommerce Products</title>
<link rel="stylesheet" href="https://d2egrbjmr3tvi4.cloudfront.net/assets/css/bootstrap.css" />
<link rel="stylesheet" href="https://d2egrbjmr3tvi4.cloudfront.net/assets/css/main.css" />
</head>
<body>
<!-- upper-nav -->
<div class="upper-nav primary-bg p-2 px-3 text-center text-break">
<span>Summer Sale For All Swim Suits And Free Express Delivery - OFF 50%! <a>Shop Now</a></span>
</div>
<!-- upper-nav -->
<!-- Start NavBar -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand fw-bold" href="#">A1</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mx-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="./index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="./products.php">Products</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
<?php
if(isset($_SESSION['username'])){
echo "
<li class='nav-item'>
<a class='nav-link' href='./users_area/profile.php'>My Account</a>
</li>";
}
else{
echo "
<li class='nav-item'>
<a class='nav-link' href='./users_area/user_registration.php'>Register</a>
</li>";
}
?>
</ul>
<form class="d-flex" action="" method="get">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" name="search_data">
<input type="submit" value="Search" class="btn btn-outline-primary" name="search_data_btn">
</form>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="./cart.php"><svg width="28" height="28" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11 27C11.5523 27 12 26.5523 12 26C12 25.4477 11.5523 25 11 25C10.4477 25 10 25.4477 10 26C10 26.5523 10.4477 27 11 27Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M25 27C25.5523 27 26 26.5523 26 26C26 25.4477 25.5523 25 25 25C24.4477 25 24 25.4477 24 26C24 26.5523 24.4477 27 25 27Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M3 5H7L10 22H26" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M10 16.6667H25.59C25.7056 16.6667 25.8177 16.6267 25.9072 16.5535C25.9966 16.4802 26.0579 16.3782 26.0806 16.2648L27.8806 7.26479C27.8951 7.19222 27.8934 7.11733 27.8755 7.04552C27.8575 6.97371 27.8239 6.90678 27.7769 6.84956C27.73 6.79234 27.6709 6.74625 27.604 6.71462C27.5371 6.68299 27.464 6.66661 27.39 6.66666H8" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<sup>
<?php
cart_item();
?>
</sup>
<span class="d-none">
Total Price is:
<?php
total_cart_price();
?>
</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" class="d-flex align-items-center gap-1" href="#">
<svg width="28" height="28" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24 27V24.3333C24 22.9188 23.5224 21.5623 22.6722 20.5621C21.8221 19.5619 20.669 19 19.4667 19H11.5333C10.331 19 9.17795 19.5619 8.32778 20.5621C7.47762 21.5623 7 22.9188 7 24.3333V27" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
<path d="M16.5 14C18.9853 14 21 11.9853 21 9.5C21 7.01472 18.9853 5 16.5 5C14.0147 5 12 7.01472 12 9.5C12 11.9853 14.0147 14 16.5 14Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<?php
if(!isset($_SESSION['username'])){
echo "<span>
Welcome guest
</span>";
}else{
echo "<span>
Welcome ".$_SESSION['username']. "</span>";
}
?>
</a>
</li>
<?php
if(!isset($_SESSION['username'])){
echo "<li class='nav-item'>
<a class='nav-link' href='./users_area/user_login.php'>
Login
</a>
</li>";
}else{
echo "<li class='nav-item'>
<a class='nav-link' href='./users_area/logout.php'>
Logout
</a>
</li>";
}
?>
</ul>
</div>
</div>
</nav>
<!-- End NavBar -->
<!-- Start All Prodcuts -->
<div class="all-prod">
<div class="container">
<div class="sub-container pt-4 pb-4">
<div class="categ-header">
<div class="sub-title">
<span class="shape"></span>
<span class="title">Categories & Brands</span>
</div>
<h2>Browse By Category & Brand</h2>
</div>
<div class="row mx-0">
<div class="col-md-2 side-nav p-0">
<!-- side nav -->
<!-- brands to display -->
<ul class="navbar-nav me-auto ">
<li class="nav-item d-flex align-items-center gap-2">
<span class="shape"></span>
<a href="products.php" class="nav-link fw-bolder nav-title">
<h4>Brands</h4>
</a>
</li>
<?php
getBrands();
?>
</ul>
<div class="divider"></div>
<!-- categories to display -->
<ul class="navbar-nav me-auto ">
<li class="nav-item d-flex align-items-center gap-2">
<span class="shape"></span>
<a href="products.php" class="nav-link fw-bolder nav-title">
<h4>Categories</h4>
</a>
</li>
<?php
getCategories();
?>
</ul>
</div>
<div class="col-md-10">
<!-- products -->
<div class="row">
<?php
search_product();
filterCategoryProduct();
filterBrandProduct();
?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End All Prodcuts -->
<!-- divider -->
<!-- <div class="container">
<div class="divider"></div>
</div> -->
<!-- divider -->
<!-- Start Footer -->
<!-- <div class="upper-nav primary-bg p-2 px-3 text-center text-break">
<span>All CopyRight ©2023</span>
</div> -->
<!-- End Footer -->
<script src="https://d2egrbjmr3tvi4.cloudfront.net/assets/js/bootstrap.bundle.js"></script>
</body>
</html>