rendered paste body<?phpif(isset($_GET['keywords'])){ $keywords = $_GET['keywords'];}else if(isset($_POST['keywords'])){ $keywords = $_POST['keywords'];}if(isset($_GET['src']) and is_numeric($_GET['src'])){ $src = $_GET['src'];}else if(isset($_POST['src']) and is_numeric($_POST['src'])){ $src = $_POST['src'];}if($src == '1'){ $source = 'Google';}elseif($src == '2'){ $source = 'Business.com';}else $source = 'From Site';//////////////////////////////////////////if(isset($_GET['pg']) and is_numeric($_GET['pg'])){ $pg = $_GET['pg'];}else if(isset($_POST['pg']) and is_numeric($_POST['pg'])){ $pg = $_POST['pg'];}if($pg == '1'){ $page = "attrition"; $tpl = "attrition.tpl";}elseif($pg == '2'){ $page = "profitability"; $tpl = "profitability.tpl";}elseif($pg == '3'){ $page = "segmentation"; $tpl = "segmentation.tpl";}elseif($pg == '4'){ $page = "onboarding"; $tpl = "onboarding.tpl";}else{ $page = "direct"; $tpl = "direct_whitepapers.tpl";}require_once('conf/config_local.php');require_once($application_path.'conf/config.php');$smarty->assign('thisScript',$_SERVER['PHP_SELF']);if($_SERVER['REQUEST_METHOD'] == 'POST'){ $req = false; $emailParts = explode("@",$_POST['email']); $domain = $emailParts[1]; $banned = array('gmail.com','yahoo.com','aol.com','hotmail.com'); if(empty($_POST['first_name']) || is_numeric($_POST['first_name'])) { $smarty->assign('first_name_required',true); $req = true; $firstFlag = 1; } if(empty($_POST['last_name']) || strlen($_POST['last_name']) < 2 || is_numeric($_POST['last_name'])) { $smarty->assign('last_name_required',true); $req = true; $lastFlag = 1; } if(empty($_POST['company'])) { $smarty->assign('company_required',true); $req = true; $companyFlag = 1; } if(empty($_POST['address1']) || !preg_match("/^[a-zA-Z\d]+(([\'\,\.\- #][a-zA-Z\d ])?[a-zA-Z\d]*[\.]*)*$/", $_POST['address1'])) { $smarty->assign('address1_required',true); $req = true; $addressFlag = 1; } if(empty($_POST['city'])) { $smarty->assign('city_required',true); $req = true; $cityFlag = 1; } if(empty($_POST['state'])) { $smarty->assign('state_required',true); $req = true; $stateFlag = 1; } if(empty($_POST['zip']) || !preg_match("/^([0-9]{5})([\-]{1}[0-9]{4})?$/", $_POST['zip'])) { $smarty->assign('zip_required',true); $req = true; $zipFlag = 1; } if(empty($_POST['email']) || !preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9._-]+)+$/", $_POST['email']) || in_array($domain,$banned)) { $smarty->assign('email_required',true); $req = true; $emailFlag = 1; } if(empty($_POST['phone']) || !eregi("^([0-9 .-]+)$", $_POST['phone']) || strlen($_POST['phone']) < 7) { $smarty->assign('phone_required',true); $req = true; $phoneFlag = 1; } if($req == true) { $smarty->assign('keywords',$keywords); $smarty->assign('pg',$pg); $smarty->assign('src',$src); $smarty->assign('req',$req); $smarty->assign('data',$_POST); $smarty->assign('phoneFlag',$phoneFlag); $smarty->assign('emailFlag',$emailFlag); $smarty->assign('zipFlag',$zipFlag); $smarty->assign('stateFlag',$stateFlag); $smarty->assign('cityFlag',$cityFlag); $smarty->assign('addressFlag',$addressFlag); $smarty->assign('companyFlag',$companyFlag); $smarty->assign('lastFlag',$lastFlag); $smarty->assign('firstFlag',$firstFlag); $smarty->display($tpl); } else { $smarty->assign('conversion_tracking','1062532129'); $smarty->assign('keywords',$keywords); $smarty->assign('wp',$page); $smarty->assign('data',$_POST); $smarty->assign('source',$source); $smarty->assign('pg',$pg); $smarty->assign('src',$src); //mail("aisler@pntmarketingservices.com,tcoretto@pntmarketingservices.com",$page,$smarty->fetch('whitepapers_email.tpl')); mail("registrations@pntmarketingservices.com, nrgetik@gmail.com, aei4@columbia.edu",$page,$smarty->fetch('whitepapers_email.tpl'),"From: whitepapers@pntmarketingservices.com"); $smarty->display('whitepapers_dl.tpl'); }}else{ $smarty->assign('keywords',$keywords); $smarty->assign('pg',$pg); $smarty->assign('src',$src); $smarty->display($tpl);}?>