Book a ride with a shuttle bus
'; if ($_GET['from_place'] != '') { //$ride = get_ride($_GET['id']); $ride['from_place'] = $_GET['from_place']; $ride['to_place'] = $_GET['to_place']; $ride['from_time'] = $_GET['from_time']; $ride['price_now'] = $_GET['price_now']; // ziskani udaju o jizde if ($_POST['from'] == "") $_POST['from'] = $ride['from_place']; if ($_POST['to'] == "") $_POST['to'] = $ride['to_place']; if ($_POST['date'] == "") $_POST['date'] = date("j F Y, H:i", $ride['from_time']); if ($_POST['price_per_person'] == "") $_POST['price_per_person'] = $ride['price_now']; } if ($_POST['type'] == 1) { $correct = true; if ($_POST['from'] == "") { $correct = false; echo 'Fill in From (city)
'; } if ($_POST['from_address'] == "") { $correct = false; echo 'Fill in Pick Up Address
'; } if ($_POST['date'] == "") { $correct = false; echo 'Fill in Date (and time)
'; } if ($_POST['to'] == "") { $correct = false; echo 'Fill in To (city)
'; } if ($_POST['to_address'] == "") { $correct = false; echo 'Fill in Drop Off Address
'; } if ($_POST['people'] == "") { $correct = false; echo 'Fill in number of people
'; } if (!preg_match("/^[^@]+@[^\.@]+\.[^\.@]+$/", $_POST['email'])) { $correct = false; echo 'Fill in correct email.
'; } if ($_POST['phone'] == "") { $correct = false; echo 'Fill in your phone number
'; } if ($correct) { // odeslani mailu $seller = "expedicion@centrum.cz"; //$seller = "info@chciwww.cz"; $seller_headers = mail_headers($_POST['email']); $customer_headers = mail_headers($seller); $seller_subject = 'Shuttle Bus Booking: '.$_POST['from'].' to '.$_POST['to'].', '.$_POST['date']; $customer_subject = 'Your shuttle bus booking on Expedicion.cz'; $body = "Order summary\n========================\n"; $body .= 'From (city): '.$_POST['from']."\n"; $body .= 'Pick up address: '.$_POST['from_address']."\n"; $body .= 'Date (and time): '.$_POST['date']."\n"; $body .= 'To (city): '.$_POST['to']."\n"; $body .= 'Drop off address: '.$_POST['to_address']."\n"; $body .= 'Number of people: '.$_POST['people']."\n"; $body .= 'Price per person: '.$_POST['price_per_person']." CZK\n"; $body .= 'Name: '.$_POST['name']."\n"; $body .= 'Country: '.$_POST['country']."\n"; $body .= 'Email: '.$_POST['email']."\n"; $body .= 'Phone no.: '.$_POST['phone']."\n"; $body .= 'Notes: '.$_POST['notes']."\n"; $customer_message = "Hello,\n thank you for your order of a shuttle bus ride with Expedicion.cz\n\n".$body." We will contact you for confirmation of this order and methods of payment. So please, stay in touch at least on the email. If you placed the order less than 1 day from this moment it's important to stay in touch even on the phone!\n"; if (strtolower($_POST['to']) == "český krumlov" || strtolower($_POST['to']) == "cesky krumlov") $customer_message .= "\nYou are automatically eligible for 20% discount for bike rental or raft rental at our travel agency, once on our shuttle bus to Cesky Krumlov.\n"; $customer_message .="\nTeam Expedicion.cz"; $seller_message = $body; if (!mail($seller, $seller_subject, $seller_message, $seller_headers)) { echo 'Could not send an order, please try to do it once more. We apolozige.
'; } else { mail($_POST['email'], $customer_subject, $customer_message, $customer_headers); echo 'Your order has been successfully placed. Stay in touch please and wait for our message.
'; } } else printBookingForm(); } else printBookingForm(); function printBookingForm() { ?>After placing an order, we will contact you for confirmation of the order, so please, stay in touch.