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): + ?> +
+ + +
+
+ Status: +
+

Last updated:

+
+ +
+ +
+

No projects yet.

+

Get started by creating your first project.

+
+ + + +
+ + +