if (!isset($_GET["who"]) && !isset($_POST["who"])) { ?> exit(); // $who = 1; } else { function obfuscate($mail) { //-------===============----------- $thisCount = ceil(strlen($mail)/4); $a = array(); $thisEmail = ""; return($thisEmail); } if (isset($_POST["check"])) $check = $_POST["check"]; else $check = 0; if (isset($_GET["who"])) $who = $_GET["who"]; else $who = $_POST["who"]; switch($who) { case "1" : $whois = "mms.pm@skynet.be"; break; case "2" : $whois = "pamela.ayshford@ntlworld.com"; break; case "3" : $whois = "peterhore@btinternet.com"; break; } require("common.php"); } if (isset($_POST["stage"])) { $stage = $_POST["stage"]; } else { $stage = 0; } if (isset($_POST["email"])) { $email = $_POST["email"]; } else { $email = ""; } if (isset($_POST["subject"])) { $subject = $_POST["subject"]; } else { $subject = ""; } if (isset($_POST["text"])) { $text = $_POST["text"]; } else { $text = ""; } $msg1 = ""; $msg2 = ""; $msg3 = ""; ?>
if ($stage == 1) { if ($email == "") { $msg1 = "The email address is empty"; } elseif (!validate_email($email)) { $msg1 = "The syntax of the email address is not correct"; } if ($subject == "") { $msg2 = "The subject line is empty"; } if ($text == "") { $msg3 = "The text is empty"; } if (($msg1 == "") && ($msg2 == "") && ($msg3 == "") && ($check == 1)) { $stage = 2; } } if ($stage == 2) { $result = dbQuery("INSERT INTO emails (email, subject, txt, for_who) VALUES('$email', '$subject', '$text', '$whois')"); $mailTo = $whois; $subjects = "Age of Nelson: " . $subject; $mailHeader = "From: $email\nContent-Transfer-Encoding: 8bit\nContent-type:text/plain"; if (mail($mailTo, $subjects, $text, $mailHeader)) { echo(' Your email was sent. Thank you for your interest for the Age of Nelson. '); //send a copy to moi $mailTo = "mms.pm@skynet.be"; $subjects = $subjects . " " . $mailTo; $mailTo = mail($mailTo, $subjects, $text, $mailHeader); $subject = addslashes($subject); $text = addslashes($text); } else { $mailTo = obfuscate("mms.pm@skynet.be"); ?>Due to an error, your email was not sent. Please contact us at webmaster. } } else { ?>You want to ask a question or more information? You want to submit information or an article? Do not use this form to order books or CDs, use our secure server! Due to the spammers unrelenting stupidity, I have added a CAPTCHA. Sorry for the inconvenience. } ?> | |
homeCreative Multimedia Communication |