Please indicate: "'.$strFieldName.'"';
}elseif(strlen($strInput)>$intMaxLength){
return '
"'.$strFieldName.'" field is too long. (max '.$intMaxLength.' characters)';
}else{
return '';
}
}
function strip_magic_slashes($str){
//added this function as a workaround to the php magic quotes thing
return get_magic_quotes_gpc() ? stripslashes($str) : $str;
}
//sendEmail function abbreviated
function sendEmail($to,$from)
{
$mail = new PHPMailer();
$mail->From = $from;
// $mail->FromName = $fromName;
//$mail->Host = "mail-relay.tru.ca";
//$mail->Host = SMTPSERVER;
$mail->Host = 'mail-relay.tru.ca';
// $mail->Subject = $subject;
$mail->Mailer = "smtp";
// $mail->Body = $body;
$mail->AddAddress($to);
if(!$mail->Send())
{
return 0;
}
return 1;
}
//clean data in _REQUEST
$dataFilter = new InputFilter($tags, $attr, $tag_method, $attr_method, $xss_auto);
$_POST = $dataFilter->process($_POST);
//declare variables
$error_msg = "";
$btnSubmit = isset($_POST['btnSubmit']) ? trim($_POST['btnSubmit']) : "";
$form_email = isset($_POST["form_email"]) ? trim($_POST['form_email']) : "";
$listtype1 = isset($_POST["listtype1"]) ? trim($_POST['listtype1']) : "";
$listtype2 = isset($_POST["listtype2"]) ? trim($_POST['listtype2']) : "";
$listtype3 = isset($_POST["listtype3"]) ? trim($_POST['listtype3']) : "";
$listtype4 = isset($_POST["listtype4"]) ? trim($_POST['listtype4']) : "";
$listtype5 = isset($_POST["listtype5"]) ? trim($_POST['listtype5']) : "";
$form_action = isset($_POST["form_action"]) ? trim($_POST['form_action']) : "";
?>