get('admin_ankuendigung_page_title') ?? "📢 Ankündigung"; $backLink = './?AdminIndex'; $footerNote = $lang->get('admin_ankuendigung_footer_note') ?? "⚠️ Beachte, dass Änderungen im Chat etwas verzögert ankommen bzw. ein Reload (Strg + F5) nötig ist."; ob_start(); $msg = $msg ?? ''; $data = $this->data; ?>



get('admin_ankuendigung_unit_seconds') ?? 'Sekunden' ?>

get('admin_ankuendigung_preview') ?? '👁️ Vorschau:' ?>
function el(id) { return document.getElementById(id); } function toggleBg(v) { const bgColorInput = el('bgcolor'); if (bgColorInput) { bgColorInput.style.display = (v === 'custom') ? 'block' : 'none'; } } function toggleColor(v) { const colorInput = el('color'); if (colorInput) { colorInput.style.display = (v === 'custom') ? 'block' : 'none'; } } function updatePreview() { const t1 = el('text1')?.value || ''; const t2 = el('text2')?.value || ''; const t3 = el('text3')?.value || ''; const t4 = el('text4')?.value || ''; let txt = [t1, t2, t3, t4].filter(Boolean).join(" ✦ ✦ ✦ "); txt = txt ? "✦ ✦ ✦ " + txt + " ✦ ✦ ✦" : ""; const sp = el('speed')?.value || 10; const speedSpan = el('speedVal'); if (speedSpan) speedSpan.innerText = sp; const bgSel = el('bgcolor_select')?.value || ''; const bg = (bgSel === 'custom') ? (el('bgcolor')?.value || '') : ''; const colSel = el('color_select')?.value || ''; let col = ''; if (colSel === 'custom') { col = el('color')?.value || ''; } else { col = colSel; } const anim = 'marqueeAnim ' + sp + 's linear infinite'; let html = '
'; if (col === 'rainbow') { html += '
' + txt.replace(//g, '>') + '
'; } else { html += '
' + txt.replace(//g, '>') + '
'; } html += '
'; const preview = el('preview'); if (preview) preview.innerHTML = html; } function closeSuccessBanner() { const banner = document.getElementById('successBanner'); if (banner) banner.remove(); } document.addEventListener("DOMContentLoaded", function() { const speedInput = el('speed'); const text1 = el('text1'); const text2 = el('text2'); const text3 = el('text3'); const text4 = el('text4'); const bgSelect = el('bgcolor_select'); const colorSelect = el('color_select'); const bgColor = el('bgcolor'); const colorInput = el('color'); if (speedInput) speedInput.addEventListener('input', updatePreview); if (text1) text1.addEventListener('input', updatePreview); if (text2) text2.addEventListener('input', updatePreview); if (text3) text3.addEventListener('input', updatePreview); if (text4) text4.addEventListener('input', updatePreview); if (bgSelect) { bgSelect.addEventListener('change', function() { toggleBg(this.value); updatePreview(); }); } if (colorSelect) { colorSelect.addEventListener('change', function() { toggleColor(this.value); updatePreview(); }); } if (bgColor) bgColor.addEventListener('input', updatePreview); if (colorInput) colorInput.addEventListener('input', updatePreview); // Initial state if (bgSelect) toggleBg(bgSelect.value); if (colorSelect) toggleColor(colorSelect.value); updatePreview(); }); JS; $content = ob_get_clean(); include "admin_master_template.php"; ?>