From 35f149b4db2822de3ba68565989c2a3c65ff7d15 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 17 Sep 2025 12:23:23 +0000 Subject: [PATCH] MagiCV --- admin/index.php | 66 +++++++++++++++++++++++++++++++++++++++++++++ includes/header.php | 3 +++ 2 files changed, 69 insertions(+) create mode 100644 admin/index.php diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..c8aea29 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,66 @@ +prepare('SELECT id, username, email, role, created_at FROM users ORDER BY created_at DESC'); + $p_users->execute(); + $users = $p_users->fetchAll(PDO::FETCH_ASSOC); +} catch (PDOException $e) { + // For now, we'll just die on error. In a real app, log this. + die("Error fetching users: " . $e->getMessage()); +} + +$pageTitle = 'Admin Dashboard'; +include '../includes/header.php'; +?> + +
+

Admin Dashboard

+

Welcome, !

+ +
+

User Management

+

Here you can view all registered users.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDUsernameEmailRoleRegistered At
No users found.
+
+
+
+ + diff --git a/includes/header.php b/includes/header.php index 2a8210b..af97c42 100644 --- a/includes/header.php +++ b/includes/header.php @@ -23,6 +23,9 @@ if (session_status() == PHP_SESSION_NONE) {
  • Upgrade to PRO
  • + +
  • Admin
  • +
  • Logout
  • Templates