</div> <main class="col-80"> <div class="inner-wrap"> <div class="main-heading"> <h1>My Events</h1> <?php $events = getEventUsers($_SESSION["user_id"], true); if ($events) { ?> <p>All of the events that you're registered for are listed below.</p> <p>Just click on an event to see more details about your registration or to make changes.</p> </div> <ul class="events"> <?php foreach ($events as $event) { echo getEventHtml($event, true, true); } } else { ?> <p>Uh-oh. You're not registered for any events!</p> <p>You can register for events <a href="/events/">on our events page</a>.</p> <p>If you've registered for an event in person or by phone, that event might not show up here immediately, but don't worry, we'll update your profile soon.</p> <?php } ?> </ul> </div> </main> </div> </div> <?php
include ROOT_PATH . "inc/header.php"; ?> <div class="wrapper content"> <div class="row"> <nav class="col-20"> <ul class="side-nav left"> <li><a href="/user/info/">Account Settings</a></li> <li><a href="/user/membership/">Membership</a></li> <li class="selected"><a href="/user/events/">Event Registrations</a></li> </ul> </nav> <main class="col-80"> <div class="inner-wrap"> <ul class="events"> <?php echo getEventHtml($event); ?> </ul> <?php if (isset($_SESSION["incorrect-password"])) { ?> <div class="alert-box error"> <i class="fa fa-exclamation fa-2x"></i> <p>Incorrect password. Please try again.</p> </div> <?php unset($_SESSION["incorrect-password"]); } ?> <?php if (isset($_SESSION["payment"]) || isset($_SESSION["modified"]) || isset($_SESSION["cancel"])) {
foreach ($events as $event) { $month = date("F", strtotime($event["event_date"])); $year = date("Y", strtotime($events[0]["event_date"])); if ($month != $start_month) { $start_month = $month; ?> <div class="month"> <p> <?php echo $month . ' ' . $year; ?> </p> <div id="rule"></div> </div><?php } echo getEventHtml($event, true, false); if (isset($_SESSION["user_id"])) { // if the user is already signed up for this event, tell them that $user_events = user_events($_SESSION["user_id"]); if (in_array($event["event_id"], $user_events)) { ?> <p>Registered</p><?php } } } ?> </ul> <div class="pagination"> <?php include ROOT_PATH . "inc/partial-list-navigation.html.php";
<?php include ROOT_PATH . "inc/head.php"; ?> <body> <?php include ROOT_PATH . "inc/header.php"; ?> <main class="wrapper content"> <div class="inner-wrap"> <div class="breadcrumb"><a href="/events/">Events</a> > <?php echo $event["name"]; ?> </div> <ul class="events"> <?php echo getEventHtml($event, false); ?> </ul> <?php if (isset($_SESSION["user_id"])) { // if the user is already signed up for this event, tell them that and skip the rest if (isUserRegistered($user["user_id"], $_GET["id"])) { ?> <div class="alert-box"> <i class="fa fa-calendar-check-o fa-3x"></i> <div> <?php if (isset($_SESSION["registered"])) { if (isset($_SESSION["payment"])) { ?> <p>Your payment of $<?php echo $_SESSION["payment"];
$events = array(); foreach ($eventRs as $event) { $eventId = $event['event_id']; $eventCode = $event['event_code']; $eventName = formatEventName($event['division_name'], $event['sex_name'], $event['age_group_name'], $event['form_name']); // save info for later $events[] = array('code' => $eventCode, 'name' => $eventName); // get scoring details of event $r = $conn->query("SELECT placement, score_0, score_1, score_2, score_3, score_4, score_5, time_text, time_deduction, other_deduction, final_score, group_id, competitor_id" . " FROM {$scoringTable}" . " WHERE event_id = {$eventId}" . " AND final_score > 0" . " ORDER BY placement"); $scoringRs = $r->fetchAll(PDO::FETCH_ASSOC); $scores = array(); foreach ($scoringRs as $scoring) { $scores[] = array('placement' => $scoring['placement'], 'name' => $scoring['competitor_id'] ? $competitorNames[$scoring['competitor_id']] : $groupNames[$scoring['group_id']], 'score1' => $scoring['score_0'], 'score2' => $scoring['score_1'], 'score3' => $scoring['score_2'], 'score4' => $scoring['score_3'], 'score5' => $scoring['score_4'], 'score6' => $scoring['score_5'], 'time' => $scoring['time_text'], 'timeDeduction' => $scoring['time_deduction'], 'otherDeduction' => $scoring['other_deduction'], 'finalScore' => $scoring['final_score']); } $buffer = array(); getEventHtml($buffer, $eventCode, $eventName, 'style.css', $scores); $handle = fopen("output/{$eventCode}.html", 'w'); fwrite($handle, implode("\n", $buffer)); fclose($handle); print "generated: {$eventCode}<br />"; } // Create index file $buffer = array(); $buffer[] = <<<EOD <html> <head> </head> <body> <h1>Event Results</h1> EOD; foreach ($events as $event) {