35149-vm/dashboard.php
Flatlogic Bot 7a3409404c v01
2025-10-23 20:44:05 +00:00

30 lines
874 B
PHP

<?php
session_start();
// If user is not logged in, redirect to login page
if (!isset($_SESSION['user_id'])) {
header("Location: login.php");
exit;
}
include 'templates/header.php';
?>
<div class="container mt-5">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h2>Dashboard</h2>
</div>
<div class="card-body">
<h3>Welcome, <?php echo htmlspecialchars($_SESSION['user_name']); ?>!</h3>
<p>You are logged in as a(n) <strong><?php echo htmlspecialchars($_SESSION['user_role']); ?></strong>.</p>
<p>This is your dashboard. More features will be added soon.</p>
</div>
</div>
</div>
</div>
</div>
<?php include 'templates/footer.php'; ?>