28 lines
877 B
PHP
28 lines
877 B
PHP
<?php
|
|
session_start();
|
|
|
|
if (!isset($_SESSION['user_id']) || $_SESSION['user_role'] !== 'admin') {
|
|
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>Admin Dashboard - READY BUDDY</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/style.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>Admin Dashboard</h1>
|
|
<h2>Welcome, Admin <?php echo htmlspecialchars($_SESSION['user_name']); ?>!</h2>
|
|
<p>This is the admin dashboard. You can manage competitions, users, and more from here.</p>
|
|
<p><a href="logout.php">Logout</a></p>
|
|
</div>
|
|
</body>
|
|
</html>
|