From efd6077fc96914daed0d4b884dd56da5691627cf Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 1 Mar 2026 00:04:22 +0000 Subject: [PATCH] LPA Health - V1.1 --- admin_dashboard.php | 189 +++++++++++++++++++++ apply.php | 5 +- apply.php_new | 6 +- assets/pasted-20260228-235417-eedda424.png | Bin 0 -> 12080 bytes dashboard.php | 10 +- db/migrations/04_add_role_column.sql | 2 + forgot-password.php | 5 +- index.php | 5 +- login.php | 15 +- resend-verification.php | 5 +- reset-password.php | 5 +- signup.php | 5 +- terms.php | 5 +- test_mail.php | 2 +- verify.php | 5 +- 15 files changed, 227 insertions(+), 37 deletions(-) create mode 100644 admin_dashboard.php create mode 100644 assets/pasted-20260228-235417-eedda424.png create mode 100644 db/migrations/04_add_role_column.sql diff --git a/admin_dashboard.php b/admin_dashboard.php new file mode 100644 index 0000000..af9a5f7 --- /dev/null +++ b/admin_dashboard.php @@ -0,0 +1,189 @@ +query("SELECT COUNT(*) FROM users")->fetchColumn(); + $lpas_count = db()->query("SELECT COUNT(*) FROM lpa_applications")->fetchColumn(); + + // Get all users + $users = db()->query("SELECT * FROM users ORDER BY created_at DESC LIMIT 50")->fetchAll(); + + // Get all LPAs + $lpas = db()->query("SELECT * FROM lpa_applications ORDER BY created_at DESC LIMIT 50")->fetchAll(); +} catch (PDOException $e) { + error_log($e->getMessage()); +} +?> + + + + + + Admin Dashboard — <?php echo htmlspecialchars($project_name); ?> + + + + + + +
+
+
+

System Administration

+

Overview of all users and applications in the system.

+
+
+ +
+
+
+
+
+ +
+
+
Total Users
+

+
+
+
+
+
+
+
+
+ +
+
+
Total Applications
+

+
+
+
+
+
+ +
+
+
+
+
Recent Users
+
+
+ + + + + + + + + + + + + + + + + + + + + +
NameEmailRoleVerifiedJoined
+ + + + + + + Yes + + + No + +
+
+
+
+ +
+
+
+
Recent Applications
+
+
+ + + + + + + + + + + + 0): ?> + + + + + + + + + + + + + +
TypeDonorProgressStatusActions
+
+
ID: #
+
+
+
+
+
+ +
+
+ % +
+ + + PDF +
No applications found.
+
+
+
+
+
+ + + + diff --git a/apply.php b/apply.php index 7d83ab1..69ac4e3 100644 --- a/apply.php +++ b/apply.php @@ -7,7 +7,7 @@ if (!isset($_SESSION["user_id"])) { ?>
- - + <?php echo htmlspecialchars($project_name); ?>
Logged in as: diff --git a/apply.php_new b/apply.php_new index 2867447..0b404d4 100644 --- a/apply.php_new +++ b/apply.php_new @@ -5,7 +5,7 @@ if (!isset($_SESSION["user_id"])) { exit; } require_once 'db/config.php'; -$project_name = $_SERVER['PROJECT_NAME'] ?? 'LPA Builder'; +$project_name = $_SERVER['PROJECT_NAME'] ?? 'LPA Online'; $step = isset($_GET['step']) ? (int)$_GET['step'] : 1; $lpa_id = isset($_GET['id']) ? (int)$_GET['id'] : null; @@ -106,8 +106,8 @@ foreach ($notified_persons as $np) {