<?php  if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } function renderExclusionRequests(): string { $requests = Database::fetchAll("SELECT id, ip_address, reason, pushed_shield, pushed_proxy, created_at FROM self_exclusions ORDER BY created_at DESC LIMIT 25"); $html = "<div class=\"exclusion-requests\"><h3>Self-Exclusion Requests</h3>"; if (empty($requests)) { $html .= "<div class=\"empty-state\"><span>No exclusion requests.</span></div>"; } foreach ($requests as $r) { $pushed = ($r["pushed_shield"] ? "Shield ✓ " : "") . ($r["pushed_proxy"] ? "Proxy ✓" : ""); $html .= "<div class=\"excl-entry\">"; $html .= "<span>IP: " . UI::e($r["ip_address"]) . "</span>"; $html .= "<span>" . UI::e(substr($r["reason"] ?? '', 0, 80)) . "</span>"; $html .= "<span>" . UI::e($pushed ?: "Not pushed") . "</span>"; $html .= "<span>" . UI::e($r["created_at"]) . "</span>"; $html .= "</div>"; } $html .= "</div>"; return $html; } 