<?php require_once __DIR__ . '/includes/public_bootstrap.php'; $rows=ugfx_top_tracks(50); ugfx_public_header('Underground FX Charts'); ?>
<section class="page-hero"><div class="container-xxl"><div class="glass-panel page-hero-card"><h1>Top 50 charts</h1><p>This board tracks the songs hitting hardest on Underground FX so the chart page feels like a live station tool, not an orphaned add-on.</p></div></div></section>
<section class="pb-5"><div class="container-xxl"><div class="story-card"><?php if(!$rows): ?><p class="text-secondary mb-0">No chart data yet. Let the stream run and this week will start building automatically.</p><?php else: ?><div class="table-responsive"><table class="table align-middle table-dark"><thead><tr><th>#</th><th>Track</th><th>Spins This Week</th></tr></thead><tbody><?php foreach($rows as $i=>$row): ?><tr><td><?= $i+1 ?></td><td><?= htmlspecialchars($row['title'] ?? '') ?></td><td><?= (int)($row['count'] ?? 0) ?></td></tr><?php endforeach; ?></tbody></table></div><?php endif; ?></div></div></section><?php ugfx_public_footer(); ?>
