<!-- Primary Page Layout -->
<div id="body" class="container">
	<section id="main">
		<div id="about">
			<h1>Seminars</h1>
			<div>We hold weekly seminars, covering various aspects of biking, from fitness to every day commute. For beginners who seek more breadth on a topic, we have staff dedicated to introducing you to the cycling lifestyle. For the more avid bike rider, we will go more in depth during these workshops, covering every part of the bike and every aspect of cycling.
			<br/><br/>
			<em> Please note that seminars must be reserved before the day of the seminar (12:00 AM EST). </em>
			</div>
		</div>
		<br/>
		<div class="value-props row">
			<section id="seminars" class="twelve columns columns value-prop">
				<h3 class="title" style="text-align:left;"> Upcoming Seminars </h3>
					<?php 
$seminars = getSeminars();
$loggedin = $login->isUserLoggedIn();
foreach ($seminars as $seminarID => $seminar) {
    $date = date('l, F j', $seminar['datetime']);
    $time = date('g:i a', $seminar['datetime']) . " - " . date('g:i a', $seminar['datetime'] + $seminar['duration'] * 60);
    echo '<div class="seminar twelve columns columns value-prop"  id=seminar_' . $seminar['seminar_id'] . '>';
    echo '<div class="graybox nine columns columns value-prop">
											<div>
												<h5 class="seminar-header" style="float:left">' . $seminar['title'] . '</h5>
												<span style="float:right; text-align:right;">' . $date . '<br />' . $time . '</span>
											</div>
											<br /><br />
											<div class="seminar-content">' . $seminar['description'] . '</div>
											</div>';
    echo '<div class="control-box three columns columns value-prop">';
    if ($loggedin == true) {
function cancelRegistration($username, $seminarID)
{
    $seminars = getSeminars();
    $attendee_list = readJSON("seminar_attendees.json");
    $datetime = $seminars[$seminarID]['datetime'];
    if (in_array($username, $attendee_list['attendees'][$seminarID][$datetime])) {
        $key = array_search($username, $attendee_list['attendees'][$seminarID][$datetime]);
        unset($attendee_list['attendees'][$seminarID][$datetime][$key]);
        modifyJSON("seminar_attendees.json", $attendee_list);
    }
}