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(); // Get migration history try { $migration_history = $db->query("SELECT * FROM migration_history ORDER BY executed_at DESC")->fetchAll(); } catch (PDOException $e) { $migration_history = []; } // Get backups from filesystem $backups_dir = __DIR__ . '/backups'; if (is_dir($backups_dir)) { $backup_files = glob($backups_dir . '/backup_*.sql'); foreach ($backup_files as $file) { $backups[] = [ 'filename' => basename($file), 'size' => round(filesize($file) / 1024, 2) . ' KB', 'created_at' => filemtime($file) ]; } // Sort by created_at descending usort($backups, function($a, $b) { return $b['created_at'] - $a['created_at']; }); } } catch (PDOException $e) { error_log($e->getMessage()); } ?>
Overview of all users and applications in the system.
| Name | Role | Credits | Verified | Actions | |
|---|---|---|---|---|---|
| Yes No |
| Type | Donor | Progress | Status | Actions |
|---|---|---|---|---|
|
ID: #
|
|
|||
| No applications found. | ||||
| File Name | Executed At |
|---|---|
| No migration history found. Run migrations to initialize. | |
| File Name | Size | Actions |
|---|---|---|
| Download | ||
| No backups found. Backups are created automatically before migrations. | ||