";
}
if ($use_security_image && $security_code != $_SESSION['contact_form_security_code'] ) {
$errors.="The verification code for the image presented was incorrect. Please enter a correct verification code.
";
}
if ($message_body == '')
$errors.="Please enter a message
";
if ($message_subject == '')
$errors.="Please enter a message subject
";
if ($visitor_name == '')
$errors.="Please enter your name
";
if ( !$errors ) {
$ip = $_SERVER["REMOTE_ADDR"];
$httpagent = $_SERVER["HTTP_USER_AGENT"];
$time = date("D, F j, Y H:i O");
if ($visitor_name)
$visitor_name_and_email="$visitor_name <$visitor_email>";
else
$visitor_name_and_email="$visitor_email";
if ($contact_from_name)
$contact_from_email="$contact_from_name <$contact_from_email>";
$message = "
$message_body
____________________________
Browser Info: $ip $httpagent
";
if ($send_from_internal_address) {
$message= "
From: $visitor_name_and_email
Date: $time
Subject: $message_subject
".$message;
}
if ($send_from_internal_address) {
mail($contact_to_email, $contact_subject." $message_subject", $message, "From: $contact_from_email\r\nReply-To: $visitor_name_and_email");
}
else {
mail($contact_to_email, $contact_subject." $message_subject", $message, "From: $visitor_name_and_email");
}
echo "";
echo " From: ".htmlentities($visitor_name_and_email)." Re: ".htmlentities($message_subject)." ".htmlentities($message_body)." ";
echo "Your message has been sent. Thank you for contacting us.";
$message_sent=true;
}
}
if (!$message_sent) {
$this_file = substr(strrchr($_SERVER['PHP_SELF'], "/"), 1);
?>
|