.html The prime copy of this script lives on vds12 in /clients/common/encore. Please do not make any changes to this script in any other location as they will be overwritten when a new deployment occurs. After updating, use /home/kristin/encore-deploy.sh to deploy the code across all of the servers. When a new server is added, add it to the encore-deploy.sh script. ***********************************************************************************/ $Root = $_SERVER['DOCUMENT_ROOT']; // get the form type from the filename. preg_match('/form\-([a-zA-Z0-9-]*)\.html/',$_SERVER['PHP_SELF'],$matches); $ftype = $matches[1]; $useCaptcha = true; if ($_SERVER['REQUEST_METHOD'] == 'POST') { $ipAction=''; foreach($_POST as $type=>$value) { if (stristr($value, 'first page of Google') || stristr($value, '1st page of Google') || stristr($value, 'We help our clients get') || stristr($value, 'BackPage Ads') || stristr($value, 'Ads Posting') || stristr($value, 'yourmail@gmail.com') || stristr($value, 'POSTING SOFTWARE') || stristr($value, 'top of the search') || stristr($value, 'increase fans') || stristr($value, 'increase likes') || stristr($value, 'increase followers') || stristr($value, 'increase rankings') ) $ipAction = 'thanks'; } if ($ipAction=='') { if (!isset($_POST['g-recaptcha-response']) || $_POST['g-recaptcha-response']=='') { $arBlockedIPs=array('');$arWhiteList=array(''); // pull in any ip block/allow lists if (is_file('ip-arrays.php')) include('ip-arrays.php'); // for client-wide if (is_file('ip-arrays-'.$ftype.'.php')) include('ip-arrays-'.$ftype.'.php'); // for form-specific if (!is_callable('vdsFirstCheckIP')) include('/clients/common/docs/inc/code/ip-checkers.php'); $ipAction = vdsFirstCheckIP($arBlockedIPs,$arWhiteList); } } // for a while, we pretend the form got submitted if ($ipAction == 'thanks') { header('Location: thanks-'.$ftype.'.html'); exit(); } // we can also pretend a denial of service is occurring (specific to that IP) if ($ipAction == 'denial') { header('HTTP/1.0 503 Service Unavailable'); exit(); } } if (!is_callable('vdsRecordIP')) include('/clients/common/docs/inc/code/ip-checkers.php'); $numAttempts = vdsNumAttemptsForIP(); if ($numAttempts>2) $useCaptcha = true; if (!is_callable('vdsImportRequestVariables')) include('/clients/common/docs/inc/code/variable-import.php'); vdsImportRequestVariables(1,'URL_'); // Includes the error functions error_out (email error and exit) and error_msg (email error and continue) for use in the script. if (!is_callable('error_msg')) include('/clients/common/docs/inc/code/error_handler.php'); // Includes the generic curl function for calling Smart Capture if (!is_callable('get_web_page')) include('/clients/common/docs/inc/code/curl-handler.php'); // Sanitize "ref" variable to prevent cross-site scripting if (isset($URL_ref)) $URL_ref = preg_replace('/\W/', '', $URL_ref); else $URL_ref = ''; // we use ref to store the AdTracker code, but sometimes the ref appears to have the URL of the referrer?? if (strlen($URL_ref)>3) {$URL_ref = '';$_REQUEST['ref']='';$_POST['ref']='';$_GET['ref']='';} if (!isset($URL_Email)) $URL_Email=''; if (!isset($URL_message)) $URL_message=''; if (!isset($URL_Name)) $URL_Name=''; if (!isset($URL_UN)) $URL_UN=''; if (!isset($URL_Num)) $URL_Num=''; if (!isset($URL_Avail)) $URL_Avail=''; if (!isset($URL_Stay)) $URL_Stay=''; if (!isset($URL_ET)) $URL_ET=''; if (!isset($URL_FT)) $URL_FT=''; if (!isset($URL_PID)) $URL_PID=''; // initialize variables commonly found in OLconfig.php $TEMPLATEDOCTITLE = 'doctitle'; $TEMPLATEPAGEHEADER = 'PageHeader'; $TEMPLATEHEAD = 'head'; $TEMPLATEMAINCONTENT01 = 'MainContent01'; $TEMPLATEMAINCONTENT02 = 'MainContent02'; // initialize variables which might get overwritten in preprocess- $dontSpamCheck = false; $post_ret = ''; $actionfile = 'http://smart-capture.vdsys.com/services/form-capture.php'; // initialize variables possibly set/overwritten in config- file $thanksurl = ''; $custombuttons = ''; $METATAGS = ''; $gSiteKey = ''; $gSecretKey = ''; $pageTitle = ''; $pageHeader = ''; $introText = ''; $hasupload = false; $template = ''; $formid = 0; $AccountID = 0; $navisdKW = ''; $contactblock = ''; $questionblock = ''; $custombuttons = '
Some required fields are not filled in. Please fill them in and re-submit.
'; if (isset($errorReasons)) { $reqmessage .= '(* indicates required field)
"; $reqsymbol = "*"; } if ($URL_Name=='' && $URL_UN!='') $URL_Name=$URL_UN; if ($URL_Num!='') $URL_Name = '('.$URL_Num.') '.$URL_Name; if ($URL_message!='') { $altMessage = stripslashes($URL_message); } elseif ($URL_Name!='') { $altMessage = 'I was looking at property: '.stripslashes($URL_Name); if($URL_Avail<>""){ $Avail = strftime("%m/%d/%Y",strtotime("$URL_Avail")); $altMessage .= ", arriving $Avail"; } if($URL_Stay<>""){ $altMessage .= ", staying for $URL_Stay days"; } $altMessage .= " and would like to know..."; } include_once("config-$ftype.php"); include_once("$Root/inc/OpenTemplateParser.class.php"); $page = new TemplateParser($template); if (is_array($addTemplateSection)) { foreach ($addTemplateSection as $section=>$content) { $page->setSection($section, $content); } } // if the OLconfig file contains the captcha information, include it if ($useCaptcha==true && $gSiteKey!='') $addHead .= ""; if ($TEMPLATEHEAD<>"") { if ($METATAGS<>"") $page->appendSection($TEMPLATEHEAD, $METATAGS); if (file_exists('optinform.css')) $page->appendSection($TEMPLATEHEAD,""); if (file_exists($ftype.'.css')) $page->appendSection($TEMPLATEHEAD,""); if ($addHead<>"") $page->appendSection($TEMPLATEHEAD, $addHead); } $contents = ""; $page->setTitle($pageTitle); if ($TEMPLATEPAGEHEADER<>"") $page->setSection($TEMPLATEPAGEHEADER, $pageHeader); else { $contents .= '