<?php require_once __DIR__ . '/includes/admin_bootstrap.php';
$adminTitle='Dashboard';
$news = ugfx_read_json($ugfx['storage']['news'], []);
$events = ugfx_read_json($ugfx['storage']['events'], []);
$requests = ugfx_read_json($ugfx['storage']['requests'], []);
$messages = ugfx_chat_messages(0);
$applications = ugfx_read_json($ugfx['storage']['applications'], []);
$pages = ugfx_get_pages(false);
$friends = ugfx_get_friends(999);
include __DIR__ . '/includes/admin_header.php';
?>
<div class="row g-4 mb-4">
  <div class="col-md-3"><div class="ugfx-card p-4"><div class="ugfx-micro-label">NEWS</div><h2><?= count($news) ?></h2><a class="btn ugfx-btn-outline btn-sm" href="news.php">Manage</a></div></div>
  <div class="col-md-3"><div class="ugfx-card p-4"><div class="ugfx-micro-label">EVENTS</div><h2><?= count($events) ?></h2><a class="btn ugfx-btn-outline btn-sm" href="events.php">Manage</a></div></div>
  <div class="col-md-3"><div class="ugfx-card p-4"><div class="ugfx-micro-label">PAGES</div><h2><?= count($pages) ?></h2><a class="btn ugfx-btn-outline btn-sm" href="pages.php">Manage</a></div></div>
  <div class="col-md-3"><div class="ugfx-card p-4"><div class="ugfx-micro-label">CHAT</div><h2><?= count($messages) ?></h2><a class="btn ugfx-btn-outline btn-sm" href="chat.php">Moderate</a></div></div>
  <div class="col-md-4"><div class="ugfx-card p-4"><div class="ugfx-micro-label">FRIENDS</div><h2><?= count($friends) ?></h2><a class="btn ugfx-btn-outline btn-sm" href="friends.php">Manage</a></div></div>
  <div class="col-md-4"><div class="ugfx-card p-4"><div class="ugfx-micro-label">REQUESTS</div><h2><?= count($requests) ?></h2><a class="btn ugfx-btn-outline btn-sm" href="requests.php">View queue</a></div></div>
  <div class="col-md-4"><div class="ugfx-card p-4"><div class="ugfx-micro-label">APPLICATIONS</div><h2><?= count($applications) ?></h2><a class="btn ugfx-btn-outline btn-sm" href="applications.php">Review</a></div></div>
</div>
<div class="row g-4">
  <div class="col-lg-6"><div class="ugfx-card p-4"><div class="ugfx-micro-label">ADMIN UPGRADE</div><h3>What is live now</h3><div class="ugfx-admin-list"><div class="ugfx-admin-item">News now has create, edit, delete, and publish controls.</div><div class="ugfx-admin-item">Events and custom pages are now editable from the admin side.</div><div class="ugfx-admin-item">Friends/supporters cards are fully manageable.</div><div class="ugfx-admin-item">Schedule is editable for all 7 days with 24-hour slots.</div><div class="ugfx-admin-item">Chat moderation now includes delete, clear, system posts, promo schedules, and blocked words.</div></div></div></div>
  <div class="col-lg-6"><div class="ugfx-card p-4"><div class="ugfx-micro-label">NEXT NICE ADDITIONS</div><h3>Still worth doing later</h3><div class="ugfx-admin-list"><div class="ugfx-admin-item">WYSIWYG editor for pages and news.</div><div class="ugfx-admin-item">Image uploads for news, events, and pages.</div><div class="ugfx-admin-item">Role-based admin users and per-page permissions.</div><div class="ugfx-admin-item">Ban usernames / mute chat directly.</div></div></div></div>
</div>
<?php include __DIR__ . '/includes/admin_footer.php'; ?>