include("../Scripts/badwords.php");
require("../Scripts/email_validation.php");
$validator = new email_validation_class;
$validator->timeout=10;
$validator->data_timeout=0;
$validator->localuser="kieran";
$validator->localhost="linuxbox.co.nz";
$validator->debug=0;
$validator->html_debug=0;
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
if (!isset($_REQUEST['email'])) {
?>
}
elseif (empty($name)) {
// header( "Expires: Mon, 1 Jan 2004 12:00:00 GMT" );
// header( "Last-Modified: " . gmdate("D, d M Y H:i ") . " GMT" );
// header( "Cache-Control: no-cache, must-revalidate" );
// header( "Pragma: no-cache" );
?>
No Name
Error
Oops, it appears you forgot to enter your Runescape name. Please enter your infomation in again.
|
}
elseif (empty($email)) {
// header( "Expires: Mon, 1 Jan 2004 12:00:00 GMT" );
// header( "Last-Modified: " . gmdate("D, d M Y H:i ") . " GMT" );
// header( "Cache-Control: no-cache, must-revalidate" );
// header( "Pragma: no-cache" );
?>
No Email
Error
Oops, it appears you forgot to enter your email. Please enter your infomation in again.
|
}
elseif (empty($subject)) {
// header( "Expires: Mon, 1 Jan 2004 12:00:00 GMT" );
// header( "Last-Modified: " . gmdate("D, d M Y H:i ") . " GMT" );
// header( "Cache-Control: no-cache, must-revalidate" );
// header( "Pragma: no-cache" );
?>
No Subject
Error
Oops, it appears you forgot to enter your subject. Please enter your infomation in again.
|
}
elseif (empty($message)) {
// header( "Expires: Mon, 1 Jan 2004 12:00:00 GMT" );
// header( "Last-Modified: " . gmdate("D, d M Y H:i ") . " GMT" );
// header( "Cache-Control: no-cache, must-revalidate" );
// header( "Pragma: no-cache" );
?>
No Message
Error
Oops, it appears you forgot to enter your message. Please enter your infomation in again.
|
}
elseif (!$validator->ValidateEmailBox($email)) {
?>
Invalid Email
Error
Sorry, invalid email address. Please press back and try again.
|
} else {
//echo date ("l dS of F Y h:i A");
$date = date ("l dS of F Y h:i A");
$bettermessage = "Name: $name \n Date: $date \n Subject: $subject \n Message: $message";
$badword = new badword();
$cleanmessage = $badword->word_fliter($bettermessage);
mail( "kieran.p@inspire.net.nz", "Runescape Fan Site Mail",
$cleanmessage, "From: $email" );
header( "Location: thanks.php?name=$name" );
}
?>