Legal Marketing Solutions

0) { header("HTTP/1.0 301 Moved Permanently"); header("Location: http://www.freeadvice.com/resources/marketing/legal-marketing.htm"); exit; } // include_once('_includes/_inc_analytics_codes.php'); #### XSS Security Check and SafeSQL routine #### include_once('_includes/class.inputfilter.php'); $myFilter = new InputFilter(); // Cross Site Scripting Blocker. $_POST = $myFilter->process($_POST); #### XSS Security Check and SafeSQL routine #### $ipaddress = $_SERVER['REMOTE_ADDR']; // Where the client browser is! // Get clean data $first_name = ucwords(strtolower(stripslashes(mysql_real_escape_string($_POST['first_name'])))); $last_name = ucwords(strtolower(stripslashes(mysql_real_escape_string($_POST['last_name'])))); $company = ucwords(strtolower(stripslashes(mysql_real_escape_string($_POST['company'])))); $email = stripslashes(mysql_real_escape_string($_POST['email'])); $phone = stripslashes(mysql_real_escape_string($_POST['phone'])); $city = ucwords(strtolower(stripslashes(mysql_real_escape_string($_POST['city'])))); $state = stripslashes(mysql_real_escape_string($_POST['state'])); $zip = stripslashes(mysql_real_escape_string($_POST['zip'])); $URL = stripslashes(mysql_real_escape_string($_POST['URL'])); $practice = stripslashes(mysql_real_escape_string(nl2br($_POST['practice']))); // Fix up input $URL = str_replace('http://','',$URL); // remove any if there. $lnkURL = 'http://'.$URL; // make usre it is always there. $practice = str_replace('
rn','
',$practice); // clean up the carrige returns. $referrer = $_SESSION['SITE_REFERRER']; // Form message and send it to JT. $timenow = date("F j, Y, g:i a"); $msg_data = ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= ''; $msg_data .= '
Name:'.$first_name.' '.$last_name.'
Company:'.$company.'
Email:'.$email.'
Phone:'.$phone.'
City:'.$city.'
State:'.$state.'
Zip:'.$zip.'
URL:'.$URL.'
Practice:'.$practice.'
Referrer:'.$referrer.'
'; $msg = ' FA Legal Marketing Contact
FA Legal Marketing Contact

'.stripslashes($msg_data).'

'.$timenow.'

'.$ipaddress.'

'; // Send it $sent = false; if ($email <> '') { $to = "john@adviceco.com"; // normal recipient (comma separate multiple addresses) # $to = $email; // during testing, email is sent to sender. $subject = "FA Legal Marketing Contact"; /* To send HTML mail, you can set the Content-type header. */ $mailheaders = ""; //-- initialize; $mailheaders .= "MIME-Version: 1.0n"; # $mailheaders .= "Content-type: text/plain;n"; $mailheaders .= "Content-type: text/html; charset=iso-8859-1n"; $mailheaders .= "From: $first_name $last_name<$email>n"; $mailheaders .= "Reply-to: $emailn"; # $mailheaders .= "Return-Path: apundeliverables@adviceco.comn"; # $mailheaders .= "Cc: webadmin@adviceco.comn"; // usually only on during inital use for QA purposes. # $mailheaders .= "Bcc: webadmin@adviceco.comn"; $sent = mail($to, $subject, $msg, $mailheaders, '-f apundeliverables@adviceco.com'); //echo "message = $msg, to = $to"; exit; } if ($sent) { echo ""; exit; } else { echo ""; exit; } ?>