63 lines
2.0 KiB
PHP
63 lines
2.0 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) {
|
|
header("location: login.php");
|
|
exit;
|
|
}
|
|
|
|
require_once 'db/config.php';
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Dashboard - E-Waste Reclaimer</title>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="container">
|
|
<div class="logo">
|
|
<h1><a href="index.php">E-Waste Reclaimer</a></h1>
|
|
</div>
|
|
<nav>
|
|
<ul>
|
|
<li><a href="index.php">Find a Center</a></li>
|
|
<li><a href="dashboard.php">Dashboard</a></li>
|
|
<li><a href="logout.php">Logout</a></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="container page-main">
|
|
<section>
|
|
<h2>Welcome, <?php echo htmlspecialchars($_SESSION['user_name']); ?>!</h2>
|
|
<p>This is your dashboard. From here you will be able to submit e-waste, track your points, and see your submission history.</p>
|
|
|
|
<div class="dashboard-stats">
|
|
<div class="stat-card">
|
|
<h3>Your Points</h3>
|
|
<p class="points-total">0</p>
|
|
<p>Keep recycling to earn more!</p>
|
|
</div>
|
|
<div class="stat-card">
|
|
<h3>Submissions</h3>
|
|
<p class="submissions-total">0</p>
|
|
<a href="#" class="btn btn-secondary">Submit New E-Waste</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<footer>
|
|
<div class="container">
|
|
<p>© <?php echo date("Y"); ?> E-Waste Reclaimer. All Rights Reserved.</p>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|