?> <div class="wrapper content"> <div class="row"> <div 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> </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 session_start(); require_once "../../inc/config.php"; require_once ROOT_PATH . "inc/database.php"; include ROOT_PATH . "inc/header.php"; if (empty($_GET["event_id"]) || $_GET["event_id"] < 1 || getEvent($_GET["event_id"]) == false) { header("Location:/admin/events/"); } $event = getEvent(intval($_GET["event_id"])); $users = getEventUsers($event["event_id"]); $admin = getUser($_SESSION["user_id"]); $name = $event["name"]; $desc = preg_replace('/\\<br(\\s*)?\\/?\\>/i', "\n", $event["description"]); $date = $event["event_date"]; $start = $event["start_time"]; $end = $event["end_time"]; $member_price = $event["member_price"]; $nonmember_price = $event["nonmember_price"]; if ($event["max_attendees"] == 0) { $max = ""; } else { $max = $event["max_attendees"]; } if ($_SERVER["REQUEST_METHOD"] == "POST") { // process the event change if (password_verify($_POST["admin-password"], $admin["password"])) { if ($_POST["action"] == "delete") { $registrations = deleteEvent($event["event_id"]); foreach ($registrations as $registration) { // refund the charge