-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
178 lines (154 loc) · 8.3 KB
/
index.php
File metadata and controls
178 lines (154 loc) · 8.3 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
<!-- -->
<?php include "inc/head.php"; ?>
<!-- -->
<!-- ::::: Carosel Slider Section Start ::::: -->
<section>
<div class="container">
<div class="row">
<div class="col-lg-12 py-5">
<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="true">
<div class="carousel-indicators" style="background: rgba(0, 0, 0, 0.3); width: 31%; border-radius: 10px; margin: 17px auto;">
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2" aria-label="Slide 3"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="3" aria-label="Slide 4"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="4" aria-label="Slide 5"></button>
</div>
<div class="carousel-inner" style="height: 600px;">
<div class="carousel-item active">
<ul style="background: rgba(0, 0, 0, 0.7);">
<li>
<img src="assets/images/1.jpg" class="d-block w-100" alt="..." style="opacity: 0.8;">
</li>
</ul>
</div>
<div class="carousel-item">
<img src="assets/images/2.jpg" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="assets/images/4.jpg" class="d-block w-100" alt="...">
</div><div class="carousel-item">
<img src="assets/images/5.jpg" class="d-block w-100" alt="...">
</div><div class="carousel-item">
<ul style="background: black;">
<li>
<img src="assets/images/6.jpg" class="d-block w-100" alt="..." style="opacity: 0.8;">
</li>
</ul>
<!-- <img src="assets/images/6.jpg" class="d-block w-100" alt="..."> -->
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true" style="background-color: red; border-radius: 50%; padding: 18px;"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true" style="background-color: red; border-radius: 50%; padding: 18px;"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
</div>
</div>
</section>
<!-- ::::: Carosel Slider Section End ::::: -->
<!-- ::::: All Books Section Start ::::: -->
<section class="py-5 book-section">
<div class="container">
<div class="row">
<!-- Book Content Start -->
<div class="col-lg-9">
<h2 class="text-center pb-5">Our All Book Collection</h2>
<div class="row">
<?php
$sql = "SELECT * FROM book WHERE status = 1 ORDER BY title ASC";
$allBooks = mysqli_query($db, $sql);
$totalBooks = mysqli_num_rows($allBooks);
if ($totalBooks <= 0) { ?>
<div class="alert alert-info" role="alert"><i class="fa-solid fa-bell"> </i> Ooops!! No Book found Yet....</div>
<?php }
else {
while ($row = mysqli_fetch_assoc($allBooks)) {
$id = $row['id'];
$title = $row['title'];
$sub_title = $row['sub_title'];
$description = $row['description'];
$cat_id = $row['cat_id'];
$author_name = $row['author_name'];
$quantity = $row['quantity'];
$image = $row['image'];
$status = $row['status'];
?>
<!-- Card Part Start -->
<div class="col-lg-4 book-item pb-4">
<div class="book-thumbnail">
<?php
if (!empty($image)) { ?>
<img src="admin/dist/img/books/<?php echo $image; ?>" alt="" style="width: 100%; height: 300px;">
<?php }
else { ?>
<img src="admin/dist/img/books/blank_book.jpg" alt="" style="width: 100%; height: 300px;">
<?php }
?>
<div class="author-info">
<h4><?php echo $author_name; ?></h4>
</div>
</div>
<div class="book-info">
<h4><a href="details.php?book=<?php echo $id; ?>"><?php echo $title; ?></a></h4>
<p class="subtitle"><?php echo $sub_title; ?></p>
<p class="quantity">Quantity: <span><?php echo $quantity; ?> Pcs</span></p>
<p><?php echo substr($description, 0, 50); ?>... <a href="details.php?book=<?php echo $id; ?>">read more</a></p>
<?php
if (empty($_SESSION['email'])) { ?>
<a href="login.php" class="book-btn">Log In to Reserve your Book</a>
<?php }
else { ?>
<a href="booking.php?id=<?php echo $id; ?>" class="book-btn">Book Now</a>
<?php }
?>
</div>
</div>
<!-- Card Part End -->
<?php }
}
?>
</div>
</div>
<!-- Book Content End -->
<!-- Sidebar Content Start -->
<?php include "inc/sidebar.php"; ?>
<!-- Sidebar Content End -->
</div>
</div>
</section>
<!-- ::::: All Books Section End ::::: -->
<!-- ::::: Sticker Section Start ::::: -->
<section class="sticker-sec py-3" style="
background-image: linear-gradient( rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8) ),url(assets/images/60.png);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
background-attachment: fixed;
">
<div class="container">
<div class="row" style="">
<div class="col-lg-12">
<div class="row" style="align-items: center;">
<div class="col-lg-6">
<img src="assets/images/sticker.png" alt="" >
</div>
<div class="col-lg-6 text-center pt-5">
<div>
<h3 style="color: white; font-size: 60px; line-height: 20px;">Get it on time</h3>
<p style="color: red; font-family: 'Poppins', sans-serif; font-size: 20px;"> Book online & collect from library</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ::::: Sticker Section End ::::: -->
</main>
<?php include "inc/footer.php"; ?>