forked from sajjadsaleem341/Plant-Nest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
290 lines (244 loc) · 13.6 KB
/
header.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
<?php
require "config.php";
require "functions.php";
require "add_cart_func.php";
// $active = substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'],"/")+1);
$cart_total = 0;
$sql = "select * from categories";
$res = mysqli_query($con,$sql);
$cat_arr=array();
while($row=mysqli_fetch_assoc($res)){
$cat_arr[]=$row;
}
$obj=new add_to_cart();
$totalProduct=$obj->totalProduct();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<!-- Title -->
<title>Plant Nest - Live With Green</title>
<!-- Favicon -->
<link rel="icon" href="img/core-img/favicon.ico">
<link rel="stylesheet" href="izitoast/css/iziToast.min.css">
<!-- Core Stylesheet -->
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="css/form.css">
</head>
<body>
<button hidden id="message_send"></button>
<button hidden id="feedback_send"></button>
<button hidden id="review_submitted"></button>
<button hidden id="registration_success"></button>
<button hidden id="cart_add"></button>
<!-- <button hidden id="password_update"></button> -->
<!-- <button hidden id="profile_update"></button>
<button hidden id="upload"></button>
<button hidden id="reset_link"></button>
<button hidden id="reset_password"></button> -->
<!-- Preloader -->
<!-- <div class="preloader d-flex align-items-center justify-content-center">
<div class="preloader-circle"></div>
<div class="preloader-img">
<img src="img/core-img/leaf.png" alt="">
</div>
</div> -->
<!-- ##### Header Area Start ##### -->
<header class="header-area">
<!-- ***** Top Header Area ***** -->
<div class="top-header-area">
<div class="container">
<div class="row">
<div class="col-12">
<div class="top-header-content d-flex align-items-center justify-content-between">
<!-- Top Header Content -->
<div class="top-header-meta">
<a href="#" data-toggle="tooltip" data-placement="bottom"
title="[email protected]"><i class="fa fa-envelope-o"
aria-hidden="true"></i> <span>Email: [email protected]</span></a>
<a href="#" data-toggle="tooltip" data-placement="bottom" title="+1 234 122 122"><i
class="fa fa-phone" aria-hidden="true"></i> <span>Call Us:
+923176122252</span></a>
</div>
<!-- Top Header Content -->
<div class="top-header-meta d-flex">
<!-- Login -->
<div class="login">
<?php
if(isset($_SESSION['USER_LOGIN'])){
?>
<div class="language-dropdown">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle mr-30" type="button"
id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false"><a style="margin:auto"><i class="fa fa-user"
aria-hidden="true"></i></a><?= $_SESSION['USER_NAME'] ?></button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="profile.php">Profile</a>
<a class="dropdown-item" href="order.php">Orders</a>
<a class="dropdown-item" href="wishlist.php">Wishlist</a>
<a class="dropdown-item" href="logout.php">Logout</a>
</div>
</div>
</div>
<?php
}else{
?>
<a href="#myModal" data-toggle="modal"><i class="fa fa-user" aria-hidden="true"></i>
<span>Login</span></a>
<?php
}
?>
</div>
<!-- Cart -->
<div class="cart">
<a href="cart.php">
<i class="fa fa-shopping-cart" aria-hidden="true"></i>
<span>Cart <span class="cart-quantity">(<?php echo $totalProduct ?>)</span></span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- ***** Navbar Area ***** -->
<div class="alazea-main-menu">
<div class="classy-nav-container breakpoint-off">
<div class="container">
<!-- Menu -->
<nav class="classy-navbar justify-content-between" id="alazeaNav">
<!-- Nav Brand -->
<a href="index.php" class="nav-brand"><img src="img/logo/png/logo-no-background.png" alt="" width="200px"></a>
<!-- Navbar Toggler -->
<div class="classy-navbar-toggler">
<span class="navbarToggler"><span></span><span></span><span></span></span>
</div>
<!-- Menu -->
<div class="classy-menu">
<!-- Close Button -->
<div class="classycloseIcon">
<div class="cross-wrap"><span class="top"></span><span class="bottom"></span></div>
</div>
<!-- Navbar Start -->
<div class="classynav">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="shop.php">Shop</a></li>
<li><a href="gallery.php">Gallery</a></li>
<li><a href="about.php">About</a></li>
<li><a href="contact.php">Contact</a></li>
<li><a href="feedback.php">Feedback</a></li>
</ul>
<!-- Search Icon -->
<div id="searchIcon">
<i class="fa fa-search" aria-hidden="true"></i>
</div>
</div>
<!-- Navbar End -->
</div>
</nav>
<!-- Search Form -->
<div class="search-form">
<form action="search.php" method="get">
<input type="text" name="str" id="search"
placeholder="Type keywords & press enter...">
<!-- <button type="submit" class="d-none"></button> -->
</form>
<!-- Close Icon -->
<div class="closeIcon"><i class="fa fa-times" aria-hidden="true"></i></div>
</div>
</div>
</div>
</div>
</header>
<!-- ##### Header Area End ##### -->
<!-- Modal -->
<div class="modal fade" id="myModal" data-backdrop="static" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Sign In and Sign Up From</h4>
<button style="background-color: #70c745;" type="button" class="btn text-white" data-dismiss="modal"
onclick="location.reload()">×</button>
</div>
<div class="modal-body">
<div class="register_msg">
<p style="color:red;font-weight:bold;text-align:center"></p>
</div>
<div>
<p class="help-block text-danger" id="al_email_error"
style="text-align:center;font-weight:bold;"></p>
</div>
<p class="help-block text-danger" id="al_email_error" style="padding:0 1rem 0"></p>
<div class="form-modal">
<div class="form-toggle">
<button id="login-toggle" onclick="toggleLogin()">Sign in</button>
<button id="signup-toggle" onclick="toggleSignup()">sign up</button>
</div>
<!-- Login Form -->
<div id="login-form">
<form>
<input type="email" placeholder="Enter your email" name="l_email" id="l_email"
autofocus>
<p class="help-block text-danger" id="l_email_error" style="padding:0 1rem 0"></p>
<input type="password" placeholder="Enter password" name="l_password" id="l_password" />
<p class="help-block text-danger" id="l_password_error" style="padding:0 1rem 0"></p>
<button type="button" class="btn login" onclick="user_login()">login</button>
<p class="forgot_link" type="button" id="forgot-toggle" onclick="toggleForgot()">Forgot
Password</p>
<hr />
<div class="login_msg">
<p style="color:red;"></p>
</div>
</form>
</div>
<!-- Signup Form -->
<div id="signup-form">
<form>
<input type="text" name="name" id="name" placeholder="Enter your name" autofocus>
<p class="help-block text-danger" id="name_error" style="padding:0 1rem 0"></p>
<input type="email" name="email" id="email" placeholder="Enter your email" />
<p class="help-block text-danger" id="email_error" style="padding:0 1rem 0"></p>
<input type="text" name="mobile" id="mobile" placeholder="Enter your mobile" />
<p class="help-block text-danger" id="mobile_error" style="padding:0 1rem 0"></p>
<input type="password" name="password" id="password" placeholder="Password" />
<p class="help-block text-danger" id="password_error" style="padding:0 1rem 0"></p>
<input type="password" name="c_password" id="c_password"
placeholder="Confirm password" />
<p class="help-block text-danger" id="c_password_error" style="padding:0 1rem 0"></p>
<button type="button" class="btn signup" onclick="user_register()">create
account</button>
<p>Clicking <strong>create account</strong> means that you are agree to our <a
href="">terms of services</a>.</p>
<hr />
</form>
</div>
<!-- Forgot Form -->
<div id="forgot-form">
<form method="post">
<input type="email" name="r_email" id="r_email" placeholder="Enter your email" />
<p class="help-block text-danger" id="r_email_error" style="padding:0 1rem 0"></p>
<button type="button" class="btn forgot" onclick="recover_password()">Send Mail</button>
<hr />
<div class="login_msg">
<p style="color:red;"></p>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button style="background-color: #70c745;" type="button" class="btn text-white" data-dismiss="modal"
onclick="location.reload()">Close</button>
</div>
</div>
</div>
</div>