-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
212 lines (170 loc) · 5.85 KB
/
index.php
File metadata and controls
212 lines (170 loc) · 5.85 KB
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
<?php include "head.php";?>
<body class="animsition">
<script type="text/javascript">
function addItem(id){
xhr=new XMLHttpRequest();
xhr.open("GET","ajaxCart.php?pid="+id);
xhr.send();
xhr.onreadystatechange=function(){
if(xhr.onReadyState==4 && xhr.state==200){
$data=xhr.responseText;
}
};
}
</script>>
<!-- Header -->
<?php include "header.php";?>
<?php
$mobiles=getProductsByName("mobiles");
$cameras=getProductsByName("cameras");
$categories=getCategories();
?>
<!-- Slide1 -->
<section class="slide1">
<div class="wrap-slick1">
<div class="slick1">
<div class="item-slick1 item1-slick1" style="background-image: url(images/master-slide-02.jpg);">
<div class="wrap-content-slide1 sizefull flex-col-c-m p-l-15 p-r-15 p-t-150 p-b-170">
<span class="caption1-slide1 m-text1 t-center animated visible-false m-b-15" data-appear="fadeInDown">
Big Billion Days 2018
</span>
<h2 class="caption2-slide1 xl-text1 t-center animated visible-false m-b-37" data-appear="fadeInUp">
New arrivals
</h2>
<div class="wrap-btn-slide1 w-size1 animated visible-false" data-appear="zoomIn">
<!-- Button -->
<a href="product.html" class="flex-c-m size2 bo-rad-23 s-text2 bgwhite hov1 trans-0-4">
Shop Now
</a>
</div>
</div>
</div>
<div class="item-slick1 item2-slick1" style="background-image: url(images/master-slide-03.jpg);">
<div class="wrap-content-slide1 sizefull flex-col-c-m p-l-15 p-r-15 p-t-150 p-b-170">
<span class="caption1-slide1 m-text1 t-center animated visible-false m-b-15" data-appear="rollIn">
Big Billion Days 2018
</span>
<h2 class="caption2-slide1 xl-text1 t-center animated visible-false m-b-37" data-appear="lightSpeedIn">
New arrivals
</h2>
<div class="wrap-btn-slide1 w-size1 animated visible-false" data-appear="slideInUp">
<!-- Button -->
<a href="product.html" class="flex-c-m size2 bo-rad-23 s-text2 bgwhite hov1 trans-0-4">
Shop Now
</a>
</div>
</div>
</div>
<div class="item-slick1 item3-slick1" style="background-image: url(images/master-slide-04.jpg);">
<div class="wrap-content-slide1 sizefull flex-col-c-m p-l-15 p-r-15 p-t-150 p-b-170">
<span class="caption1-slide1 m-text1 t-center animated visible-false m-b-15" data-appear="rotateInDownLeft">
Big Billion Days 2018
</span>
<h2 class="caption2-slide1 xl-text1 t-center animated visible-false m-b-37" data-appear="rotateInUpRight">
New arrivals
</h2>
<div class="wrap-btn-slide1 w-size1 animated visible-false" data-appear="rotateIn">
<!-- Button -->
<a href="product.html" class="flex-c-m size2 bo-rad-23 s-text2 bgwhite hov1 trans-0-4">
Shop Now
</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Banner -->
<section class="banner bgwhite p-t-40 p-b-40">
<div class="container">
</div>
</section>
<!-- New Product -->
<section class="newproduct bgwhite p-t-45 p-b-105">
<div class="container">
<div class="sec-title p-b-60">
<h3 class="m-text5 t-center">
Featured Products
</h3>
</div>
<!-- Slide2 -->
<div class="wrap-slick2">
<div class="slick2">
<?php foreach($categories as $category) {
$product=getProductsByCid($category['id'])[0];
?>
<div class="item-slick2 p-l-15 p-r-15">
<!-- Block2 -->
<div class="block2">
<div class="block2-img wrap-pic-w of-hidden pos-relative block2-labelnew">
<?php $image=getImagesByPid($product['id'])[0]; ?>
<img src="images/<?php echo $image['url']; ?>" alt="IMG-PRODUCT">
<div class="block2-overlay trans-0-4">
<a href="product.php" class="block2-btn-addwishlist hov-pointer trans-0-4">
<i class="icon-wishlist icon_heart_alt" aria-hidden="true"></i>
<i class="icon-wishlist icon_heart dis-none" aria-hidden="true"></i>
</a>
<div class="block2-btn-addcart w-size1 trans-0-4">
<!-- Button -->
<button class="flex-c-m size1 bg4 bo-rad-23 hov1 s-text1 trans-0-4" onclick="addItem(<?php echo $product['id']?>)">
Add to Cart
</button>
</div>
</div>
</div>
<div class="block2-txt p-t-20">
<a href="product_detail.php?id=<?php echo $product['id']?>" class="block2-name dis-block s-text3 p-b-5">
<?php echo $product['name']; ?>
</a>
<span class="block2-price m-text6 p-r-5">
₹ <?php echo $product['price'];?>
</span>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</section>
<!-- Banner2 -->
<!-- Shipping -->
<section class="shipping bgwhite p-t-62 p-b-46">
<div class="flex-w p-l-15 p-r-15">
<div class="flex-col-c w-size5 p-l-15 p-r-15 p-t-16 p-b-15 respon1">
<h4 class="m-text12 t-center">
Free Delivery Worldwide
</h4>
<a href="#" class="s-text11 t-center">
Click here for more info
</a>
</div>
<div class="flex-col-c w-size5 p-l-15 p-r-15 p-t-16 p-b-15 bo2 respon2">
<h4 class="m-text12 t-center">
30 Days Return
</h4>
<span class="s-text11 t-center">
Simply return it within 30 days for an exchange.
</span>
</div>
<div class="flex-col-c w-size5 p-l-15 p-r-15 p-t-16 p-b-15 respon1">
<h4 class="m-text12 t-center">
Store Opening
</h4>
<span class="s-text11 t-center">
Shop open from Monday to Sunday
</span>
</div>
</div>
</section>
<!-- Footer -->
<?php include "footer.php";?>
<!-- Back to top -->
<div class="btn-back-to-top bg0-hov" id="myBtn">
<span class="symbol-btn-back-to-top">
<i class="fa fa-angle-double-up" aria-hidden="true"></i>
</span>
</div>
<!-- Container Selection1 -->
<div id="dropDownSelect1"></div>
<?php include "body.php";?>