Files
pae.co.at/other/archive/version_01/html/html_events.php
2017-03-02 21:57:21 -06:00

62 lines
1.4 KiB
PHP
Executable File

<?php
print "
<div class='page_subtitle'>{$_MENU['events']}</div>
<div class='page_content'>
";
# get the events to display
$events = xml_parse_file($_CONFIG['events_file']);
# it may be the case that there are no events scheduled
if(!is_array($events['events']))
{
print $_ERRORS['noevents'];
}
# print the events if they do exist (amazing logic, I know)
else
{
$events = xml_force_array($events['events']['event']);
# step through each event and print the html for it
foreach($events as $event)
{
# the html if there is a picture to show with this event
$picture = '';
if(!empty($event['picture']))
{
$picture = "<img src='/pae.co.at/data/events_photos/{$event['picture']}' align='left' width='100' class='event_picture' />";
}
# put line breaks into location data
$event['location'] = nl2br($event['location']);
# put line breaks into description data
$event['description'] = nl2br($event['description']);
print "
<div class='text_div' style='min-height:120px'>
<div class='text_header'>{$event['title']}</div>
<div class='text'>
$picture
<p>
<strong>{$_WORDS['when']}:</strong>
{$event['date']},
{$_WORDS['from']} {$event['starttime']}
{$_WORDS['until']} {$event['endtime']}
</p>
<p>
<strong>{$_WORDS['where']}:</strong><br /> {$event['location']}
</p>
<p>
<strong>{$_WORDS['what']}:</strong><br /> {$event['description']}
</p>
</div>
</div>
";
}
}
print "
</div>";
?>