<?
require_once("func_proc.php");
do_header("Processing Email Sent");
/*if(!$Full_Name) {
$statusMessage = "<font color=#FF0000>Error: Enter Full Name.</font><br>";
echo "<script>";
echo "parent.document.getElementById('result').innerHTML = '".$statusMessage."';";
echo "</script>";
exit;
}
if(!$Company_Name) {
$statusMessage = "<font color=#FF0000>Error: Enter Company Name.</font><br>";
echo "<script>";
echo "parent.document.getElementById('result').innerHTML = '".$statusMessage."';";
echo "</script>";
exit;
}
if(!$Email) {
$statusMessage = "<font color=#FF0000>Error: Enter Email Address.</font><br>";
echo "<script>";
echo "parent.document.getElementById('result').innerHTML = '".$statusMessage."';";
echo "</script>";
exit;
}
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email)) {
$statusMessage = "<font color=#FF0000>Error: Invalid Email Address.</font><br>";
echo "<script>";
echo "parent.document.getElementById('result').innerHTML = '".$statusMessage."';";
echo "</script>";
exit;
}
if(!$Phone_Number) {
$statusMessage = "<font color=#FF0000>Error: Enter Phone Number.</font><br>";
echo "<script>";
echo "parent.document.getElementById('result').innerHTML = '".$statusMessage."';";
echo "</script>";
exit;
}
if(!$Location) {
$statusMessage = "<font color=#FF0000>Error: Enter Location.</font><br>";
echo "<script>";
echo "parent.document.getElementById('result').innerHTML = '".$statusMessage."';";
echo "</script>";
exit;
}
if(!$Enquiry) {
$statusMessage = "<font color=#FF0000>Error: Enter Inquiry.</font><br>";
echo "<script>";
echo "parent.document.getElementById('result').innerHTML = '".$statusMessage."';";
echo "</script>";
exit;
}*/
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$Email."\r\n";
$to = "".$contact_email."";
$subject = "Sample Co. Recruitment Agency & Manpower Corporation Contact Us";
$body = "<html>
<body>
<table width='97%' cellpadding='0' cellspacing='0' border='0' style='border-style:none' bgcolor=#FFFFFF>
<tr>
<td align=center valign=middle class=box><br />
<span class=style10>Sample Co. Recruitment Agency & Manpower Corporation Contact Us Form </span>
<table border='0' cellpadding='0' cellspacing='0' style=border-collapse:collapse>
<tr>
<td height='15' colspan='3'></td>
</tr>
<tr>
<td height='22' align=left><strong>Full Name</strong></td>
<td align=center><strong>:</strong></td>
<td align=left>".$Full_Name."</td>
</tr>
<tr>
<td height='22' valign=top align=left><strong>Company Name</strong></td>
<td align=left valign=top><strong>:</strong></td>
<td align=left>".$Company_Name."</td>
</tr>
<tr>
<td height='22' align=left><strong>Industry</strong></td>
<td align=left><strong>:</strong></td>
<td align=left>".$Industry."</td>
</tr>
<tr>
<td height='22' align=left><strong>Email</strong></td>
<td align=center><strong>:</strong></td>
<td align=left>".$Email."</td>
</tr>
<tr>
<td height='22' align=left><strong>Phone Number</strong></td>
<td align=center><strong>:</strong></td>
<td align=left>".$Phone_Number."</td>
</tr>
<tr>
<td height='22' align=left><strong>Location</strong></td>
<td align=center><strong>:</strong></td>
<td align=left>".$Location."</td>
</tr>
<tr>
<td height='22' align=left><strong>Enquiry</strong></td>
<td align=center><strong>:</strong></td>
<td align=left>".$Enquiry."</td>
</tr>
<tr>
<td height='15' colspan='3'></td>
</tr>
</table>
</tr>
</table>
</body>
</html>";
if (mail($to, $subject, $body, $headers)) {
$statusMessage = "Request Successfully sent!";
} else {
$statusMessage = "<font color=#FF0000>Error: Request could not be sent!</font>";
}
?>
<script>
//parent.document.getElementById('result').innerHTML = '<? echo $statusMessage ?>';
</script>
<table width="585" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="585" height="170" align="right" valign="top">
<table width="100%" height="159" border="0" align="center" cellpadding="0" cellspacing="0" background="images/iris_main_bgleft.gif" style="background-repeat:no-repeat">
<tr>
<td width="585" height="170" valign="top" style="padding-left:25px; padding-right:20px; padding-top:15px">
<p align="left"><span class="style3">CONTACT</span> <span class="style5"> US</span></p>
<div id="tower_2">
<p align="left"><?=$statusMessage?></p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?
do_rightContent();
do_footer();
?>
<script>
setTimeout("window.location='<?=$_SERVER['HTTP_REFERER']?>'",1250);
</script>