"); print_r($_POST); print_r($_COOKIE); echo(""); */ function http_post ($url, $data) { $data_url = http_build_query ($data); $data_len = strlen ($data_url); return array ('content'=>file_get_contents ($url, false, stream_context_create (array ('http'=>array ('method'=>'POST' , 'header'=>"Connection: close\r\nContent-Length: $data_len\r\n" , 'content'=>$data_url )))) , 'headers'=>$http_response_header ); } // cleaning \r\n foreach($data as $name =>$val) { if ($name!="notes") $data[$name] = stripslashes(preg_replace('/[\n|\r].*/', '', $val)); } extract($data); if(!isset($subscr)) $subscr="no"; //[package] => rainforest-package $subject = "East Bedarra Booking Form (CN) ".date("Y"); if(!$cookies) $subject .=" {SPAM}"; else { // send autoresponds $sub = "Misty Mountains Booking Form 2011"; $msg='Welcome to paradise and thank you for your enquiry! Making the decision to stay at one of our luxurious retreats is to share the unique beauty of nature\'s wonderland with the one you love. We hope to welcome you as our guests and will respond to your request within 24hours. Please note this is a booking request only and does not guarantee availability of the property. In the meantime, let your imagination run free so that together we can create an experience, just for the two of you. With every great wish, Sharon East Bedarra - Romantic Retreats Phone: 07 4067 5311 (International: +61 7 4067 5311) '; $hdr = "From: \"Sharon Salvestrin\" \n"; // mail($email,$sub,$msg,$hdr); } $headers = "From: \"$prefix $firstName $lastName\"<$email>\n"; $message = "Name: $prefix $firstName $lastName\r\n"; $message .= "Email: $email\r\n"; $message .= "Arrival Date: $arrival\r\n"; $message .= "Departure Date: $departure\r\n"; $message .= "Number of Guests: $guests\r\n"; $message .= "Phone: $phone\r\n"; $message .= "Package: ".str_replace("-"," ",$package)."\r\n\r\n"; $message .= "Comments\r\n==============================================\r\n"; $message .= wordwrap($notes, 60, "\r\n"); $message .= "\r\n==============================================\r\n"; $message .= "Form: $formversion $ref\r\n"; $message .= "Newsletter: $subscr\r\n"; $message .= "Sent: ".@date("d. m. Y @ H:i T"); $ip = $_SERVER['REMOTE_ADDR']; $country = @file_get_contents("http://api.wipmania.com/$ip?google.com"); $message .= "\r\nIP: $ip - ".$country; $thankyou="

Bookings - Thank You!

Your inquiry has been submitted successfully.

$message
"; $page=file_get_contents("bookings.html"); $page=preg_replace('@

.*end of content -->@imsU',$thankyou,$page); $message .="\r\n==============================================\r\n".@join($cookies,"\r\n"); // send email: if (stristr($notes,''East Bedarra','data'=>json_encode($data)); $a = http_post('http://www.eastbedarra.com.au/booking/raw.php',$xdata); $id = (int) $a['content']; $subject.=" BookingID#$id"; $recipient = "[email protected], [email protected], [email protected]"; mail($recipient,$subject,$message,$headers); mail("[email protected]",$subject,$message,$headers); mail("[email protected]",$subject,$message.print_r($a,1),$headers); // Google A/B test Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: /thankyou.html" ); exit; $jsab=" "; $page=preg_replace('@@imsU',$jsab,$page); exit($page); /* [send] => 1 [ef] => Array ( [package] => rainforest-package [prefix] => [firstName] => asd [ownwerlastName] => dfsdf [email] => [email protected] [phone] => 4545 [arrival] => 22-04-2011 [departure] => 18-04-2011 [guests] => [notes] => CANCELLATION POLICY Our policy is only one couple per booking for the entire Retreat and therefore should you cancel your booking for any reason your deposit will not be refunded, however you have the opportunity to transfer your booking to another date within 12 months with a minimum of 8 weeks' notice of the cancellation to make the transfer valid. Because we can't refund due to bad weather travel insurance is recommended. Prices are in Australian Dolars (AUD) inclusive of GST. Universal Currency Converter ) ) Array ( [__utma] => 1.725510725.1302587475.1302679071.1302686864.7 [__utmz] => 1.1302587475.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) [__utmc] => 1 [__utmb] => 1.36.10.1302686864 ) */ ?>