<?
include("global.inc.php");
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','staff');
pt_register('POST','cnum');
pt_register('POST','boss');
pt_register('POST','jury');
pt_register('POST','rate');
pt_register('POST','comments');
$comments=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $comments);if($staff=="" || $cnum=="" || $boss=="" ){
$errors=1;
$error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="Prepared By: ".$staff."
Case No.: ".$cnum."
Boss: ".$boss."
Jury: ".$jury."
Rate: ".$rate."
Comments: ".$comments."
";
mail("me@here.com","Memo - $cnum",$message,"From: $staff");
$link = mysql_connect("blah","blah","blah");
mysql_select_db("memos",$link);
$query="insert into conflicts (staff,cnum,boss,jury,rate,comments) values ('".$staff."','".$cnum."','".$boss."','".$jury."','".$rate."','".$comments."')";
mysql_query($query);
}
?>
<HTML>
<HEAD><TITLE>Memo Confirmation</TITLE></HEAD>
<link rel="stylesheet" href="style.css" >
<BODY>
<? $time = date("H:i"); ?><? $date = date("n/d/y"); ?>
<font face="century gothic,tahoma,verdana" color="#000000" size="5">
MEMO SENT SUCCESSFULLY...</font><br><br>
<font face="century gothic,tahoma,verdana" color="#000000" size="3">
Thanks <? echo "$staff"; ?>. The conflict check re: <? echo "$cnum"; ?> was sent successfully on <? echo "$date"; ?> at <? echo "$time"; ?>.
<br><br>If you need to create a new conflict check, hit the back button to return to the previous
form and hit the 'reset form' button.
<br><br>Click <a href="mailto:me@here.com">here</a> to e-mail any questions or problems you have.<br><br>
</font>
</BODY>
</HTML>