<?php
include_once("../../php/common_functions.php"); //common functions in the course registartion system
include_once("../../php/config.php"); //holds global config variables
check_if_authenticated('user');//check if user is logged in
$page_title = "Your Courses";
include("../../php/top.php"); //the HTML that outlines the top of the page
?>
<article class="ces-wide">
<div class="ces-sessions-header">
<?php include("../../menu.php"); ?>
<h2>Your Courses<br>
<small class="ces-sub-heading grey">All sessions are offered at no cost.</small>
</h2>
<h3>Current Courses</h3>
<p><strong>Please Note:</strong> You are registered in the following courses.</p>
</div>
<?php
//open connection to database
$db = mysqli_connect($mysql_server, $user, $pass, $database);
output_registered_sessions($_SESSION['userid']); //show all courses user is registered in
?>
<h3>Past Courses</h3>
<?php output_past_registered_sessions($_SESSION['userid']); //show all courses user is registered in?>
</article>
</section><!-- #middle-->
</div><!-- #wrapper -->
<?php require_once $_SERVER['DOCUMENT_ROOT'].'/require/footer.php';?>