Dashboard
+Welcome, !
+Here's a quick overview of your account.
+ +5
+You have 5 active projects.
+12
+You have 12 pending tasks.
+3
+You have 3 team members.
+diff --git a/assets/css/custom.css b/assets/css/custom.css index 5a3ae28..265e328 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1,4 +1,3 @@ - body { font-family: 'Lato', sans-serif; color: #264653; @@ -124,3 +123,29 @@ footer { footer a { color: #E9C46A; } + +/* Dashboard Styles */ +.sidebar { + position: fixed; + top: 0; + left: 0; + height: 100%; + width: 280px; + padding: 20px; + background-color: #fff; + border-right: 1px solid #dee2e6; +} +.sidebar .nav-link { + color: #333; + font-weight: 500; +} +.sidebar .nav-link.active { + color: #0d6efd; +} +.sidebar .nav-link .bi { + margin-right: 10px; +} +.main-content { + margin-left: 280px; + padding: 20px; +} \ No newline at end of file diff --git a/dashboard.php b/dashboard.php index f0f57d3..e07dbd9 100644 --- a/dashboard.php +++ b/dashboard.php @@ -1,10 +1,23 @@ prepare("SELECT * FROM users WHERE id = ?"); +$stmt->execute([$userId]); +$user = $stmt->fetch(PDO::FETCH_ASSOC); + +if (!$user) { + session_destroy(); + header("Location: login.php"); + exit; +} + ?> @@ -13,35 +26,80 @@ if (!isset($_SESSION['user_id'])) {
This is your dashboard. You are logged in.
+Here's a quick overview of your account.
+ +You have 5 active projects.
+You have 12 pending tasks.
+You have 3 team members.
+