<?php  if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } $accounts = Database::fetchAll("SELECT id, meta_account_id, account_name, currency, status, created_at FROM meta_ad_accounts ORDER BY account_name"); echo "<div class=\"ad-accounts\"><h3>Ad Accounts (" . count($accounts) . ")</h3>"; foreach ($accounts as $a) { $statusCls = $a["status"] === 'active' ? "success" : "default"; echo "<div class=\"account-card\"><span>" . UI::e($a["account_name"]) . "</span><span>" . UI::e($a['meta_account_id']) . "</span>" . UI::badge(UI::e($a["status"]), $statusCls) . "</div>"; } echo "</div>"; 