Events calendar
Tickets
getCombinedEventsForDisplay($sDateFrom, $sDateTo);
// Check if there are any events
if (!empty($aEvents)) {
// Loop through each event and display its details
foreach ($aEvents as $event) {
echo '
';
// Display event title with a ticket URL if available
echo '
'; // Close event-item div
}
} else {
// If no events are found, display a message
echo '';
if (!empty($event['ticket_url'])) {
echo '' . htmlspecialchars($event['title']) . '';
} else {
echo htmlspecialchars($event['title']);
}
echo '
';
// Display the event date
echo '';
echo 'Date: ' . htmlspecialchars(date('Y-m-d', strtotime($event['date_start']))) . ' - ' . htmlspecialchars(date('Y-m-d', strtotime($event['date_end'])));
echo '
';
// Display the event location
echo '';
echo 'Location: ' . htmlspecialchars($event['location']);
echo '
';
echo 'No events available during the selected dates.
'; } ?>