<?php require_once __DIR__ . '/includes/admin_bootstrap.php';
$adminTitle='Applications';
$items = array_reverse(ugfx_read_json($ugfx['storage']['applications'], []));
include __DIR__ . '/includes/admin_header.php'; ?>
<div class="ugfx-card p-4"><h3>Join the Team applications</h3><div class="table-responsive"><table class="table ugfx-table"><thead><tr><th>Name</th><th>Email</th><th>Role</th><th>Availability</th><th>Status</th><th>Submitted</th></tr></thead><tbody><?php foreach ($items as $item): ?><tr><td><?= htmlspecialchars($item['name'] ?? '') ?></td><td><?= htmlspecialchars($item['email'] ?? '') ?></td><td><?= htmlspecialchars($item['role'] ?? '') ?></td><td><?= htmlspecialchars($item['availability'] ?? '') ?></td><td><?= htmlspecialchars($item['status'] ?? 'new') ?></td><td><?= htmlspecialchars($item['created_at'] ?? '') ?></td></tr><tr><td colspan="6" class="text-secondary small"><?= nl2br(htmlspecialchars($item['experience'] ?? '')) ?><?php if (!empty($item['links'])): ?><div class="mt-2">Links: <?= nl2br(htmlspecialchars($item['links'])) ?></div><?php endif; ?></td></tr><?php endforeach; ?></tbody></table></div></div>
<?php include __DIR__ . '/includes/admin_footer.php'; ?>
