Files
friendshiptours.org/site/en/bookingrequest.php
2015-11-12 19:58:50 -06:00

130 lines
6.0 KiB
PHP

<div class='page-box-center'>
<h2>Begin a Booking Request</h2>
<p>
To submit a booking request to Friendship Tours, simply fill out the
form below with your information and click on "Review Information". After
reviewing your information, if it is all correct, click on "Submit" to send
us your request.
</p>
<form action="bookingrequest.php" method="post" accept-charset="utf-8" id='bookingrequest_form'>
<fieldset>
<legend>Travel Information</legend>
<p class='field_medium'>
Have you booked with us before?
<select name='booked_with_us_before' id='booked_with_us_before'>
<?php foreach(array('Yes','No') as $option): ?>
<option <?php echo ($_POST['booked_with_us_before'] == $option) ? "selected='selected'" : ''; ?>><?php echo $option ?></option>
<?php endforeach; ?>
</select>
</p>
<p>
<strong>Passengers</strong><br />
Please use the names exactly as they appear on the form of ID that
you will be using when you travel. The US government requires that the
names match exactly. The US government also requires the gender and
the birthdate of each passenger, regardless of age.
</p>
<table class='passengers'>
<thead>
<tr>
<th></th>
<th>First name</th>
<th>Middle name</th>
<th>Last name</th>
<th>Gender</th>
<th>Birthdate</th>
</tr>
</thead>
<tbody>
<?php for($idx = 0; $idx < (isset($this->data['info']) ? count($this->data['info']['FirstName']) : 4); $idx++): ?>
<tr passengernumber='<?php echo $idx + 1; ?>'>
<th>Passenger <?php echo $idx + 1; ?></th>
<td>
<input type="text" name="FirstName[]" value="<?php echo (isset($this->data['info']) ? $this->data['info']['FirstName'][$idx] : "") ?>"/>
</td>
<td>
<input type="text" name="MiddleName[]" value="<?php echo (isset($this->data['info']) ? $this->data['info']['MiddleName'][$idx] : "") ?>"/>
</td>
<td>
<input type="text" name="LastName[]" value="<?php echo (isset($this->data['info']) ? $this->data['info']['LastName'][$idx] : "") ?>"/>
</td>
<td>
<select name="Gender[]">
<?php foreach(array('Male','Female') as $option): ?>
<option <?php echo (isset($this->data["info"]) ? $this->data["info"]["Gender"][$idx] : "Male") == $option ? "selected='selected'" : ''; ?>><?php echo $option ?></option>
<?php endforeach; ?>
</select>
</td>
<td>
<input name="Birthdate[]" type="text" class="date-input" value="<?php echo (isset($this->data['info']) ? $this->data['info']['Birthdate'][$idx] : "") ?>"/>
</td>
</tr>
<?php endfor; ?>
</tbody>
</table>
<button class='passenger-btn' id="AddPassengerBtn">+ Add passenger</button>
</fieldset>
<fieldset>
<legend>Departure Information</legend>
<p class='field'>
Departure city
<input type="text" name="departure_city" value="<?php echo $this->data['info']['departure_city'] ?>" id="departure_city"/>
</p>
<p class='field'>
Alt. departure city
<input type="text" name="alt_departure_city" value="<?php echo $this->data['info']['alt_departure_city'] ?>" id="alt_departure_city"/>
</p>
<p class='field_long'>
Departure date or range of dates if flexible
<textarea name='departure_dates' id='departure_dates'><?php echo $this->data['info']['departure_dates'] ?></textarea>
</p>
</fieldset>
<fieldset>
<legend>Arrival Information</legend>
<p class='field'>
Arrival city
<input type="text" name="arrival_city" value="<?php echo $this->data['info']['arrival_city'] ?>" id="arrival_city"/>
</p>
<p class='field_long'>
Alternate arrival city (or other cities and dates on a multi-city trip)
<textarea name='alt_arrival_cities' id='alt_arrival_cities'><?php echo $this->data['info']['alt_arrival_cities'] ?></textarea>
</p>
</fieldset>
<fieldset>
<legend>Return Information</legend>
<p class='field_long'>
Return date (or range of dates if flexible)
<textarea name='return_dates' id='return_dates'><?php echo $this->data['info']['return_dates'] ?></textarea>
</p>
</fieldset>
<fieldset>
<legend>Miscellaneous Information</legend>
<p class='field_long'>
Frequent flyer program and number for each traveler
<textarea name='frequent_flyer_information' id='frequent_flyer_information'><?php echo $this->data['info']['frequent_flyer_information'] ?></textarea>
</p>
<p class='field_medium'>
Aisle or window seat preferred?
<select name='window_or_aisle' id='window_or_aisle'>
<?php foreach(array('Aisle','Window') as $option): ?>
<option <?php echo ($_POST['window_or_aisle'] == $option) ? "selected='selected'" : ''; ?>><?php echo $option ?></option>
<?php endforeach; ?>
</select>
<span class='field_details'>Bulkhead and exit rows are blocked by the airlines.</span>
</p>
<p class='field_medium'>
Preferred method of payment
<select name='preferred_payment_method' id='preferred_payment_method'>
<?php foreach(array('Check','Euros','Credit card','Bill mission') as $option): ?>
<option <?php echo ($_POST['preferred_payment_method'] == $option) ? "selected='selected'" : ''; ?>><?php echo $option ?></option>
<?php endforeach; ?>
</select>
</p>
<p class='field_medium'>
E-mail address
<input type="text" name="email_address" value="<?php echo $this->data['info']['email_address'] ?>" id="email_address"/>
</p>
</fieldset>
<p><input type="submit" value="Review information" name='review_submit' id='review_submit'/></p>
</form>
</div>