-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHome_page.php
More file actions
176 lines (142 loc) · 6.94 KB
/
Copy pathHome_page.php
File metadata and controls
176 lines (142 loc) · 6.94 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
<?php
#check session started or not.
session_start();
if(!isset($_SESSION['USER_TYPE']) || $_SESSION['login']!=true )
{
header("location:User_login.php");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="author" name="shekhar,hritik ,anchal,robin">
<meta content="keyword" name="html,css,javascript,LMS,project">
<meta content="description" name="Library management system">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- adding favicon to title -->
<link rel="icon" href="Project_Images/e_book.png" type="image/x-icon">
<!-- linking stylesheet -->
<link rel="stylesheet" href="Style sheets/style_sheet_one.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<title>E-Library</title>
</head>
<body>
<!-- navigation section -->
<nav class="flex navigation">
<div class="title flex">
<a href="Home_page.php"><img src="Project_Images/logo.png" alt="LOGO" class="logo"></a>
<h1 class="h1 heading">DIGI-LIBRARY</h1>
</div>
<ul class="navigation_links h4 flex l_s_1" >
<li><a href="Home_page.php">Home</a></li>
<li><a href="#Categories">Categories</a></li>
<li><a href="#about">About</a></li>
<li><a href="logout.php">Log-Out</a></li>
</ul>
</nav>
<!-- welcome section -->
<section class="flex" style="position:relative; width: 100%; height: 90vh;">
<div class="background_image">
</div>
<div class="overlay">
<?php echo "<h2 class='h1 Ta-c transition_1'>Hello ".$_SESSION['Name']."</h2>"; ?>
<h1 class="h6 Ta-c font2 transition_1">WELCOME TO DIGITAL LIBRARY</h1>
<h2 class="h1 Ta-c transition_1">Get The Best Free E-Books</h2>
<p class="h5 transition_1" style="text-align: justify;">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Fugit adipisci ipsa in laboriosam rem cupiditate dolores voluptates aliquam doloremque nam! Cupiditate culpa nostrum veritatis commodi a nulla facilis tenetur consequatur.
</p>
</div>
</section>
<!-- collection section -->
<section class="grid description "style="min-height:35vmax;">
<div class="pic">
<img src="Project_Images\clip-library-2.png" alt="image">
</div>
<div class=" flex content">
<q class="h5" >
The content of a book holds the power of education and it is with this power that we can shape our future and change lives.
</q>
<p class="h5">— Malala Yousafzai</p>
<a class="h2" href="#">VIEW MORE</a>
</div>
</section>
<!--circle section -->
<section class=" flex element_section">
<div class="flex container_circle" >
<h2 class="h1 font3" style="text-align:center; margin-top:1em; letter-spacing:.1em;">FIND YOUR FAVORITE BOOKS HERE</h2>
<div class="flex card" >
<h1 class="h1" style="text-align:center;">Diverse Book Collection</h1>
<p class="h5" style="text-align: center;font-weight: bold;" >
From applied literature to educational resources, we have a lot of textbooks to offer you. We provide only the best books
</p>
<!-- <a class="h2" href="">VIEW CATALOG</a> -->
</div>
</div>
<div class="element_container">
<div class="circle_one"><img src="Project_Images\circle1.png" alt="circle1" ></div>
<div class="circle_picture"></div>
<div class="circle_two"><img src="Project_Images\circle2.png" alt="circle2" ></div>
<div class="circle_three"><img src="Project_Images\circle3.svg" alt="circle3" ></div>
</div>
</section>
<!-- books section -->
<section id="Categories" class="flex top_category" >
<div class="h1 Ta-c font2"><h2> Top Categories</h2></div>
<!-- <div class="h4 Ta-c " ><h2>Lorem ipsum dolor sit amet consectetur.</h2></div> -->
<div class="grid sections">
<a class="sections_items" href="Book_List.php?catid=1&&catname=ACADEMICS" target="_self"><img src="Project_Images\academics.png" width="90px" height="90px"><p class="h5">ACADEMICS</p></a>
<a class="sections_items" href="Book_List.php?catid=2&&catname=NOVELS" target="_self"><img src="Project_Images\fiction.png"><p class="h5">NOVELS</p></a>
<a class="sections_items" href="Book_List.php?catid=3&&catname=BIOGRAPHY" target="_self"><img src="Project_Images\biography-64.png" width="90px" height="90px"><p class="h5">BIOGRAPHY</p></a>
<a class="sections_items" href="Book_List.php?catid=4&&catname=BUSINESS" target="_self"><img src="Project_Images\business_.png" width="90px" height="90px"><p class="h5">BUSINESS</p></a>
<a class="sections_items" href="Book_List.php?catid=5&&catname=INFORMATION TECHNOLOGY" target="_self"><img src="Project_Images\coding.png" width="90px" height="90px"><p class="h5">INFORMATION TECHNOLOGY</p></a>
<a class="sections_items" href="Book_List.php?catid=6&&catname=HISTORY" target="_self"><img src="Project_Images\history.png" width="90px" height="90px"><p class="h5">HISTORY</p></a>
<a class="sections_items" href="Book_List.php?catid=7&&catname=POETRY" target="_self"><img src="Project_Images\comic.png"
width="90px" height="90px"><p class="h5">POETRY</p></a>
<a class="sections_items" href="Book_List.php?catid=8&&catname=SELF-HELP" target="_self"><img src="Project_Images\self_help.png" width="90px" height="90px"><p class="h5">SELF-HELP</p></a>
<a class="sections_items" href="Book_List.php?catid=9&&catname=ROMANCE" target="_self"><img src="Project_Images\romance.png" width="90px" height="90px"><p class="h5">ROMANCE</p></a>
</div>
</section>
<!-- Recommended books -->
<section class="flex recommended_books">
<h1 class="h6 Ta-c">Latest Books</h1>
<?php
if(isset($_SESSION['USER_TYPE']) || $_SESSION['login']==true )
{
require 'connect_database.php';
$table="Books";
$query="SELECT * FROM $table ORDER BY RAND() LIMIT 6";
$result=mysqli_query($connection,$query);
$rows=mysqli_num_rows($result);
if($rows>0)
{
while( $data=mysqli_fetch_assoc($result) )
{
$BookName=$data['Book_title'];
$Book_author=$data['Book_author'];
$BookContent=$data['Book_pdf'];
echo <<<A
<div class="recommended h5 flex ">
<a href="$BookContent"> ▶ $BookName</a>
<p>By - $Book_author </p>
</div>
A;
}
}
else
{
echo <<<B
<div class="recommended h5 flex" style="justify-content:center !important">
No Books Available
</div>
B;
}
}
?>
</section>
<!-- about section -->
<?php require 'footer.php' ?>
<!-- about section -->
</body>
</html>