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