diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..120e538
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,87 @@
+/* General Body Styles */
+body {
+ background-color: #F3F4F6; /* Cool Gray 100 */
+ color: #111827; /* Gray 900 */
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
+}
+
+.sidebar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ width: 250px;
+ padding: 20px;
+ background-color: #FFFFFF; /* White */
+ border-right: 1px solid #E5E7EB; /* Gray 200 */
+}
+
+.sidebar h3 {
+ color: #4F46E5; /* Indigo */
+ font-weight: 600;
+}
+
+.sidebar .nav-link {
+ color: #374151; /* Gray 700 */
+ font-size: 1rem;
+ border-radius: 0.375rem; /* 6px */
+ margin-bottom: 0.5rem;
+ padding: 0.75rem 1rem;
+}
+
+.sidebar .nav-link.active,
+.sidebar .nav-link:hover {
+ color: #4F46E5;
+ background-color: #EEF2FF; /* Indigo 50 */
+}
+
+.sidebar .nav-link .icon {
+ margin-right: 1rem;
+ width: 20px;
+}
+
+.main-content {
+ margin-left: 250px;
+ padding: 2rem;
+}
+
+.header {
+ background-color: #FFFFFF;
+ padding: 1rem 2rem;
+ border-bottom: 1px solid #E5E7EB;
+ margin-bottom: 2rem;
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
+ border-radius: 0.5rem; /* 8px */
+}
+
+.card {
+ border-radius: 0.5rem; /* 8px */
+ border: none;
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
+}
+
+.table {
+ vertical-align: middle;
+}
+
+.table th {
+ font-weight: 600;
+ color: #6B7280; /* Gray 500 */
+}
+
+.badge {
+ padding: 0.4em 0.65em;
+ font-size: 0.75em;
+ font-weight: 600;
+}
+
+.btn-primary {
+ background-color: #4F46E5;
+ border-color: #4F46E5;
+ box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
+}
+
+.btn-primary:hover {
+ background-color: #4338CA; /* Darker Indigo */
+ border-color: #4338CA;
+}
diff --git a/index.php b/index.php
index 7205f3d..23c62c9 100644
--- a/index.php
+++ b/index.php
@@ -1,150 +1,158 @@
exec("
+ CREATE TABLE IF NOT EXISTS users (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ name VARCHAR(255) NOT NULL,
+ email VARCHAR(255) NOT NULL UNIQUE,
+ role VARCHAR(50) NOT NULL,
+ status VARCHAR(50) NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+ );
+ ");
+
+ // Check if table is empty and seed if necessary
+ $stmt = $pdo->query("SELECT COUNT(*) FROM users");
+ if ($stmt->fetchColumn() == 0) {
+ $seed_users = [
+ ['John Doe', 'john.doe@example.com', 'Customer Support', 'Active'],
+ ['Jane Smith', 'jane.smith@example.com', 'Trust & Safety', 'Active'],
+ ['Peter Jones', 'peter.jones@example.com', 'Financial Ops', 'Suspended'],
+ ['Admin User', 'admin@example.com', 'Platform Admin', 'Active'],
+ ['CEO User', 'ceo@example.com', 'CEO', 'Active']
+ ];
+
+ $insert_stmt = $pdo->prepare("INSERT INTO users (name, email, role, status) VALUES (?, ?, ?, ?)");
+ foreach ($seed_users as $user) {
+ $insert_stmt->execute($user);
+ }
+ }
+
+ // Fetch all users
+ $users = $pdo->query("SELECT id, name, email, role, status, DATE_FORMAT(created_at, '%b %d, %Y') as joined_date FROM users ORDER BY id DESC")->fetchAll(PDO::FETCH_ASSOC);
+
+} catch (PDOException $e) {
+ // For a real app, you'd want to log this error and show a user-friendly message.
+ die("Database error: " . $e->getMessage());
+}
+
+$page_title = "Admin Dashboard - Users";
+$project_name = getenv('PROJECT_NAME') ?: 'GO7EIGHT';
+
+function getStatusClass($status) {
+ switch (strtolower($status)) {
+ case 'active':
+ return 'bg-success';
+ case 'suspended':
+ return 'bg-danger';
+ case 'pending':
+ return 'bg-warning';
+ default:
+ return 'bg-secondary';
+ }
+}
?>
-
+
-
-
- New Style
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ = htmlspecialchars($page_title) ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
Analyzing your requirements and generating your website…
-
- Loading…
-
-
= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-
This page will update automatically as the plan is implemented.
-
Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+ | # |
+ Name |
+ Email |
+ Role |
+ Status |
+ Joined |
+
+
+
+
+
+ | No users found. |
+
+
+
+
+ | = htmlspecialchars($user['id']) ?> |
+ = htmlspecialchars($user['name']) ?> |
+ = htmlspecialchars($user['email']) ?> |
+ = htmlspecialchars($user['role']) ?> |
+
+
+ = htmlspecialchars($user['status']) ?>
+
+ |
+ = htmlspecialchars($user['joined_date']) ?> |
+
+
+
+
+
+
+
+
+
+
+
+
-
+