<?php

global $post;
if (espresso_display_ticket_selector($post->ID) && (is_single() || is_archive() && espresso_display_ticket_selector_in_event_list())) {
    ?>

<?php 
    $free_event = false;
    $ticket_array = espresso_event_tickets_available($post->ID, FALSE, FALSE);
    if (count($ticket_array) === 1) {
        $first_ticket = array_shift($ticket_array);
        if ($first_ticket->price() === floatval(0)) {
            $free_event = true;
        }
    }
    if ($free_event) {
        ?>

	<div class="event-tickets-container">
		<div class="event-tickets" style="clear: both;">
			<div>This is a FREE event.</div>
			<p>Please reserve your free ticket below.</p>
			<?php 
        espresso_ticket_selector($post);
        ?>
			<p>If you have attended an event recently and have a comment or suggestion, send us an email at <a href="mailto:info@germansociety.org">info@germansociety.org</a>.</p>
		</div>
	</div>

	<?php 
    } else {
?>
<br/>
<?php 
_e('Organizer Email: ', 'event_espresso') . espresso_organization_email($EVT_ID);
?>
<br/>
<?php 
_e('Event Phone: ', 'event_espresso') . espresso_event_phone($EVT_ID);
?>
</p>
<p><?php 
_e('Event Status: ', 'event_espresso') . espresso_event_status($EVT_ID);
?>
</p>
<p><?php 
_e('Categories: ', 'event_espresso') . espresso_event_categories($EVT_ID);
?>
</p>
<?php 
_e('Dates and Times: ', 'event_espresso') . espresso_list_of_event_dates($EVT_ID);
_e('Available Tickets: ', 'event_espresso') . espresso_event_tickets_available($EVT_ID);
?>
<p><?php 
_e('Event Venue: ', 'event_espresso') . espresso_venue_name(NULL, FALSE);
?>
</p>
<p><?php 
echo __('Description: ', 'event_espresso') . $event_description;
?>
</p><br/>
 
<div class="page-header"><?php 
the_title();
?>
</div>

<div class="event-date"><?php 
espresso_event_date();
?>
</div>

<div><?php 
the_content();
?>
</div>


<?php 
echo espresso_event_tickets_available();