'', 'time_from' => '', 'time_to' => '', 'note' => '']]; $recurrenceRuleValue = $editingListing ? (string)($editListing['recurrence_rule'] ?? '') : ''; $recurrenceUntilValue = ''; if ($editingListing && !empty($editListing['recurrence_until'])) { $recurrenceUntilValue = date('Y-m-d', strtotime((string)$editListing['recurrence_until'])); } $recurrenceModeValue = 'single'; if (str_contains($recurrenceRuleValue, 'FREQ=DAILY')) { $recurrenceModeValue = 'daily'; } elseif (str_contains($recurrenceRuleValue, 'FREQ=WEEKLY')) { $recurrenceModeValue = 'weekly'; } $categoryTitleMap = []; foreach (($listingCategories ?? []) as $categoryRow) { $categoryTitleMap[(string)($categoryRow['slug'] ?? '')] = (string)($categoryRow['title'] ?? ''); } $categoryInputValue = $categoryTitleMap[$categorySlugValue] ?? $categorySlugValue; $eventLocationModeValue = $editingEvent ? (string)($editEvent['location_source_type'] ?? 'custom') : 'custom'; $eventLocationSourceIdValue = $editingEvent && !empty($editEvent['location_source_listing_id']) ? (int)$editEvent['location_source_listing_id'] : 0; $eventLocationSourceInputValue = ''; foreach (($eventLocationOptions ?? []) as $locationOption) { if ((int)($locationOption['id'] ?? 0) !== $eventLocationSourceIdValue) { continue; } $optionTypeLabel = (string)($locationOption['listing_type'] ?? '') === 'place' ? 'Ort' : 'Veranstaltung'; $optionAddressLabel = trim(implode(', ', array_filter([ (string)($locationOption['street'] ?? ''), trim((string)($locationOption['zip'] ?? '') . ' ' . (string)($locationOption['city'] ?? '')), ]))); $optionDateLabel = !empty($locationOption['starts_at']) ? date('d.m.Y', strtotime((string)$locationOption['starts_at'])) : ''; $eventLocationSourceInputValue = trim(implode(' · ', array_filter([ $optionTypeLabel, (string)($locationOption['title'] ?? ''), $optionDateLabel, $optionAddressLabel, ]))); if ($eventLocationModeValue !== 'custom' && !empty($locationOption['category_title'])) { $categoryInputValue = (string)$locationOption['category_title']; $categorySlugValue = (string)($locationOption['category_slug'] ?? $categorySlugValue); } break; } $priceRows = []; if ($editingListing && !empty($editListing['prices']) && is_array($editListing['prices'])) { foreach ($editListing['prices'] as $priceRow) { $ageFrom = ''; $ageTo = ''; $noteValue = (string)($priceRow['note'] ?? ''); if (preg_match('/ab\s+(\d+)/u', $noteValue, $match)) { $ageFrom = $match[1]; } if (preg_match('/bis\s+(\d+)/u', $noteValue, $match)) { $ageTo = $match[1]; } $priceRows[] = [ 'amount' => (string)($priceRow['amount'] ?? ''), 'age_from' => $ageFrom, 'age_to' => $ageTo, ]; } } if ($priceRows === []) { $priceRows = [[ 'amount' => '', 'age_from' => '', 'age_to' => '', ]]; } $editingChild = isset($editChild) && $editChild !== null; $childAction = $editingChild ? 'child_update' : 'child_add'; $childModalTitle = $editingChild ? 'Kind bearbeiten' : 'Kind hinzufügen'; $sectionLinks = [ 'profile' => 'Profil', 'children' => 'Kinder', 'events' => 'Events', 'places' => 'Orte & Veranstaltungen', 'community' => 'Community', 'settings' => 'Einstellungen', ]; $showEventTypeChoice = !$editing && (($section ?? 'events') === 'places'); $modalSectionTarget = ($editingListing || ($section ?? '') === 'places') ? 'places' : 'events'; if (!empty($canManageSystemSettings)) { $sectionLinks['system'] = 'System'; } ?>

Hallo, !

Verwalte dein Profil, Kinder, Events und Teilnahmen.

Fehler: