53 lines
1.7 KiB
PHP
53 lines
1.7 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
// If the user is not logged in, redirect to the login page.
|
|
if (!isset($_SESSION['user_id'])) {
|
|
header('Location: login.php?redirected=true');
|
|
exit;
|
|
}
|
|
|
|
$userName = $_SESSION['user_name'] ?? 'User';
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Dashboard - Miralok Africa</title>
|
|
<meta name="robots" content="noindex, nofollow">
|
|
|
|
<!-- Bootstrap CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
<!-- Custom CSS -->
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
|
|
<!-- Header -->
|
|
<?php include './shared/header.php'; ?>
|
|
|
|
<main class="container mt-5 pt-5">
|
|
<div class="p-5 mb-4 bg-light rounded-3">
|
|
<div class="container-fluid py-5">
|
|
<h1 class="display-5 fw-bold">Welcome, <?php echo htmlspecialchars($userName); ?>!</h1>
|
|
<p class="col-md-8 fs-4">This is your dashboard. From here you will be able to manage your profile, vehicles, and applications.</p>
|
|
<p>Your role is: <strong><?php echo htmlspecialchars($_SESSION['user_role']); ?></strong></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<h2>Quick Actions</h2>
|
|
<p>More content and features will be added here soon.</p>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<!-- Bootstrap JS -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|