Veranstaltungen




Zukünftige Veranstaltungen



Vergangene Veranstaltungen





format(‚d.m.Y‘);

foreach($events as $event)
{
$startdate = (new DateTime($event[‚Startdate‘]));//->format(‚d.m.Y‘);
$enddate = (new DateTime($event[‚Enddate‘]));//->format(‚d.m.Y‘);

$eventname = $event[‚eventtype‘] == 1 ? „Rennen: „.$event[‚Name‘] : $event[‚Name‘];
$eventlink = $event[‚link‘];

if($isFuture && $startdate < $today) { return; } if(!$isFuture && $startdate > $today)
{
continue;
}
echo „

„.$startdate->format(‚d.m.Y‘).“ – „.$enddate->format(‚d.m.Y‘).“ $eventname

\n“;
}
}

function getEventObject()
{
$dbConnection = (new DBConnector)->createDbConnection();

$raceQuery = $dbConnection->query(„SELECT * FROM event WHERE eventtype IN(‚1‘, ‚3‘, ‚6‘) ORDER BY Startdate desc“);
while ($event = $raceQuery->fetch_assoc())
{
$events[] = $event;
}
return $events;
}

?>