41 lines
1.8 KiB
PHP
41 lines
1.8 KiB
PHP
<?php
|
|
session_start();
|
|
if (!isset($_SESSION['user_id'])) {
|
|
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>Dashboard</title>
|
|
<style>
|
|
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #F7F9FC; color: #333; margin: 0; padding: 20px; display: flex; justify-content: center; align-items: center; height: 100vh; }
|
|
.container { max-width: 800px; margin: 0 auto; background-color: #FFFFFF; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); padding: 40px; text-align: center; }
|
|
h1 { color: #4A90E2; margin-bottom: 30px; }
|
|
.nav-links a { display: block; background-color: #4A90E2; color: white; padding: 15px 20px; margin: 10px 0; border-radius: 5px; text-decoration: none; font-size: 18px; transition: background-color 0.3s; }
|
|
.nav-links a:hover { background-color: #357ABD; }
|
|
.logout-link { margin-top: 30px; }
|
|
.logout-link a { color: #E35050; text-decoration: none; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div style="text-align: right; position: absolute; top: 20px; right: 20px;">
|
|
Logged in as <strong><?php echo htmlspecialchars($_SESSION['username']); ?></strong>
|
|
</div>
|
|
<h1>Dashboard</h1>
|
|
<div class="nav-links">
|
|
<a href="request_dashboard.php">Program Change Requests</a>
|
|
<?php if (isset($_SESSION['role']) && $_SESSION['role'] === 'Admin'): ?>
|
|
<a href="user_management.php">User Management</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="logout-link">
|
|
<a href="logout.php">Logout</a>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|