-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
406 lines (392 loc) · 17.4 KB
/
index.php
File metadata and controls
406 lines (392 loc) · 17.4 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
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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<?php session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Book Store</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#03a6f3">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:200,300,400,500,600,700,800,900" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<header>
<div class="main-menu">
<div class="container">
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" href="index.php"><img height="110" width="220" src="images/logo1.png"
alt="logo"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-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 ml-auto">
<li class="navbar-item active">
<a href="index.php" class="nav-link">Home</a>
</li>
<li class="navbar-item">
<a href="shop.php" class="nav-link">Shop</a>
</li>
<li class="navbar-item">
<a href="about.php" class="nav-link">About</a>
</li>
<li class="navbar-item">
<a href="search.php" class="nav-link">Search</a>
</li>
<li class="navbar-item">
<?php
if (!(isset($_SESSION["id"]))) {
echo '<a href="login.php" class="nav-link">Login</a>';
} else {
echo '<a href="logout.php" class="nav-link">logout</a>';
}
?>
</li>
</ul>
<div class="cart my-2 my-lg-0">
<span>
<a href="caret.php" class="fa fa-shopping-cart" aria-hidden="true"></a></span>
</div>
<form class="form-inline my-2 my-lg-0" method="post" action="search.php">
<input name="search1" class="form-control mr-sm-2" type="search" placeholder="Search here..."
aria-label="Search">
<span hidden type="submit" class="fa fa-search"></span>
</form>
</div>
</nav>
</div>
</div>
</header>
<section class="slider">
<div class="container">
<div id="owl-demo" class="owl-carousel owl-theme">
<div class="item">
<div class="slide">
<img src="images/slide1.jpg" alt="slide1">
<div class="content">
<div class="title">
<h3>welcome to bookstore</h3>
<h5>Discover the best books online with us</h5>
<a href="shop.php" class="btn">shop books</a>
</div>
</div>
</div>
</div>
<div class="item">
<div class="slide">
<img src="images/slide2.jpg" alt="slide1">
<div class="content">
<div class="title">
<h3>welcome to bookstore</h3>
<h5>Discover the best books online with us</h5>
<a href="shop.php" class="btn">shop books</a>
</div>
</div>
</div>
</div>
<div class="item">
<div class="slide">
<img src="images/slide3.jpg" alt="slide1">
<div class="content">
<div class="title">
<h3>welcome to bookstore</h3>
<h5>Discover the best books online with us</h5>
<a href="shop.php" class="btn">shop books</a>
</div>
</div>
</div>
</div>
<div class="item">
<div class="slide">
<img src="images/slide4.jpg" alt="slide1">
<div class="content">
<div class="title">
<h3>welcome to bookstore</h3>
<h5>Discover the best books online with us</h5>
<a href="shop.php" class="btn">shop books</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="recomended-sec">
<div class="container">
<div class="title">
<h2>Books that have a sale</h2>
<hr>
</div>
<div class="row">
<?php
include("config/pdo.php");
$sql = "select * from books WHERE sale =1 LIMIT 4";
try {
$val = $conn->query($sql);
While ($row = $val->fetch()) {
echo "<div class='col-lg-3 col-md-6'>";
echo " <div class='item'>";
echo "<a href='product-single.php'><img height=\"218\" width=\"135\" src='img/" . $row['image'] . "' alt='img' class='img-responsive'></a>";
echo "<h3>" . $row['title'] . "</h3>";
echo " <h6> <span class='price' >" . $row['price'] . "$ </span > / <a href = 'product-single.php' > Buy Now </a ></h6 >";
echo " <span class='sale'>Sale !</span>";
echo "<div class='hover'>";
echo "<a href='product-single.php?id=" . $row['id'] . "'></a>";
echo "<span><i class='fa fa-long-arrow-right' aria-hidden='true'></i></span></a>";
echo " <span class='sale'>Sale !</span>";
echo "</div>";
echo "</div>";
echo "</div>";
}
} catch (PDOException $e) {
echo "Error: " . $e->getMessage();
}
?>
</div>
</div>
</section>
<section class="about-sec">
<div class="about-img">
<figure style="background:url(./images/about-img.jpg)no-repeat;"></figure>
</div>
<div class="about-content">
<h2>About bookstore,</h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's printer took a galley of type and Scrambled it to make a type and typesetting industry. Lorem
Ipsum has been the book. </p>
<p>It has survived not only fiveLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem
Ipsum has been the industry's printer took a galley of type and</p>
<div class="btn-sec">
<a href="shop.php" class="btn yellow">shop books</a>
<?php
if (!(isset($_SESSION["id"]))) {
echo '<a href="login.php" class="btn black">subscriptions</a>';
}
?>
</div>
</div>
</section>
<section class="recent-book-sec">
<div class="container">
<div class="title">
<h2>Recently added books</h2>
<hr>
</div>
<div class="row">
<?php
include("config/pdo.php");
$sql = "select * from books LIMIT 4 ";
try {
$val = $conn->query($sql);
While ($row = $val->fetch()) {
echo "<div class='col-lg-3 col-md-6'>";
echo "<a href='product-single.php?id=" . $row['id'] . "'><img height=\"218\" width=\"135\" src='img/" . $row['image'] . "' alt='Image' class='img-responsive'></a>";
echo "<h3>" . $row['title'] . "</h3>";
echo " <h6> <span class='price' >" . $row['price'] . "$ </span > / <a href='product-single.php?id=" . $row['id'] . "' > Buy Now </a ></h6 >";
echo "<div class='hover'>";
echo "<a href='product-single.php?id=" . $row['id'] . "'></a>";
echo "</div>";
echo "</div>";
}
} catch (PDOException $e) {
echo "Error: " . $e->getMessage();
}
?>
</div>
</div>
</section>
<section class="features-sec">
<div class="container">
<ul>
<li>
<span class="icon"><i class="fa fa-shopping-cart" aria-hidden="true"></i></span>
<h3>SAFE SHOPPING</h3>
<h5>Safe Shopping Guarantee</h5>
<h6>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's...</h6>
</li>
<li>
<span class="icon return"><i class="fa fa-reply-all" aria-hidden="true"></i></span>
<h3>30- DAY RETURN</h3>
<h5>Moneyback guarantee</h5>
<h6>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's...</h6>
</li>
<li>
<span class="icon chat"><i class="fa fa-comments" aria-hidden="true"></i></span>
<h3>24/7 SUPPORT</h3>
<h5>online Consultations</h5>
<h6>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's...</h6>
</li>
</ul>
</div>
</section>
<section class="offers-sec" style="background:url(images/offers.jpg)no-repeat;">
<div class="cover"></div>
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="detail">
<h3>Top 50% OFF on Selected</h3>
<h6>We are now offering some good discount
on selected books go and shop them</h6>
<a href="shop.php" class="btn blue-btn">view all books</a>
<span class="icon-point percentage">
<img src="images/precentagae.png" alt="">
</span>
</div>
</div>
<div class="col-md-6">
<div class="detail">
<h3>Shop $ 500 Above and Get Extra!</h3>
<h6>We are now offering some good discount
on selected books go and shop them</h6>
<a href="shop.php" class="btn blue-btn">view all books</a>
<span class="icon-point amount"><img src="images/amount.png" alt=""></span>
</div>
</div>
</div>
</div>
</section>
<section class="testimonial-sec">
<div class="container">
<div id="testimonal" class="owl-carousel owl-theme">
<div class="item">
<h3>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's printer took a galley of type and Scrambled it to make a type and typesetting industry.
been the book</h3>
<div class="box-user">
<h4 class="author">Salam Isleem</h4>
<span class="country">Palestine</span>
</div>
</div>
<div class="item">
<h3>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's printer took a galley of type and Scrambled it to make a type and typesetting industry.
been the book</h3>
<div class="box-user">
<h4 class="author">Salam Isleem</h4>
<span class="country">Palestine</span>
</div>
</div>
<div class="item">
<h3>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's printer took a galley of type and Scrambled it to make a type and typesetting industry.
been the book</h3>
<div class="box-user">
<h4 class="author">Salam Isleem</h4>
<span class="country">Palestine</span>
</div>
</div>
<div class="item">
<h3>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the
industry's printer took a galley of type and Scrambled it to make a type and typesetting industry.
been the book</h3>
<div class="box-user">
<h4 class="author">Salam Isleem</h4>
<span class="country">Palestine</span>
</div>
</div>
</div>
</div>
<div class="left-quote">
<img src="images/left-quote.png" alt="quote">
</div>
<div class="right-quote">
<img src="images/right-quote.png" alt="quote">
</div>
</section>
<footer>
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="address">
<h4>Our Address</h4>
<h6>The BookStore , 1st Store <br>
Gaza EL-Shijaeya , Palestine</h6>
<h6>Call : +970 592 382 529</h6>
<h6>Email : [email protected]</h6>
</div>
<div class="timing">
<h4>Timing</h4>
<h6>Mon - Fri: 7am - 10pm</h6>
<h6>Saturday: 8am - 10pm</h6>
<h6>Sunday: 8am - 11pm</h6>
</div>
</div>
<div class="col-md-3">
<div class="navigation">
<h4>Navigation</h4>
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="about.php">About Us</a></li>
<li><a href="privacy-policy.php">Privacy Policy</a></li>
<li><a href="terms-conditions.php">Terms</a></li>
<li><a href="products.php">Products</a></li>
</ul>
</div>
<div class="navigation">
<h4>Help</h4>
<ul>
<li><a href="">Shipping & Returns</a></li>
<li><a href="privacy-policy.php">Privacy</a></li>
</ul>
</div>
</div>
<div class="col-md-5">
<div class="form">
<h3>Quick Contact us</h3>
<h6>We are now offering some good discount
on selected books go and shop them</h6>
<form>
<div class="row">
<div class="col-md-6">
<input placeholder="Name" required>
</div>
<div class="col-md-6">
<input type="email" placeholder="Email" required>
</div>
<div class="col-md-12">
<textarea placeholder="Messege"></textarea>
</div>
<div class="col-md-12">
<button class="btn black">Alright, Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="copy-right">
<div class="container">
<div class="row">
<div class="col-md-6">
<h5>(C) 2018. All Rights Reserved.</h5>
</div>
<div class="col-md-6">
<div class="share align-middle">
<span class="fb"><i class="fa fa-facebook-official"></i></span>
<span class="instagram"><i class="fa fa-instagram"></i></span>
<span class="twitter"><i class="fa fa-twitter"></i></span>
<span class="pinterest"><i class="fa fa-pinterest"></i></span>
<span class="google"><i class="fa fa-google-plus"></i></span>
</div>
</div>
</div>
</div>
</div>
</footer>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/owl.carousel.min.js"></script>
<script src="js/custom.js"></script>
</body>
</html>