<?
/*****************************************************************
* filename: facultyClass.php
* Purpose: send an email to assistant about an applicant's status
* Version information 1.0
* Date: December 4,2001
******************************************************************/

session_start();
if($userType!='d')
 header("Location: logout.php");

?>

<HTML>
<HEAD>
<TITLE> Send Admission/Rejection Letter</TITLE>
</HEAD>

<BODY BACKGROUND="UNR_Seal.gif">
<CENTER><img src="UNR_Logo.gif">  </CENTER>
<CENTER>
<H2> An Email to Management Assistant</H2>
<B>of Applicants' Admission/Rejection<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" VALUE="Graduate Director" SIZE="30" MAXLENGTH="30"></TD></TR>
<TR><TD ALIGN="RIGHT">Director's Email:</TD>
    <TD><INPUT NAME="fromEmail" SIZE="30" MAXLENGTH="30"></TD></TR>
<TR><TD ALIGN="RIGHT">Assistant's Address: </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" VALUE="Admission/Rejection Notifications to Applicants" 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 Notification"></TD></TR>
</TABLE></FORM>

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

<FORM ACTION="directorEvaluate.php" METHOD=POST>
<CENTER><INPUT TYPE="SUBMIT" VALUE="Back to Evaluating Application"></CENTER></FORM>

<FORM ACTION="director.php" METHOD=POST>
<CENTER><INPUT TYPE="SUBMIT" VALUE="Back to Director 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>
