<?
session_start();

/***********************************************************
* Filename: student.php
* Purpose: display students page
* Version: 1.0
* Date: 12/8/2001
************************************************************/
if ($userType != 's')
	header("Location: logout.php");	
?>

<html>
<Title>
GPA Student Page
</Title>
<body>

<?
require("DB.php");

$rID = $username;

$db = new DB ("andromeda", "gradinfo");
$db -> connect();

$stu = $db->getStudent($rID);
$db -> disconnect();
?>
<BODY BACKGROUND = "UNR_Seal.gif">

<img src = "UNR_Logo.gif" align = center>

<br><br><br>
<p><H1> GPA Student Page </H1>

<br>

<center><FONT SIZE = "5">
<? echo $stu->name->firstName; echo " ";?>
<? echo $stu->name->lastName; ?> 
</FONT></center>
<br>
<center><FONT SIZE = "5">
<? echo $rID ?> 
</FONT></center>


<center>
<br><br><br>
<table border = 1>
<p><FONT SIZE = "4"> <tr><td>Student Progress: </td></FONT>
</table>
<table border = 1>
<FONT SIZE = "3">
<tr><td>Course</td><td>Grade</td><td>Semester</td><td>Status</td><td>Type</td><br> 

<?
foreach ($stu->list_of_courses as $unrCourse)
	{
	echo "<tr><td>".$unrCourse->course."</td>";
	echo "<td>".$unrCourse->grade."</td>";
	echo "<td>".$unrCourse->semester."</td>";
	echo "<td>".$unrCourse->courseStatus."</td>";
	echo "<td>".$unrCourse->type."</td><br>";       
	} 
?>  
</FONT>
</table>
	

<br><br><br>
<form action="logout.php">
<FONT SIZE = "4">
<center><input type="submit" name="Logout" value="Logout"></center>
</FONT>
</form>

<img src = "UNR_Wolf.gif" align = left>
</center>
<html>
