mirror of
https://github.com/myronblair/novacpx
synced 2026-07-28 13:14:33 -05:00
feat: #41-#47 admin root controls — enhanced pages + new APIs
#41 phpMyAdmin: quick-access links in database manager #43 PostgreSQL: Adminer at /adminer.php (MySQL + PostgreSQL) #44 Mail server: virtual domains list, mail log tail, better service controls #45 FTP server: full account list from DB, better service controls #47 Web server: stats cards, PHP defaults, log viewer New APIs: system/read-log, email/domains Fix: PHP-FPM pm.max_children increased to 20 (was 5, causing exhaustion) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LP9Q4kfCAYAjJnsbHBrViZ
This commit is contained in:
@@ -98,5 +98,21 @@ match ($action) {
|
||||
Response::success(null, 'Autoresponder deleted');
|
||||
})(),
|
||||
|
||||
|
||||
'domains' => (function() use ($db) {
|
||||
Auth::getInstance()->require('admin', 'reseller');
|
||||
$user = Auth::getInstance()->user();
|
||||
$clause = $user['role'] === 'reseller' ? "AND a.user_id IN (SELECT id FROM users WHERE reseller_id=".(int)$user['uid'].")" : "";
|
||||
$rows = $db->fetchAll(
|
||||
"SELECT d.domain, a.username, a.id as account_id,
|
||||
(SELECT COUNT(*) FROM email_accounts WHERE account_id = a.id) as email_count
|
||||
FROM dns_zones d
|
||||
JOIN accounts a ON a.id = d.account_id
|
||||
WHERE 1=1 $clause
|
||||
ORDER BY d.domain"
|
||||
);
|
||||
Response::success($rows);
|
||||
})(),
|
||||
|
||||
default => Response::error("Unknown email action: $action", 404),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user