<?

/*****************************************************************
* filename: facultyReport.php
* Purpose: for a faculty to report grades
* Version information 1.0
* Date: December 4,2001
******************************************************************/


session_start();

if(($userType!='f')&&($userType!='v'))
 header("Location: logout.php");
?>

<HTML>
<HEAD>
<TITLE> Faculty Report Scores </TITLE>
</HEAD>

<BODY BACKGROUND="UNR_Seal.gif">
<CENTER><img src="UNR_Logo.gif">  </CENTER>

<CENTER>
<H2> Report Student Scores</H2>
<STRONG><B>to <BR><BR>Management Assistant<BR></STRONG><BR></CENTER>
<FORM METHOD=POST ACTION="<?php echo($PHP_SELF) ?>">
<TABLE WIDTH=100%>
<TR><TD ALIGN="RIGHT" WIDTH="30%">
<B> From:</B></TD>
    <TD WIDTH="70%"><INPUT NAME="name" SIZE="30" MAXLENGTH="30"></TD></TR>
<TR><TD ALIGN="RIGHT"><B>Sender's Email:</B></TD>
    <TD><INPUT NAME="fromEmail" SIZE="30" MAXLENGTH="30"></TD></TR>
<TR><TD ALIGN="RIGHT"><B>Reciever's Address: </B></TD>
    <TD><INPUT NAME="address" SIZE="30" MAXLENGTH="30"></TD></TR>
<TR><TD ALIGN="RIGHT"><B>cc:</B></TD>
    <TD><INPUT  NAME="cc" SIZE="30" MAXLENGTH="30"></TD></TR>
<TR><TD ALIGN="RIGHT"><B> Subject: </B></TD>
    <TD><INPUT NAME="subject" SIZE="50" MAXLENGTH="50"></TD></TR>
<TR><TD ALIGN="RIGHT"><B>Messages:</B></TD>
    <TD><TEXTAREA ROWS="15" COLS="50" NAME="message"></TEXTAREA></TD></TR>
<TR><TD COLSPAN=3 ALIGN="CENTER">
    <INPUT NAME="submit" TYPE="submit" VALUE="Send Report"></TD></TR>
</TABLE></FORM>

<HR>

<FORM ACTION="facultyView.php" METHOD=POST>
<CENTER><INPUT TYPE="SUBMIT" VALUE="Back to Viewing Student Info"></CENTER>

<FORM ACTION="faculty.php" METHOD=POST>
<CENTER><INPUT TYPE="SUBMIT" VALUE="Back to Faculty GPA"></CENTER>
</form>
<FORM ACTION="logout.php" METHOD=POST>
<CENTER><INPUT TYPE="SUBMIT" VALUE="Log Out of GPA"></CENTER>
</form>
<?
if ($submit) {
$headers="From: $name";
$headers.="<"."$fromEmail".">\n";
$headers.="Cc: $cc\n";
$sent=mail($address,$subject,$message,$headers);
if ($sent){
echo "<CENTER>Success in Sending</CENTER><BR>";
} else {
echo "<BR><P><CENTER> Fail to Send the Email </CENTER></P><BR>";
}
}
?>
<img src="UNR_Wolf.gif" align=left>
</BODY>
</HTML>
