NEW
_oDb;
// Define date range for events (customize as needed)
$sDateFrom = date('Y-m-d', strtotime('-1 month')); // Fetch events from 1 month ago
$sDateTo = date('Y-m-d', strtotime('+1 year')); // Fetch events up to 1 year in the future
// Fetch combined events from UNA and Ticket Fairy
$aCombinedEvents = $oDb->getCombinedEvents($sDateFrom, $sDateTo); // Fetch combined events
// Display the events in the frontend
if (!empty($aCombinedEvents)) {
echo '
';
foreach ($aCombinedEvents as $event) {
echo '
'; // Close events-list div
} else {
echo '';
echo '
'; // Close event-item div
}
echo '' . htmlspecialchars($event['event_name']) . '
'; // Event title echo 'Date: ' . date('F j, Y, g:i a', $event['date_start']) . '
'; // Event date echo 'Location: ' . htmlspecialchars($event['location']) . '
'; // Event location // Show Ticket Fairy URL if it's an external event if (!empty($event['ticket_fairy_url'])) { echo ''; } echo 'No upcoming events found.
'; } ?>Featured Events