From 5eac55563f6fc57bac5332944057281a53c6152e Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 1 Jan 2026 09:17:54 +0000 Subject: [PATCH] Edit dashboard.php via Editor --- dashboard.php | 83 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 17 deletions(-) diff --git a/dashboard.php b/dashboard.php index d6c35cc..66aad54 100644 --- a/dashboard.php +++ b/dashboard.php @@ -1,23 +1,72 @@ "unauthorized"]); - exit; +if (!isset($_SESSION['user_id'])) { + header('Location: login.php'); + exit; } -$stmt = $pdo->prepare(" - SELECT id, title, status, created_at, updated_at, final_video_url - FROM projects - WHERE user_id = ? - ORDER BY created_at DESC -"); -$stmt->execute([$userId]); +?> + + + + + + Dashboard - AI Cinema Engine + + + + +
+

Welcome to your Dashboard

+

Hello, !

+

This is your protected dashboard. You can manage your projects and scenes from here.

-echo json_encode($stmt->fetchAll()); -exit; +
+

My Projects

+ Create New Project +
+ + prepare("SELECT * FROM projects WHERE user_id = ? ORDER BY created_at DESC"); + $stmt->execute([$_SESSION['user_id']]); + $projects = $stmt->fetchAll(); + + if (count($projects) > 0): + ?> + + +
+

No projects yet.

+

Get started by creating your first project.

+
+ + + +
+ + +