-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
221 lines (182 loc) · 5.88 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
<?php
include "common/dl.php";
session_start();
$_SESSION['id']=1;
if(isset($_SESSION['id']))
{
$record=getUserById($_SESSION['id']);
$carts=getCartByUid($record['id']);
$var=count($carts);
}
?>
<header class="header1">
<!-- Header desktop -->
<div class="container-menu-header">
<div class="topbar">
<div class="topbar-social">
<a href="#" class="topbar-social-item fa fa-facebook"></a>
<a href="#" class="topbar-social-item fa fa-instagram"></a>
<a href="#" class="topbar-social-item fa fa-pinterest-p"></a>
<a href="#" class="topbar-social-item fa fa-snapchat-ghost"></a>
<a href="#" class="topbar-social-item fa fa-youtube-play"></a>
</div>
<span class="topbar-child1">
Free shipping fro standard over ₹ 1000;
</span>
<div class="topbar-child2">
<span class="topbar-email">
contact@ezyshoppe.com
</span>
</div>
</div>
<div class="wrap_header">
<!-- Logo -->
<a href="index.php" class="logo">
<img src="images/ezyshoppe.jpg" alt="IMG-LOGO">
</a>
<!-- Menu -->
<div class="wrap_menu">
<nav class="menu">
<ul class="main_menu">
<li>
<a href="product.php">Prodcuts</a>
</li>
<li>
<a href="cart.php">Cart</a>
</li>
<li>
<a href="blog.php">Blog</a>
</li>
<li>
<a href="about.php">About</a>
</li>
<li>
<a href="contact.php">Contact</a>
</li>
</ul>
</nav>
</div>
<!-- Header Icon -->
<div class="header-icons">
<?php if(!isset($record)) {?>
<a href="#" class="header-wrapicon1 dis-block">
<img src="images/icons/icon-header-01.png" class="header-icon1" alt="ICON">
</a>
<?php } else { ?>
<a href="#" >
<h4 style="color: blue;"><?php echo $record['name'];?></h4>
</a>
<?php } ?>
<span class="linedivide1"></span>
<div class="header-wrapicon2">
<img src="images/icons/icon-header-02.png" class="header-icon1 js-show-header-dropdown" alt="ICON">
<span class="header-icons-noti"><?php echo $var; ?></span>
<!-- Header cart noti -->
<div class="header-cart header-dropdown">
<ul class="header-cart-wrapitem">
<?php foreach($carts as $cart) {
$product=getProduct($cart['pid']);
?>
<li class="header-cart-item">
<div class="header-cart-item-img">
<?php $image=getImagesByPid($cart['pid'])[0]; ?>
<img src="images/<?php echo $image['url'];?>" alt="IMG">
</div>
<div class="header-cart-item-txt">
<a href="product_detail.php?id=<?php echo $cart['pid']; ?>" class="header-cart-item-name">
<?php echo $product['name'];?>
</a>
<span class="header-cart-item-info">
<?php echo $cart['quantity']; ?> X <?php echo $product['price'];?>
</span>
</div>
</li>
<?php }?>
</ul>
<div class="header-cart-total">
Total: ₹ <?php echo ($product['price']*$cart['quantity']);?>
</div>
<div class="header-cart-buttons">
<div class="header-cart-wrapbtn">
<!-- Button -->
<a href="cart.php" class="flex-c-m size1 bg1 bo-rad-20 hov1 s-text1 trans-0-4">
View Cart
</a>
</div>
<div class="header-cart-wrapbtn">
<!-- Button -->
<a href="#" class="flex-c-m size1 bg1 bo-rad-20 hov1 s-text1 trans-0-4">
Check Out
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="wrap_header_mobile">
<!-- Logo moblie -->
<a href="index.php" class="logo-mobile">
<img src="images/icons/logo.png" alt="IMG-LOGO">
</a>
<!-- Button show menu -->
<div class="btn-show-menu">
<!-- Header Icon mobile -->
<div class="header-icons-mobile">
<a href="#" class="header-wrapicon1 dis-block">
<img src="images/icons/icon-header-01.png" class="header-icon1" alt="ICON">
</a>
<span class="linedivide2"></span>
<div class="header-wrapicon2">
<img src="images/icons/icon-header-02.png" class="header-icon1 js-show-header-dropdown" alt="ICON">
<span class="header-icons-noti">0</span>
<!-- Header cart noti -->
<div class="header-cart header-dropdown">
<ul class="header-cart-wrapitem">
<?php foreach($carts as $cart) {
$product=getProduct($cart['pid']);
?>
<li class="header-cart-item">
<div class="header-cart-item-img">
<?php $image=getImagesByPid($cart['pid'])[0]; ?>
<img src="images/<?php echo $image['url'];?>" alt="IMG">
</div>
<div class="header-cart-item-txt">
<a href="product_detail.php?id=<?php echo $cart['pid']; ?>" class="header-cart-item-name">
<?php echo $product['name'];?>
</a>
<span class="header-cart-item-info">
<?php echo $cart['quantity']; ?> X <?php echo $product['price'];?>
</span>
</div>
</li>
<?php }?>
</ul>
<div class="header-cart-total">
Total: ₹ <?php echo ($product['price']*$cart['quantity']);?>
</div>
<div class="header-cart-buttons">
<div class="header-cart-wrapbtn">
<!-- Button -->
<a href="cart.php" class="flex-c-m size1 bg1 bo-rad-20 hov1 s-text1 trans-0-4">
View Cart
</a>
</div>
<div class="header-cart-wrapbtn">
<!-- Button -->
<a href="#" class="flex-c-m size1 bg1 bo-rad-20 hov1 s-text1 trans-0-4">
Check Out
</a>
</div>
</div>
</div>
<div class="btn-show-menu-mobile hamburger hamburger--squeeze">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</div>
</div>
</div>
<!-- Menu Mobile -->
</header>