'', '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 = !empty($eventDraftValues['category_input']) ? (string)$eventDraftValues['category_input'] : ($categoryTitleMap[$categorySlugValue] ?? $categorySlugValue); $eventLocationModeValue = $editingEvent ? (string)($editEvent['location_source_type'] ?? 'custom') : (!empty($eventDraftValues['event_location_mode']) ? (string)$eventDraftValues['event_location_mode'] : 'custom'); $eventLocationSourceIdValue = $editingEvent && !empty($editEvent['location_source_listing_id']) ? (int)$editEvent['location_source_listing_id'] : (!empty($eventDraftValues['event_location_source_id']) ? (int)$eventDraftValues['event_location_source_id'] : 0); $eventLocationPlaceOptions = []; $eventLocationEditorialOptions = []; foreach (($eventLocationOptions ?? []) as $locationOption) { if ((string)($locationOption['listing_type'] ?? '') === 'place') { $eventLocationPlaceOptions[] = $locationOption; } elseif ((string)($locationOption['listing_type'] ?? '') === 'editorial_event') { $eventLocationEditorialOptions[] = $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'] ?? '')), ]))); if ($eventLocationModeValue !== 'custom' && !empty($locationOption['category_title'])) { $categoryInputValue = (string)$locationOption['category_title']; $categorySlugValue = (string)($locationOption['category_slug'] ?? $categorySlugValue); $streetValue = (string)($locationOption['street'] ?? $streetValue); $zipValue = (string)($locationOption['zip'] ?? $zipValue); $cityValue = (string)($locationOption['city'] ?? $cityValue); $regionValue = (string)($locationOption['region'] ?? $regionValue); $latValue = (string)($locationOption['lat'] ?? $latValue); $lngValue = (string)($locationOption['lng'] ?? $lngValue); } break; } $usesDatabaseEventLocation = $currentEntryKind === 'event' && $eventLocationModeValue !== 'custom'; $eventAddressInfoValue = trim(implode(', ', array_filter([ $streetValue, trim($zipValue . ' ' . $cityValue), $regionValue, ]))); $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', ]; if (!empty($canManageProfileLevels)) { $sectionLinks['profile-levels'] = 'Profil-Levels'; } $showEventTypeChoice = !$editing && (($section ?? 'events') === 'places') && $requestedCreateListingKind === null; $modalSectionTarget = ($editingListing || ($section ?? '') === 'places') ? 'places' : 'events'; if (!empty($canManageSystemSettings)) { $sectionLinks['categories'] = 'Kategorien'; $sectionLinks['system'] = 'System'; } ?>

Hallo, !

Verwalte dein Profil, Kinder, Events und Teilnahmen.

Fehler: