0) ob_end_clean(); header('Content-Type: text/html; charset=utf-8'); header('Cache-Control: no-store'); header("Content-Security-Policy: default-src 'none'; img-src https: data:; style-src 'unsafe-inline' https:; font-src https: data:; frame-ancestors 'self'"); $name = (string)($_GET['name'] ?? ''); if ($name === '' || strlen($name) > 190) { http_response_code(400); echo '

Invalid template reference.

'; exit; } try { $template = PAEmailReviewRequest($PASYSCONF, 'templates/info', ['name'=>$name]); $code = PAEmailReviewCode($template); echo $code !== '' ? PAEmailReviewPreviewHtml($code) : '

This template has no HTML content.

'; } catch (Throwable $e) { error_log('Email template preview: ' . $e->getMessage()); http_response_code(503); echo '

Preview is temporarily unavailable. Try again later.

'; } exit;