'; // Fetch CSS for inlining $cssContent = file_get_contents('assets/css/custom.css'); // Prepare image for ZIP $imageContent = @file_get_contents($imageUrl); $imageFilename = basename(parse_url($imageUrl, PHP_URL_PATH)); if (empty($imageFilename)) { $imageFilename = 'featured-image.jpg'; } // Generate the final HTML content from the selected template structure $templateId = (int)($_POST['template_id'] ?? 1); $selectedTemplate = null; foreach ($templates as $t) { if ($t['id'] === $templateId) { $selectedTemplate = $t; break; } } $templateHtml = $selectedTemplate ? file_get_contents($selectedTemplate['file']) : '
' . $description . '
Select a professionally designed template to begin.
= htmlspecialchars($template['description']) ?>