query("SELECT id, full_name, id_or_passport, id_scan, identity_status FROM submissions ORDER BY created_at DESC");
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo "";
echo "| " . htmlspecialchars($row['id']) . " | ";
echo "" . htmlspecialchars($row['full_name']) . " | ";
echo "" . htmlspecialchars($row['id_or_passport']) . " | ";
echo "View Scan | ";
$status_class = 'bg-yellow-200 text-yellow-800';
if ($row['identity_status'] === 'Approved') {
$status_class = 'bg-green-200 text-green-800';
} elseif ($row['identity_status'] === 'Rejected') {
$status_class = 'bg-red-200 text-red-800';
}
echo "" . htmlspecialchars($row['identity_status']) . " | ";
echo "";
if ($row['identity_status'] === 'Pending') {
echo "";
}
echo " | ";
echo "
";
}
?>