contentpanel_import_leitgedanken($pdo, $_FILES['leitgedanken_pdf'] ?? []), 'create_service' => contentpanel_create_service($pdo, $_POST), 'delete_service' => contentpanel_delete_service($pdo, $_POST['id'] ?? null), 'create_announcement' => contentpanel_create_announcement($pdo, $_POST), 'delete_announcement' => contentpanel_delete_announcement($pdo, $_POST['id'] ?? null), 'upload_news' => contentpanel_upload_news($_POST, $_FILES['fileToUpload'] ?? []), 'delete_news' => contentpanel_delete_news_files((string) ($_POST['file_base'] ?? '')) ? 'Aushang wurde vollständig gelöscht.' : throw new InvalidArgumentException('Ungültiger Dateiname oder Aushang konnte nicht vollständig gelöscht werden.'), default => throw new InvalidArgumentException('Unbekannte Aktion.'), }; } catch (InvalidArgumentException $exception) { $message = $exception->getMessage(); $flashType = 'error'; } catch (Throwable $exception) { error_log('Contentpanel action failed (' . $action . '): ' . $exception->getMessage()); $message = 'Die Aktion konnte nicht abgeschlossen werden. Bitte versuchen Sie es erneut.'; $flashType = 'error'; } $_SESSION['contentpanel_flash'] = [ 'tab' => $tab, 'message' => $message, 'type' => $flashType, ]; header('Location: insert.php#' . rawurlencode($tab), true, 303); exit(); } $flash = $_SESSION['contentpanel_flash'] ?? null; unset($_SESSION['contentpanel_flash']); $today = date('Y-m-d'); $services = contentpanel_fetch_services($pdo, $today); $announcements = contentpanel_fetch_announcements($pdo, $today); $newsItems = contentpanel_list_news(); $pdo = null; $flashTab = is_array($flash) ? (string) ($flash['tab'] ?? '') : ''; $flashMessage = is_array($flash) ? (string) ($flash['message'] ?? '') : ''; $flashType = is_array($flash) ? (string) ($flash['type'] ?? '') : ''; ?>
Schwarzes Brett
Geplante Gottesdienste
Keine Einträge vorhanden.
Leitgedanken importieren
Neuen Gottesdienst planen
Geplante Ansagen
Keine Einträge vorhanden.
Neue Ansage planen
Aktuelle Aushänge
Keine Aushänge vorhanden.
Aushang
· Verfällt
Neuen Aushang hochladen