<?php  defined('C5_EXECUTE') or die("Access Denied.");
$nh = Loader::helper('navigation');
?>

<div id="upcoming_events">

<?php  if (!empty($field_2_textbox_text)): ?>
	<div class="up_event_title"><h3><?php  echo htmlentities($field_2_textbox_text, ENT_QUOTES, APP_CHARSET); ?></h3></div>
<?php  endif; ?>

<?php  if (!empty($field_7_textarea_text)): ?>
	<div class="up_event_desc"><?php  echo nl2br(htmlentities($field_7_textarea_text, ENT_QUOTES, APP_CHARSET)); ?></div>
<?php  endif; ?>

<?php  if (!empty($field_3_date_value)): ?>
	<div class="up_event_datepicker"><?php  echo date('l, F jS', strtotime($field_3_date_value)); ?></div>
<?php  endif; ?>

<?php  if (!empty($field_4_textbox_text)): ?>
	<div class="up_event_date"><?php  echo htmlentities($field_4_textbox_text, ENT_QUOTES, APP_CHARSET); ?></div>
<?php  endif; ?>

<?php  if (!empty($field_5_textbox_text)): ?>
	<div class="up_event_time"><?php  echo htmlentities($field_5_textbox_text, ENT_QUOTES, APP_CHARSET); ?></div>
<?php  endif; ?>

<?php  if (!empty($field_6_textbox_text)): ?>
	<div class="up_event_cost"><?php  echo htmlentities($field_6_textbox_text, ENT_QUOTES, APP_CHARSET); ?></div>
<?php  endif; ?>

<?php  if (!empty($field_8_link_cID)):
	$link_url = $nh->getLinkToCollection(Page::getByID($field_8_link_cID), true);
	$link_text = empty($field_8_link_text) ? $link_url : htmlentities($field_8_link_text, ENT_QUOTES, APP_CHARSET);
	?>
	<div class="up_event_contact">
	<a href="<?php  echo $link_url; ?>"><?php  echo $link_text; ?></a>
	</div>
<?php  endif; ?>

<?php  if (!empty($field_9_wysiwyg_content)): ?>
	<div class="up_event_misc">
	<?php  echo $field_9_wysiwyg_content; ?>
	</div>
<?php  endif; ?>

</div>


