\nPlease fill out all required fields.";
if ("$comments" == "")
$kMessageClass = 'class="fixthis"';
if ("$_POST[email]" == "")
$kEmailClass = 'class="fixthis"';
if ("$_POST[realname]" == "")
$kNameClass = 'class="fixthis"';
if ("$_POST[captcha]" == "" && $needCaptcha)
$kCaptchaClass = 'fixthis';
}
elseif (!preg_match("/^[^@]+@([\w\d\-]+\.)+[\w\d]+$/", "$_POST[email]"))
{
echo "
\nPlease correct your email address.";
$kEmailClass = 'class="fixthis"';
}
elseif ($needCaptcha && "$_POST[captcha]" != "$captchaTest")
{
echo "
\nPlease fill out the correct value in the final field (hint: your phone likely has a calculator on it).";
$kCaptchaClass = 'fixthis';
}
else if (!$needCaptcha)
{
echo "
\nPlease fill out the final field.";
$needCaptcha = true;
$trio = randomTrio();
list($captchaA, $captchaB) = abValuesForTrio($trio);
$kCaptchaClass = 'fixthis';
}
else if (preg_match("/http:/", "$comments"))
{
echo "Sorry, your request to send email has been denied.";
}
else
{
require_once(dirname(__FILE__)."/../php/sendmail.php");
$posted_form_fields = join(' ', array_keys($_POST));
$agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '(no user agent set!)';
$ff_info = "[Software contact form fields posted: $posted_form_fields (normal ones are: creq realname email recipient subject Comments captcha)\nUser agent: $agent]\n\n";
$result = SendEmail($_POST['email'], $_POST['realname'], $_POST['recipient'], "Dan Wright", "banasmoo.com comment form: $subject", $ff_info.$comments, true);
$className = ("0" == $result) ? "success" : "failure";
echo "
include "../php/smoott/footer.php"; ?>
\n";
if ($result == 0 && strlen($result) < 2)
{
echo "Your message has been sent! Thank-you.";
$comments = ""; // do not include comments in form -- they may hit Send again and again!
$subject = "";
if ($needCaptcha) {
// Generate a new captcha so they can't cache the page and resubmit.
$trio = randomTrio();
list($captchaA, $captchaB) = abValuesForTrio($trio);
}
}
else if ($result == -1)
echo "Sorry, your request to send email has been denied.";
else if ($result == -2)
{ ?>Sorry, your recipient is not recognized or has not been approved. Please contact the webmaster. }
else
{
?>Sorry, something didn't work right. Want to try again?
if ($result == 554) { $kEmailClass = 'class="fixthis"'; ?>Please verify your email address.
} ?> The status code was echo "$result"; ?>. if (!$needCaptcha) { $trio = randomTrio(); list($captchaA, $captchaB) = abValuesForTrio($trio); } $needCaptcha = true; } } echo "\n
\n";
}
?>
if ($result == 554) { $kEmailClass = 'class="fixthis"'; ?>Please verify your email address.
} ?> The status code was echo "$result"; ?>. if (!$needCaptcha) { $trio = randomTrio(); list($captchaA, $captchaB) = abValuesForTrio($trio); } $needCaptcha = true; } } echo "\n
Fill out this form to send email to the banasmoo support team. We'll normally get back to you within a day or two.