-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
46 lines (44 loc) · 1.46 KB
/
index.html
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
<?php
// Start the session
session_start();
// Check if the user is logged in
$logged_in = isset($_SESSION['username']);
$username = $logged_in ? $_SESSION['username'] : null;
?>
<?php include 'navbar.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="favicon\android-chrome-512x512.png">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Library Management System</title>
<link rel="stylesheet" href="common.css">
<link rel="stylesheet" href="index.css">
</head>
<body>
<?php include 'navbar.php'; ?>
<main>
<section>
<h2>Manage Your Books Efficiently</h2>
<p>
<?php if ($logged_in): ?>
Welcome back, <?php echo htmlspecialchars($username); ?>! Use the menu above to navigate.
<?php else: ?>
Register or Log In to manage books, search the library, and more!
<?php endif; ?>
</p>
<?php if (!$logged_in): ?>
<div class="actions">
<a href="register.html" class="btn">Register</a>
<a href="login.html" class="btn">Log In</a>
<a href="dashboard.html" class="btn">Dashboard</a>
</div>
<?php endif; ?>
</section>
</main>
<footer>
<p>© 2024 Library Management System</p>
</footer>
</body>
</html>