ensureSchema(); $userId = (int)$_SESSION['user_id']; $ics = $calendarSync->renderUserCalendarIcs($userId, 'Papa-Kind-Treff Events'); header('Content-Type: text/calendar; charset=utf-8'); header('Content-Disposition: attachment; filename="papa-kind-treff-events.ics"'); header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); echo $ics;