diff --git a/index.php b/index.php index 7df7839..9703560 100644 --- a/index.php +++ b/index.php @@ -10,41 +10,7 @@ if ($_SESSION['role'] !== 'admin') { } ?> - +
diff --git a/sidebar.php b/sidebar.php new file mode 100644 index 0000000..7969d69 --- /dev/null +++ b/sidebar.php @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/users.php b/users.php new file mode 100644 index 0000000..c101a53 --- /dev/null +++ b/users.php @@ -0,0 +1,68 @@ + + +
'; + require_once 'footer.php'; + exit; +} + +// Fetch users from the database +$pdo = db(); +$stmt = $pdo->query('SELECT id, name, email, role, created_at FROM users ORDER BY created_at DESC'); +$users = $stmt->fetchAll(PDO::FETCH_ASSOC); + +include 'sidebar.php'; +?> + +
+
+

User Management

+
+ Welcome, ! + Logout +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDNameEmailRoleRegistered At
No users found.
+
+
+ +