-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathheader_profile.php
337 lines (278 loc) · 16.9 KB
/
header_profile.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
330
331
332
333
334
335
336
337
<?php
include"db/db.php";
if (isset($_SESSION["uid"])) {
//When user is logged in then we will count number of item in cart by using user session id
if (isset($_SESSION["uid"])) {
$sql = "SELECT COUNT(*) AS count_item FROM cart WHERE user_id = $_SESSION[uid]";
}else{
//When user is not logged in then we will count number of item in cart by using users unique ip address
//$sql = "SELECT COUNT(*) AS count_item FROM cart WHERE ip_add = '$ip_add' AND user_id < 0";
}
$query = mysqli_query($con,$sql);
$row = mysqli_fetch_array($query);
$row["count_item"];
//exit();
}
?>
<header>
<div class="main_header">
<!--header top start-->
<div class="header_top">
<div class="container" >
<div class="row align-items-center" >
<div class="col-lg-4 col-md-5" >
<div class="header_account text-right" >
<ul>
<li class="language"><a href="#" data-toggle="dropdown"><span class=" glyphicon glyphicon-user"></span><?php echo "Hi,".$_SESSION["name"]; ?><i class="ion-chevron-down"></i></a>
<ul class="dropdown_language">
<!-------
<li ><a href="Customer_cart.php" ><b><span class="glyphicon glyphicon-shopping-cart"><b>Cart</b></span></b></a></li>
<li class="divider"></li>
------------>
<li><a href="customer_order_view.php" ><b>Orders Track Process </b></a></li>
<li class="divider"></li>
<li><a href="Customer_pass_change.php" ><b>Profile Update</b></a></li>
<li class="divider"></li>
<li><a href="logout.php" ><b>Logout</b></a></li>
</ul>
</li>
<!--
<li class="currency"><a href="#">USD <i class="ion-chevron-down"></i></a>
<ul class="dropdown_currency">
<li><a href="#">EUR – Euro</a></li>
<li><a href="#">GBP – British Pound</a></li>
<li><a href="#">INR – India Rupee</a></li>
</ul>
</li>
--->
</ul>
</div>
</div>
<!--
<div class="col-lg-8 col-md-7">
<div class="header_top_links text-right">
<div class="header_account">
<ul>
<li class="language"><a href="#"><img src="assets/img/logo/language.png" alt=""> english <i class="ion-chevron-down"></i></a>
<ul class="dropdown_language">
<li><a href="#">English</a></li>
<li><a href="#">Germany</a></li>
<li><a href="#">Japanese</a></li>
</ul>
</li>
<li class="currency"><a href="#">USD <i class="ion-chevron-down"></i></a>
<ul class="dropdown_currency">
<li><a href="#">EUR – Euro</a></li>
<li><a href="#">GBP – British Pound</a></li>
<li><a href="#">INR – India Rupee</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
--->
</div>
</div>
</div>
<!--header top start-->
<!--header middel start-->
<div class="header_middle">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-4 col-md-4 col-sm-4 col-4">
<div class="logo">
<a href="index.php" style="color: white; font-size: 3em; font-weight: bold;">Auto Spare Parts</a>
</div>
</div>
<div class="col-lg-8 col-md-6 col-sm-6 col-6">
<div class="header_right_box">
<div class="search_container">
<form action="#">
<div class="search_box">
<input placeholder="Search product..." type="text">
<button type="submit">Search</button>
</div>
</form>
</div>
<div class="header_configure_area">
<div class="header_wishlist">
<a href="wishlist_profile.php"><i class="icon-heart"></i>
<!--
<span class="wishlist_count">3</span>
-->
</a>
</div>
<div class="mini_cart_wrapper">
<a href="javascript:void(0)">
<i class="icon-shopping-bag2"></i>
<?php
$id_c = $_SESSION["uid"];
$a=0;
$ct_p=0;
$data = "SELECT * FROM orders where user_id = '$id_c' and payment_status='cash_on_delivery' and order_status='process_order' or order_status='complete' ";
$view = mysqli_query($con,$data);
while($_view = mysqli_fetch_assoc($view))
{
$id_c_pro = $_view['product_id'];
$id_c_user = $_view['user_id'];
$id_c_pro_qty = $_view['qty'];
if(!empty($id_c_pro))
{
$data2 = "SELECT * FROM products where product_id = '$id_c_pro' ";
$view2 = mysqli_query($con,$data2);
while($_view2 = mysqli_fetch_assoc($view2))
{
$rs_p=$_view2['product_price'];
$S_Price = $rs_p*$id_c_pro_qty;
if(!empty($S_Price))
{
$a+=$S_Price;
$ct_p++;
}
}
//$S_Price = $rs_p*$id_c_pro_qty;
//$a=$S_Price++ ;
}
}
?>
<span class="cart_count"><?php echo $row["count_item"]; ?></span>
<span class="cart_price">RS <?php echo $a; ?> <i class="ion-ios-arrow-down"><a class="active" href="Customer_cart.php">View Cart</a></i></span>
-->
</a>
<!--mini cart-->
<div class="mini_cart">
<div class="mini_cart_inner">
<div class="cart_close">
<div class="cart_text">
<h3>cart</h3>
</div>
<div class="mini_cart_close">
<a href="javascript:void(0)"><i class="icon-x"></i></a>
</div>
</div>
<!---
<div class="cart_item">
<div class="cart_img">
<a href="#"><img src="assets/img/s-product/product.jpg" alt=""></a>
</div>
<div class="cart_info">
<a href="#">Fusce Aliquam</a>
<p>Qty: 1 X <span> $60.00 </span></p>
</div>
<div class="cart_remove">
<a href="#"><i class="ion-android-close"></i></a>
</div>
</div>
<div class="cart_item">
<div class="cart_img">
<a href="#"><img src="assets/img/s-product/product2.jpg" alt=""></a>
</div>
<div class="cart_info">
<a href="#">Ras Neque Metus</a>
<p>Qty: 1 X <span> $60.00 </span></p>
</div>
<div class="cart_remove">
<a href="#"><i class="ion-android-close"></i></a>
</div>
</div>
<div class="mini_cart_table">
<div class="cart_total">
<span>Sub total:</span>
<span class="price">$138.00</span>
</div>
<div class="cart_total mt-10">
<span>total:</span>
<span class="price">$138.00</span>
</div>
</div>
</div>
<div class="mini_cart_footer">
<div class="cart_button">
<a href="cart.html">View cart</a>
</div>
--->
<hr><br>
<div class="cart_button">
<a class="active" href="Customer_cart.php">View Cart</a>
</div>
<hr>
<div class="cart_button">
<a href="customer_order_view.php" ><b>Orders Track Process </b></a>
</div>
<br>
<div class="cart_total">
<span>Sub Total:</span>
<span class="price">RS <?php echo $a; ?></span>
</div>
<hr>
</div>
</div>
<!--mini cart end-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--header middel end-->
<!--header bottom satrt-->
<div class="header_bottom sticky-header">
<div class="container">
<div class="row align-items-center">
<div class=" col-lg-3">
<div class="categories_menu">
<div class="categories_title">
<h2 class="categori_toggle">ALL CATEGORIES</h2>
</div>
<div class="categories_menu_toggle">
<ul>
<!--
<li><a href="all_product_sh_profile.php"> Accessories</a></li>
<li><a href="all_product_sh_profile.php">Body Parts</a></li>
<li><a href="all_product_sh_profile.php">Car Engine</a></li>
<li><a href="all_product_sh_profile.php">Interiors</a></li>
<li><a href="all_product_sh_profile.php">Lights & Lamp</a></li>
<li><a href="all_product_sh_profile.php">Repair Parts</a></li>
<li><a href="all_product_sh_profile.php">Wheel & Tires</a></li>
<li><a href="all_product_sh_profile.php">Smart Devices</a></li>
<li><a href="all_product_sh_profile.php">Exteriors</a></li>
-->
<?PHP
include"db/db.php";
//$selecte_id = $_SESSION["uid"];
$data = "SELECT * FROM categories ";
$view = mysqli_query($con,$data);
while($_view = mysqli_fetch_assoc($view))
{
$cat_title = $_view['cat_title'];
$cat_p_id = $_view['cat_id'];
?>
<li><a href="cat_product_select_sh_profile.php?id=<?php echo $cat_p_id; ?>"> <?php echo $cat_title; ?> </a></li>
<?php
}
?>
</ul>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="main_menu menu_position text-left">
<nav>
<ul>
<li><a class="active" href="index.php">home</a>
</li>
<li><a href="about_profile.php">About Us</a></li>
<li><a href="contact_profile.php"> Contact Us</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
<!--header bottom end-->
</div>
</header>
<script type="text/javascript" src="login/Seller/dist/js/site.min.js"></script>