This repository was archived by the owner on Mar 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
45 lines (43 loc) · 1.47 KB
/
index.php
File metadata and controls
45 lines (43 loc) · 1.47 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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Welcome | Library Management System</title>
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<style>
.hero-section {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
background: #f8f9fa;
}
</style>
</head>
<body>
<div class="hero-section">
<div class="container">
<h1>Welcome to the Library Management System</h1>
<p class="lead">Your gateway to knowledge and digital resources.</p>
<div class="mt-4">
<?php if (isset($_SESSION['user_id'])): ?>
<p>Welcome back! You are currently logged in.</p>
<?php if ($_SESSION['role'] === 'admin'): ?>
<a href="admin/dashboard.php" class="btn btn-primary btn-lg">Go to Admin Dashboard</a>
<?php else: ?>
<a href="dashboard.php" class="btn btn-primary btn-lg">Go to My Dashboard</a>
<?php endif; ?>
<a href="logout.php" class="btn btn-outline-danger btn-lg">Logout</a>
<?php else: ?>
<a href="login.php" class="btn btn-success btn-lg">Login</a>
<a href="register.php" class="btn btn-outline-primary btn-lg">Create an Account</a>
<?php endif; ?>
</div>
</div>
</div>
</body>
</html>