tags*/ $title='Chile travels contact form'; /* The foLlowing title will be printed as the grey
text at the top of the webpage*/ $title2='Chile travels contact form'; /* enter the keywords for the page here; between the '' quotes These will show up in the keywords metatag.*/ $meta_keywords=''; /* here goes the description meta-tag information; between the '' guotes */ $meta_description='Chile travels contact form'; /* this is where the the page subject/title goes. (the big & fat text in the bar towards the top of the page)*/ $page_subject='Contact form'; // Now for the language setting, 'EN' for english or 'SP' for spanish $language='EN'; /* Extra is a string to add extra code or metatags to the template head content (e.g )*/ $extra=''; // The line below is the part that actually loads the top-part, menus etc. of the page, no changes necessary require($_SERVER['DOCUMENT_ROOT'].'/site_template/top.php'); function check_email_address($email) { /* check email address syntax, returns true or false ARGS: the email address to check RETURNS: true when valid or false when not */ // First, we check that there's one @ symbol, and that the lengths are right if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) return false; // email invalid because wrong number of characters in one section, or wrong number of @ symbols. // Split it into sections to make life easier $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) return false; } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } return true; } function stripNewLines($variable) { // get rid of any newlines and carriage returns in the passed string or array and replace them with a space if (!is_array($variable)) { return str_replace(array("\n","\r"),' ',$variable); } else { return array_map('stripNewLines',$variable); } } function referercheck(){ // check the referring domain eq. referercheck() to allow from the same domain as the script is running on (default) // or referercheck('chile-travel.com') for specific domains if (!isset($_SERVER['HTTP_REFERER'])) return false; $domainallowed = 'www.chile-travel.com www.chiletravelplus.com'; $referer = parse_url($_SERVER['HTTP_REFERER']); $refererhost = $referer['host']; if (stristr($domainallowed,$refererhost)) return true; return false; } include_once($_SERVER['DOCUMENT_ROOT'].'/scripts/maillist.php'); ?>
           
Please use this form to contact us or one of
our affiliated companies and businesses.
';exit; if ( $ok && ($_SERVER['REQUEST_METHOD'] == 'POST') && referercheck() ){ // $headers = "From: $from_name <".$_SERVER['SERVER_ADMIN'].">\nReply-To: $from_name <$from_email>\nX-Mailer: PHP/" . phpversion()."\n"; $full_message="Name: $from_name \nEmail: $from_email \nMessage: \n$request"; if (($to_email == 'chile1@chile-travel.com')or($to_email == 'bigchill@chile-travel.com')or($to_email=='chile3@chiletravelplus.com')or($to_email==$client['test'])){ $mail_one=mail($to_email,$subject,$full_message, $headers); }else{ $mail_one=mail($to_email,$subject,$full_message, $headers); $mail_two=mail("bigchill@chile-travel.com",$subject,$full_message, $headers); if ($to_email2!=''){$mail_three=mail($to_email2,$subject,$full_message, $headers);} } echo '

 

 

 

Thank you for your interest!
Your mail has been send and we will reply as soon as possible
Please use the menus and links above and on the sides to continue browsing our site.

 

 

 

 

 

 

'; }else{ ?>
Subject:
 
Your Name:
Your email address:
Request: