$referers = array ('ecosmartinc.com','www.ecosmartinc.com','208.179.130.93 1');
function check_referer($referers)
{if (count($referers)){
$found = false;
$temp = explode("/",getenv("HTTP_REFERER"));
$referer = $temp[2];
if ($referer==""){
$referer = $_SERVER['HTTP_REFERER'];
list($remove,$stuff)=split('//',$referer,2);
list($home,$stuff)=split('/',$stuff,2);
$referer = $home;
}
for ($x=0; $x < count($referers); $x++){
if (eregi ($referers[$x], $referer)){
$found = true;
}
}
if ($referer ==""){
$found = false;
}
if (!$found){
echo("You are coming from an unauthorized domain.");
exit();
}
return $found;
}else{
return true;
}
}
if (!check_referer($referers))
{
}
?>
Eco-$mart Product Inventory
Product Inventory
Confirm Shipment Report
$reportemail = $_POST['reportemail'];
$prodname = $_POST['prodname'];
$prodnum = $_POST['prodnum'];
$city = $_POST['city'];
$state = $_POST['state'];
$oldstock = $_POST['oldstock'];
$stock = $_POST['stock'];
$pswinv = $_POST['pswinv'];
$shipdate = $_POST['shipdate'];
$shipdateex = explode('-',$shipdate);
$last_date = $shipdateex[2].$shipdateex[0].$shipdateex[1];
$mail_date = $shipdateex[0].'-'.$shipdateex[1].'-'.$shipdateex[2];
$to = "$reportemail" . ",";
$to .= "kwgrubbs@kwgrubbs.com";
$subject = "Ecosmartinc.com Administration - Inventory at $city, $state has changed";
$message = "From Ecosmartinc.com Administration" .
"\r\n" .
"This is to notify you that the Inventory at $city, $state has changed." .
"\r\n" .
"Product: $prodname" .
"\n" .
"Item Number: $prodnum" .
"\n" .
"Previous Amount in Stock: $oldstock" .
"\n" .
"Current Amount in Stock: $stock" .
"\r\n" .
"Date of Shipment: $mail_date" .
"\n" .
"P.O. Number: $ponum" .
"\r\n" .
"Please adjust your records accordingly." .
"\r\n" .
"This email notification is automatically sent whenever an update is made to the Eco-$mart On-line Inventory Control." .
"\n";
$ok3 = mail($to, $subject, $message, "From: admin@ecosmartinc.com");
if ($ok3) {
echo("
Update Confirmed, Notification Sent.
");
} else {
echo("
Error Confirming Update!
" .
"Error: " . mysql_error() . "
");
}
?>
©2005 - Data Base Interface - Custom Built at:
|