<?php
/* Written by: Adam Modlin
Written for: CS1502: Dr. Ramirez
Written on: 3/1/08
*/
//Start the session
session_start();
//Include all relevant functions
include("functions.php");
//echo "<html><head>";
if (isset($_GET["logout"]))
{
if (strcmp($_GET["logout"], "yes"))
{
session_destroy();
}
}
if (isset($_POST["studCourse"]) || isset($_GET["studHome"]))
{
if (isset($_GET["studHome"]))
{
if (strcmp($_GET["studHome"], "yes") == 0)
{
displayStudCourseInfo();
}
}
else
{
displayStudCourseInfo();
}
}
//Check to see if a username has been submitted
elseif (isset($_POST["user"]))
{
//Forgot password was checked
if (isset($_POST["forgotPW"]))
{
forgotPassword();
}
else
{
authenticate();
}
}
//First time visiting the site
else
{
echo "<html><head><title>Welcome</title></head><body>";
displayLogin();
echo "</body></html>";
}
//echo "</body></html>";
?>