41 lines
1.4 KiB
PHP
41 lines
1.4 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
// Authentication check
|
|
if (!isset($_SESSION['user_id']) || empty($_SESSION['role_name']) || $_SESSION['role_name'] !== 'student') {
|
|
header('Location: login.php');
|
|
exit();
|
|
}
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Student Dashboard</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<header class="p-3 mb-3 border-bottom sticky-top bg-light">
|
|
<div class="container">
|
|
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
|
|
<a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none">
|
|
<span class="fs-4">School Management</span>
|
|
</a>
|
|
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
|
|
<li><a href="student_dashboard.php" class="nav-link px-2 link-secondary">Dashboard</a></li>
|
|
</ul>
|
|
<div class="text-end">
|
|
<a href="logout.php" class="btn btn-outline-primary">Logout</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<main class="container py-5">
|
|
<h1>Welcome, Student!</h1>
|
|
<p>This is your dashboard.</p>
|
|
</main>
|
|
</body>
|
|
</html>
|