/
home
/
desid573
/
public_html
/
family
/
/home/desid573/public_html/family
mkdir
upload
Name
Size
Mode
Actions
assets/
-
0755
rm
eway-rapid-php-master/
-
0755
rm
invoice/
-
0755
rm
pdd/
-
0755
rm
10.php
1941
0644
edit
dl
rm
11.php
1176
0644
edit
dl
rm
22.php
9106
0644
edit
dl
rm
array.php
2173
0644
edit
dl
rm
a_name_address.php
959
0644
edit
dl
rm
brisbaneInvoice.php
11845
0644
edit
dl
rm
class.phpmailer.php
80046
0644
edit
dl
rm
class.pop3.php
10385
0644
edit
dl
rm
class.smtp.php
24586
0644
edit
dl
rm
completedReport.php
9286
0644
edit
dl
rm
confirmAll1.php
591
0644
edit
dl
rm
dispatch.php
877
0644
edit
dl
rm
driverInvoice.php
12148
0644
edit
dl
rm
driverlocation.php
14585
0644
edit
dl
rm
eCrypt.js
68424
0644
edit
dl
rm
edit.php
780
0644
edit
dl
rm
error_log
30478123
0644
edit
dl
rm
eway-rapid-php-master.zip
57270
0644
edit
dl
rm
eWay.php
42697
0644
edit
dl
rm
family-cab_small.jpg
98853
0644
edit
dl
rm
fatigue.php
2295
0644
edit
dl
rm
incident_report.php
0
0644
edit
dl
rm
index.php
200204
0644
edit
dl
rm
index1apr2019.php
92844
0644
edit
dl
rm
index3.php
60677
0644
edit
dl
rm
index4.php
91500
0644
edit
dl
rm
index15thMay.php
92640
0644
edit
dl
rm
indexJune10.php
93053
0644
edit
dl
rm
indextest.php
91391
0644
edit
dl
rm
indexTraffic.php
86040
0644
edit
dl
rm
index_preSydney.php
60350
0644
edit
dl
rm
index_sydney.php
74126
0644
edit
dl
rm
melbAuditReport.php
10458
0644
edit
dl
rm
melbreport.php
7758
0644
edit
dl
rm
monthly.php
12046
0644
edit
dl
rm
new.php
0
0644
edit
dl
rm
perthAuditReport.php
34918
0644
edit
dl
rm
perthReport.php
7757
0644
edit
dl
rm
postcodeArray.php
1014
0644
edit
dl
rm
postcodeReport.php
21015
0644
edit
dl
rm
pre-sydneyquote.php
39158
0644
edit
dl
rm
promo.php
765
0644
edit
dl
rm
qldDriverReport.php
8568
0644
edit
dl
rm
qldreport.php
7580
0644
edit
dl
rm
quote.php
52358
0644
edit
dl
rm
quote2.php
38831
0644
edit
dl
rm
quote_sydney.php
51912
0644
edit
dl
rm
report.php
10447
0644
edit
dl
rm
search.php
854
0644
edit
dl
rm
serialize.php
157
0644
edit
dl
rm
style.json
1014
0644
edit
dl
rm
summaryReport.php
10212
0644
edit
dl
rm
sydneydispatch.php
12177
0644
edit
dl
rm
sydneyreport.php
7758
0644
edit
dl
rm
table.php
5087
0644
edit
dl
rm
test.php
3851
0644
edit
dl
rm
thankyou.php
31498
0644
edit
dl
rm
tmrReport.php
2431
0644
edit
dl
rm
tmr_trips.php
11287
0644
edit
dl
rm
unserialize.php
571
0644
edit
dl
rm
Edit:
/home/desid573/public_html/family/quote2.php
(38831B)
<?php $invoice_ref = time().rand(10,5000); $client_key = '4T7y1vuKPkdhRYUQdH6msueW9hqV2wpcwnSk0Qwxkvwf7TjQn40qymPW7IJb66gUC1w1505cDMkj9IR82juQEnIp4/8nd0nDhwYDSDoqROtNBWmkqtqYmF6F4qVGMUq3HpJrY3y2kdSljCFfWzWc7LIEn4G5XY2IZAPgAO5+mhwvYrricmqwLhqzV4FBUII5AwTvJZl4awrdul4vLWkS73vJuW/XrXHseGK/nqB3oSRluZ1jKp2qDgVTwrXYEbx4rwwS42X2w0C9tLKywxf27WD2CCK8ftSeQBimVqFI0r6VuRXFVaOn6SQTOD9V/TsCfPk5Zh6/PWcfapyVKS+l1w=='; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>FamilyCab Quote Page</title> <!-- Bootstrap --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="assets/picker/default.css" crossorigin="anonymous"> <link rel="stylesheet" href="assets/picker/date.theme.css" crossorigin="anonymous"> <link rel="stylesheet" href="assets/picker/default.time.css" crossorigin="anonymous"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <style> #map { height:300px; } body{ background-color: #d9d9d9; } .lat_error_pickup { display:none; color:#a94442; margin-bottom: 10px; margin-top: 5px; } .lat2_error_pickup { display:none; color:#a94442; margin-bottom: 10px; margin-top: 5px; } .lat3_error_pickup { display:none; color:#a94442; margin-bottom: 10px; margin-top: 5px; } .lat4_error_pickup { display:none; color:#a94442; margin-bottom: 10px; margin-top: 5px; } .invalidcc { display:none; color:#a94442; margin-bottom: 10px; margin-top: 5px; } </style> <script type="text/javascript"> function setDecimal(input) { input.value = parseFloat(input.value).toFixed(2); } </script> </head> <body> <div class="container"> <input type="hidden" id="onewayPrice" name="onewayPrice" value=""> <input type="hidden" id="returnPrice" name="returnPrice" value=""> <input type="hidden" id="lat1_value" name="lat1_value" value=""> <input type="hidden" id="lat2_value" name="lat2_value" value=""> <input type="hidden" id="lng1_value" name="lng1_value" value=""> <input type="hidden" id="lng2_value" name="lng2_value" value=""> <input type="hidden" id="lat3_value" name="lat3_value" value=""> <input type="hidden" id="lat4_value" name="lat4_value" value=""> <input type="hidden" id="lng3_value" name="lng3_value" value=""> <input type="hidden" id="lng4_value" name="lng4_value" value=""> <div class="row" > <h3 style="margin-left:15px;">Pick Up Details</h3> </div> <div class="row" > <div class="col-xs-12 col-md-6"> <input type="radio" class="" value="oneway" name="oneway" id="oneway" checked="checked"> Oneway <input type="radio" class="" value="return" name="oneway" id="oneway"> Return <br><br> <input type="radio" class="" value="Other" name="pickup_type" id="pickup_type" checked="checked"> Other <input type="radio" class="" value="T1I" name="pickup_type" id="pickup_type"> T1 Int. <input type="radio" class="" value="T1D" name="pickup_type" id="pickup_type"> T1 Dom. <input type="radio" class="" value="T2" name="pickup_type" id="pickup_type"> T2 <input type="radio" class="" value="T3" name="pickup_type" id="pickup_type"> T3 <input type="radio" class="" value="T4" name="pickup_type" id="pickup_type"> T4 <br> <input type="text" id="pickup" name="pickup" autocomplete="off" data-validation="required" required class="form-control" placeholder="Pickup Address"> <div class="lat_error_pickup">Please select address from Google</div> </div> </div> <div class="row" style="margin-top: 10px;"> <div class="col-xs-12 col-md-6"> <input type="radio" class="" value="Other" name="pickup_type2" id="pickup_type2" checked="checked"> Other <input type="radio" class="" value="T1I" name="pickup_type2" id="pickup_type2"> T1 Int. <input type="radio" class="" value="T1D" name="pickup_type2" id="pickup_type2"> T1 Dom. <input type="radio" class="" value="T2" name="pickup_type2" id="pickup_type2"> T2 <input type="radio" class="" value="T3" name="pickup_type2" id="pickup_type2"> T3 <input type="radio" class="" value="T4" name="pickup_type2" id="pickup_type2"> T4 <br> <input type="text" id="dropoff" name="dropoff" autocomplete="off" data-validation="required" required class="form-control" placeholder="Drop off Address"><div class="lat2_error_pickup">Please select address from Google</div> </div> </div> <div class="return_rows" style="display:none;"> <div class="row" style="margin-top: 10px"> <h3 style="margin-left:15px;">Return Details</h3> </div> <div class="row" style="margin-top: 10px;"> <div class="col-xs-12 col-md-6"> <input type="radio" class="" value="Other" name="return_pickup_type" id="return_pickup_type" checked="checked"> Other <input type="radio" class="" value="T1I" name="return_pickup_type" id="return_pickup_type"> T1 Int. <input type="radio" class="" value="T1D" name="return_pickup_type" id="return_pickup_type"> T1 Dom. <input type="radio" class="" value="T2" name="return_pickup_type" id="return_pickup_type"> T2 <input type="radio" class="" value="T3" name="return_pickup_type" id="return_pickup_type"> T3 <input type="radio" class="" value="T4" name="return_pickup_type" id="return_pickup_type"> T4 <br> <input type="text" id="return_pickup" name="return_pickup" autocomplete="off" class="form-control" placeholder="Return Pickup Address"><div class="lat3_error_pickup">Please select address from Google</div> </div> </div> <div class="row" style="margin-top: 10px;"> <div class="col-xs-12 col-md-6"> <input type="radio" class="" value="Other" name="return_pickup_type2" id="return_pickup_type2" checked="checked"> Other <input type="radio" class="" value="T1I" name="return_pickup_type2" id="return_pickup_type2"> T1 Int. <input type="radio" class="" value="T1D" name="return_pickup_type2" id="return_pickup_type2"> T1 Dom. <input type="radio" class="" value="T2" name="return_pickup_type2" id="return_pickup_type2"> T2 <input type="radio" class="" value="T3" name="return_pickup_type2" id="return_pickup_type2"> T3 <input type="radio" class="" value="T4" name="return_pickup_type2" id="return_pickup_type2"> T4 <br> <input type="text" id="return_dropoff" name="return_dropoff" autocomplete="off" class="form-control" placeholder="Drop off Address"><div class="lat4_error_pickup">Please select address from Google</div> </div> </div> </div> <div class="other_rows"> <div class="row" > <h3 style="margin-left:15px;">Passenger Details</h3> </div> <div class="row" > <div class="col-xs-12 col-md-6"> <div class="row" style="margin-top: 10px"> <div class="col-xs-10 col-md-10"> Total Number of Passengers including Children <br> </div> <div class="col-xs-2 col-md-1"> <select id="passenger_count" name="passenger_count"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> </select> </div> </div> <div class="row" style="margin-top: 10px"> <div class="col-xs-10 col-md-10"> Number of children requiring any type of car seat <br></div> <div class="col-xs-2 col-md-1"> <select id="booster_count" name="booster_count"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> </select> </div></div> </div></div> </div> <div class="row" style="margin-top: 10px"> <div class="col-xs-9 col-md-5"> <h4 >Quote </h4><h5><span id="tripdesc">One Way</span>: $<span id="totalPrice"><strong>0</strong></span></h5> <div class="return_rows" style="display:none;"><h5 >Return Journey: $<span id="totalPrice2"><strong>0</strong></span></h5> <h5 >Total (First + Return): $<span id="totalPrice3"><strong>0</strong></span></h5></div> <h4>Please note minimum fare is $55 between the hours of 10pm and 6am</h4> </div> </div> <div class="row" style="margin-top: 10px"> <div class="col-xs-12 col-md-6"> <div id="map"></div> </div> </div> </form> <script src="https://secure.ewaypayments.com/scripts/eCrypt.min.js"></script> </div> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <script src="assets/picker/picker.js"></script> <script src="assets/picker/picker.date.js"></script> <script src="assets/picker/picker.time.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.23/jquery.form-validator.min.js"></script> <script type="text/javascript"> $airport_pickup = 0; $return_airport_pickup = 0; $price1 = 0; $(document).ready(function(){ // $("#name").on("keyup", function(){ // var id = $("#name").val(); // var data = 'name=' + id; // $.ajax({ // type: "POST", // url: "a_name_address.php", // data: data, // dataType: 'json', // success: function (data) { // $("#phone").val(data.mobile); // $("#dropoff").val(data.pickup); // $("#email").val(data.email); // } // success // }); // ajax // }); $("input[name='oneway']").on("click", function(){ var radioValue = $("input[name='oneway']:checked").val(); if(radioValue == 'oneway'){ $(".return_rows").hide(); $("#tripdesc").text("One Way"); $("#return_pickup, #return_dropoff, #return_date, #return_time").removeAttr('required'); } else { $(".return_rows").show(); $("#tripdesc").text("First Journey"); $("#return_pickup, #return_dropoff, #return_date, #return_time").attr('required', 'required'); } }); function terminal1int(input, latitude, longitude) { var inputtext = 'Perth Airport - Terminal 1 (T1) International, Horrie Miller Drive, Perth Airport, Western Australia'; $(input).val(inputtext); var lat = -31.942232; var lng = 115.973662; $(latitude).val(lat); $(longitude).val(lng); map.setCenter({lat: lat, lng: lng}); marker = new google.maps.Marker({map: map, position: {lat: lat, lng: lng}}); directions(); initMap(); } function terminal1dom(input, latitude, longitude) { var inputtext = 'Perth Airport - Terminal 1 (T1) Domestic, Horrie Miller Drive, Perth Airport, Western Australia, Australia'; $(input).val(inputtext); var lat = -31.942232; var lng = 115.973662; $(latitude).val(lat); $(longitude).val(lng); map.setCenter({lat: lat, lng: lng}); marker = new google.maps.Marker({map: map, position: {lat: lat, lng: lng}}); directions(); initMap(); } function terminal2(input, latitude, longitude){ var inputtext = 'T2 - Perth Domestic Airport, Sugarbird Lady Road, Perth Airport, Western Australia, Australia'; $(input).val(inputtext); var lat = -31.945018; var lng = 115.972471; $(latitude).val(lat); $(longitude).val(lng); map.setCenter({lat: lat, lng: lng}); marker = new google.maps.Marker({map: map, position: {lat: lat, lng: lng}}); directions(); initMap(); } function terminal3(input, latitude, longitude) { var inputtext = 'T3 terminal Perth, Fauntleroy Avenue, Perth Airport, Western Australia, Australia'; $(input).val(inputtext); var lat = -31.934159; var lng = 115.959787; $(latitude).val(lat); $(longitude).val(lng); map.setCenter({lat: lat, lng: lng}); marker = new google.maps.Marker({map: map, position: {lat: lat, lng: lng}}); directions(); initMap(); } function terminal4(input, latitude, longitude) { var inputtext = 'T4 terminal Perth, Fauntleroy Avenue, Perth Airport, Western Australia, Australia'; $(input).val(inputtext); var lat = -31.933054; var lng = 115.960126; $(latitude).val(lat); $(longitude).val(lng); map.setCenter({lat: lat, lng: lng}); marker = new google.maps.Marker({map: map, position: {lat: lat, lng: lng}}); directions(); initMap(); } function directions() { if($("#lat1_value") != "" && $("#lat2_value") != "") { directionsService = new google.maps.DirectionsService; directionsDisplay = new google.maps.DirectionsRenderer; directionsDisplay.setMap(map); calculateAndDisplayRoute(directionsService, directionsDisplay); } } $("input[name='pickup_type']").on("click", function(){ var radioValue = $("input[name='pickup_type']:checked").val(); if(radioValue == 'Other'){ //$("#pickup_div_other").show(); $(".pickup_div_t, .flight_time").hide(); $("#pickup").val(''); $("#flight_number, #pickup_time").removeAttr('required'); $airport_pickup = 0; } else if(radioValue == 'T1I'){ $('.lat_error_pickup').hide(); terminal1int("#pickup", "#lat1_value", "#lng1_value"); $airport_pickup = 5; } else if(radioValue == 'T1D'){ terminal1dom("#pickup", "#lat1_value", "#lng1_value"); $('.lat_error_pickup').hide(); $airport_pickup = 5; } else if(radioValue == 'T2'){ terminal2("#pickup", "#lat1_value", "#lng1_value"); $('.lat_error_pickup').hide(); $airport_pickup = 5; } else if(radioValue == 'T3'){ terminal3("#pickup", "#lat1_value", "#lng1_value"); $('.lat_error_pickup').hide(); $airport_pickup = 5; } else if(radioValue == 'T4'){ terminal4("#pickup", "#lat1_value", "#ln1_value"); $('.lat_error_pickup').hide(); $airport_pickup = 5; } initMap(); }); $("input[name='pickup_type2']").on("click", function(){ var radioValue = $("input[name='pickup_type2']:checked").val(); if(radioValue == 'Other'){ $(".pickup_div_t2").hide(); $("#dropoff").val(''); initMap(); } else if(radioValue == 'T1I'){ $('.lat2_error_pickup').hide(); terminal1int("#dropoff", "#lat2_value", "#lng2_value"); } else if(radioValue == 'T1D'){ $('.lat2_error_pickup').hide(); terminal1dom("#dropoff", "#lat2_value", "#lng2_value"); } else if(radioValue == 'T2'){ $('.lat2_error_pickup').hide(); terminal2("#dropoff", "#lat2_value", "#lng2_value"); } else if(radioValue == 'T3'){ $('.lat2_error_pickup').hide(); terminal3("#dropoff", "#lat2_value", "#lng2_value"); } else if(radioValue == 'T4'){ $('.lat2_error_pickup').hide(); terminal4("#dropoff", "#lat2_value", "#lng2_value"); } }); $("input[name='return_pickup_type']").on("click", function(){ var radioValue = $("input[name='return_pickup_type']:checked").val(); if(radioValue == 'Other'){ //$("#pickup_div_other").show(); $(".return_pickup_div_t, .return_flight_time").hide(); $("#return_pickup").val(''); $("#return_flight_number, #return_pickup_time").removeAttr('required'); $return_airport_pickup = 0; } else if(radioValue == 'T1I'){ terminal1int("#return_pickup", "#lat3_value", "#lng3_value"); $('.lat3_error_pickup').hide(); $return_airport_pickup = 5; } else if(radioValue == 'T1D'){ $("#return_flight_number").val(''); terminal1dom("#return_pickup", "#lat3_value", "#lng3_value"); $('.lat3_error_pickup').hide(); $return_airport_pickup = 5; } else if(radioValue == 'T2'){ $("#return_flight_number").val(''); terminal2("#return_pickup", "#lat3_value", "#lng3_value"); $('.lat3_error_pickup').hide(); $return_airport_pickup = 5; } else if(radioValue == 'T3'){ $("#return_flight_number").val(''); terminal3("#return_pickup", "#lat3_value", "#lng3_value"); $('.lat3_error_pickup').hide(); $return_airport_pickup = 5; } else if(radioValue == 'T4'){ terminal4("#return_pickup", "#lat3_value", "#lng3_value"); $('.lat3_error_pickup').hide(); $return_airport_pickup = 5; } }); $("input[name='return_pickup_type2']").on("click", function(){ var radioValue = $("input[name='return_pickup_type2']:checked").val(); if(radioValue == 'Other'){ $(".return_pickup_div_t2").hide(); $("#return_dropoff").val(''); } else if(radioValue == 'T1I'){ terminal1int("#return_dropoff", "#lat4_value", "#lng4_value"); $('.lat4_error_pickup').hide(); } else if(radioValue == 'T1D'){ terminal1dom("#return_dropoff", "#lat4_value", "#lng4_value"); $('.lat4_error_pickup').hide(); } else if(radioValue == 'T2'){ terminal2("#return_dropoff", "#lat4_value", "#lng4_value"); $('.lat4_error_pickup').hide(); } else if(radioValue == 'T3'){ terminal3("#return_dropoff", "#lat4_value", "#lng4_value"); $('.lat4_error_pickup').hide(); } else if(radioValue == 'T4'){ terminal4("#return_dropoff", "#lat4_value", "#lng4_value"); $('.lat4_error_pickup').hide(); } }); }); $('#lng1_value, #lng2_value, #lng3_value, #lng4_value').on('change', function() { initMap(); }) $('.datepicker').pickadate({ }); $('.timepicker').pickatime({ interval:15 }); $('#pickup').on('blur', function () { $(this).delay(2000).queue(function() { latlngcheck(); distance(); }) }) $('#pickup').on('change', function () { $("#lat1_value").val(''); $("#lng1_value").val(''); $('.lat_error_pickup').hide(); $('#totalPrice').text( "" ); oneway_directions_set = 0; }) $('#dropoff').on('blur', function () { $(this).delay(2000).queue(function() { latlng2check(); distance(); }) }) $('#dropoff').on('change', function () { $("#lat2_value").val(''); $("#lng2_value").val(''); $('.lat2_error_pickup').hide(); $('#totalPrice').text( "" ); oneway_directions_set = 0; }) $('#return_pickup').on('blur', function () { $(this).delay(2000).queue(function() { latlng3check(); returndistance(); }) }) $('#return_pickup').on('change', function () { $("#lat3_value").val(''); $("#lng3_value").val(''); $('#totalPrice2').text( "" ); $('.lat3_error_pickup').hide(); return_directions_set = 0; }) $('#return_dropoff').on('blur', function () { $(this).delay(2000).queue(function() { latlng4check(); returndistance(); }) }) $('#return_dropoff').on('change', function () { $("#lat4_value").val(''); $("#lng4_value").val(''); $('.lat4_error_pickup').hide(); $('#totalPrice2').text( "" ); return_directions_set = 0; }) $('#pickup, #dropoff, .datepicker, .timepicker, #first_name, #phone, #email, #passenger_count, #car_seat, #ff_count, #booster_count').on('change', function () { distance(); }) $('#return_pickup, #return_dropoff, .datepicker, .timepicker, #email, #luggage, #passenger_count,#car_seat, #ff_count, #booster_count').on('blur', function () { returndistance(); }) map = null ; pickUp = null ; dropOff = null; return_pickUp = null; return_dropOff= null; directionsDisplay = null ; directionsDisplay_return = null; directionsService = null ; directionsService_return = null ; var oneway_directions_set = 0; var return_directions_set = 0; function latlngcheck() { var latlng1 = $('#lat1_value').val(); if (latlng1 != '') { $('.lat_error_pickup').hide(); } else{ $('.lat_error_pickup').show(); $('#totalPrice').text( " Invalid Address" ); //alert(invalid_latlng+''+latlng1); return false;; } } function latlng2check() { var latlng2 = $('#lat2_value').val(); if (latlng2 == '') { $('.lat2_error_pickup').show(); } else{ $('.lat2_error_pickup').hide(); $('#totalPrice').text( " Invalid Address" ); //alert(invalid_latlng+''+latlng1); return false;; } } function latlng3check() { var latlng3 = $('#lat3_value').val(); if (latlng3 == '') { $('.lat3_error_pickup').show(); } else{ $('.lat3_error_pickup').hide(); $('#totalPrice2').text( " Invalid Address" ); //alert(invalid_latlng+''+latlng1); return false;; } } function latlng4check() { var latlng4 = $('#lat4_value').val(); if (latlng4 == '') { $('.lat4_error_pickup').show(); } else{ $('.lat4_error_pickup').hide(); $('#totalPrice2').text( " Invalid Address" ); //alert(invalid_latlng+''+latlng1); return false;; } } function initMap() { if(map == null) { map = new google.maps.Map(document.getElementById('map'), { zoom: 12, center: {lat: -31.9535959, lng: 115.8570118} }); } var geocoder = new google.maps.Geocoder(); if($('#pickup').val() != "") geocodeAddress(geocoder, map); if($('#dropoff').val() != "") geocodeAddress2(geocoder, map); if($('#return_pickup').val() != "") geocodeAddress3(geocoder, map); if($('#return_dropoff').val() != "") geocodeAddress4(geocoder, map); if(directionsDisplay != null) directionsDisplay.setDirections({routes: []}); if(directionsDisplay_return != null) directionsDisplay_return.setDirections({routes: []}); directionsService = new google.maps.DirectionsService; directionsService_return = new google.maps.DirectionsService; directionsDisplay = new google.maps.DirectionsRenderer; directionsDisplay_return = new google.maps.DirectionsRenderer; directionsDisplay.setMap(map); directionsDisplay_return.setMap(map); calculateAndDisplayRoute(directionsService, directionsDisplay); calculateAndDisplayRoute(directionsService, directionsDisplay_return); distance(); returndistance(); } function geocodeAddress(geocoder, resultsMap) { var address = document.getElementById('pickup').value; geocoder.geocode({'address': address}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) {resultsMap.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({map: resultsMap,position: results[0].geometry.location}); $('#lat1_value').val(results[0].geometry.location.lat()); $('#lng1_value').val(results[0].geometry.location.lng()) .trigger('change'); $('.lat_error_pickup').hide(); } }); } function geocodeAddress2(geocoder, resultsMap) { var address = document.getElementById('dropoff').value; geocoder.geocode({'address': address}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) {resultsMap.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({map: resultsMap,position: results[0].geometry.location}); $('#lat2_value').val(results[0].geometry.location.lat()); $('#lng2_value').val(results[0].geometry.location.lng()) .trigger('change'); $('.lat2_error_pickup').hide(); } }); } function geocodeAddress3(geocoder, resultsMap) { var address = document.getElementById('return_pickup').value; geocoder.geocode({'address': address}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) {resultsMap.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({map: resultsMap,position: results[0].geometry.location}); $('#lat3_value').val(results[0].geometry.location.lat()); $('#lng3_value').val(results[0].geometry.location.lng()) .trigger('change'); $('.lat3_error_pickup').hide(); } }); } function geocodeAddress4(geocoder, resultsMap) { var address = document.getElementById('return_dropoff').value; geocoder.geocode({'address': address}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) {resultsMap.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({map: resultsMap,position: results[0].geometry.location}); $('#lat4_value').val(results[0].geometry.location.lat()); $('#lng4_value').val(results[0].geometry.location.lng()) .trigger('change'); $('.lat4_error_pickup').hide(); } }); } function calculateAndDisplayRoute(directionsService, directionsDisplay) { if(oneway_directions_set != 1) { if($('#lat1_value').val() != "" && $('#lat2_value').val() != "") { directionsService.route({ origin: $('#lat1_value').val()+","+$('#lng1_value').val(), destination: $('#lat2_value').val()+","+$('#lng2_value').val(), travelMode: google.maps.TravelMode.DRIVING }, function(response, status) { if (status === google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); oneway_directions_set = 1; } else { //window.alert('Directions request failed due to ' + status); } }); } } if(return_directions_set != 1){ if($('#lat3_value').val() != "" && $('#lat4_value').val() != "") { directionsService_return.route({ origin: $('#lat3_value').val()+","+$('#lng3_value').val(), destination: $('#lat4_value').val()+","+$('#lng4_value').val(), travelMode: google.maps.TravelMode.DRIVING }, function(response, status) { if (status === google.maps.DirectionsStatus.OK) { directionsDisplay_return.setDirections(response); return_directions_set = 1; } else { //window.alert('Directions request failed due to ' + status); } }); } } } // This example displays an address form, using the autocomplete feature // of the Google Places API to help users fill in the information. var placeSearch, dropoff , pickup ; function initAutocomplete() { var perthBounds = new google.maps.LatLngBounds(new google.maps.LatLng(-32.787777, 115.556739), new google.maps.LatLng(-31.159266, 116.545509)); pickup = new google.maps.places.Autocomplete((document.getElementById('pickup')),{types: ['geocode','establishment'], componentRestrictions:{country:"au"}, bounds: perthBounds, strictBounds: true,}); pickup.addListener(); pickup.addListener('place_changed', function() { initMap(); }); dropoff = new google.maps.places.Autocomplete((document.getElementById('dropoff')),{types: ['geocode', 'establishment'], componentRestrictions:{country:"au"}, bounds: perthBounds, strictBounds: true,}); dropoff.addListener(); dropoff.addListener('place_changed', function() { initMap(); }); return_pickup = new google.maps.places.Autocomplete((document.getElementById('return_pickup')),{types: ['geocode','establishment'], componentRestrictions:{country:"au"}, bounds: perthBounds, strictBounds: true,}); return_pickup.addListener(); return_pickup.addListener('place_changed', function() { initMap(); }); return_dropoff = new google.maps.places.Autocomplete((document.getElementById('return_dropoff')),{types: ['geocode','establishment'], componentRestrictions:{country:"au"}, bounds: perthBounds, strictBounds: true,}); return_dropoff.addListener(); return_dropoff.addListener('place_changed', function() { initMap(); }); initMap(); } function distance() { var pickup = $('#lat1_value').val()+","+$('#lng1_value').val(); var dropoff = $('#lat2_value').val()+","+$('#lng2_value').val(); var bookingtime = "9:30 AM"; var hours = Number(bookingtime.match(/^(\d+)/)[1]); var minutes = Number(bookingtime.match(/:(\d+)/)[1]); var AMPM = bookingtime.match(/\s(.*)$/)[1]; if(AMPM == "PM" && hours<12) hours = hours+12; if(AMPM == "AM" && hours==12) hours = hours-12; if(hours <= 7 || hours >= 21) { var min = 55; } else { var min = 35; } var lat1 = $('#lat1_value').val(); var lat2 = $('#lat2_value').val(); $pass = $('#passenger_count').val(); $seats = $('#booster_count').val(); if($pass >= 5) { $pass_charge = 20; } else { $pass_charge = 0; } if($seats >= 2) { $seats_charge = (parseFloat($seats) - 1) * 5; } else { $seats_charge = 0; } if(lat1 != "" && lat2 != "") { var dataString = 'point1=' + pickup + "&point2=" + dropoff; $.ajax({ type: "POST", url: "11.php", data: dataString, dataType: 'json', success: function (data) { var distance = data.distance; var time = data.time; console.log(time); console.log(distance); var resultr = Math.ceil( ( ( distance.split(" ")[0].replace("," , "") ) * 1.3) + (time.split(" ")[0].replace("," , "") * 0.8) + 15 ) + parseFloat($seats_charge) + parseFloat($pass_charge); //var radioValue = $("input[name='oneway']:checked").val(); //if(radioValue == 'return'){ // var result = result * 2; // } if(resultr >= min) { fare = resultr + parseFloat($airport_pickup); var result = parseFloat(fare).toFixed(2); $('#totalPrice').text( result ); $('#onewayPrice').val( result ); $price1 = fare; } else { fare = min + parseFloat($airport_pickup); var result = parseFloat(fare).toFixed(2); $('#totalPrice').text( result ); $('#onewayPrice').val( result ); $price1 = fare; } } }) } } function returndistance() { var pickup = $('#lat3_value').val()+","+$('#lng3_value').val(); var dropoff = $('#lat4_value').val()+","+$('#lng4_value').val(); if($pass >= 5) { $pass_charge = 20; } else { $pass_charge = 0; } if($seats >= 2) { $seats_charge = (parseFloat($seats) - 1) * 5; } else { $seats_charge = 0; } var price1 = $price1; if(pickup != "" && dropoff != "") { var dataString = 'point1=' + pickup + "&point2=" + dropoff; $.ajax({ type: "POST", url: "11.php", data: dataString, dataType: 'json', success: function (data) { var distance = data.distance; var time = data.time; var resultr = Math.ceil( ( ( distance.split(" ")[0].replace("," , "") ) * 2) + 15 ) + parseFloat($pass_charge) + parseFloat($return_airport_pickup); if(resultr >= 35) { fare = resultr + parseFloat($seats_charge); var result = parseFloat(fare).toFixed(2); $('#totalPrice2').text( result ); $('#returnPrice').val( result ); var price3 = parseFloat(fare + price1).toFixed(2); $('#totalPrice3').text(price3); } else { fare = 35 + parseFloat($airport_pickup); var result = parseFloat(fare).toFixed(2); $('#totalPrice').text( result ); $('#returnPrice').val( result ); var price3 = parseFloat(fare + price1).toFixed(2); $('#totalPrice3').text(price3); } } }) } } function isNumber(obj) { return !isNaN(parseFloat(obj)) } function checkLuhn(input) { var sum = 0; var numdigits = input.length; var parity = numdigits % 2; for(var i=0; i < numdigits; i++) { var digit = parseInt(input.charAt(i)) if(i % 2 == parity) digit *= 2; if(digit > 9) digit -= 9; sum += digit; } return (sum % 10) == 0; } </script> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCq_JZBDbrE5qma5SgF06M2dVAqbiZBZ-o&libraries=places,geometry&callback=initAutocomplete" async defer></script> <script> $.validate(); </script> </body> </html>
Save
cmd:
run