/
home
/
desid573
/
public_html
/
old
/
/home/desid573/public_html/old
mkdir
upload
Name
Size
Mode
Actions
index.php
32024
0644
edit
dl
rm
Edit:
/home/desid573/public_html/old/index.php
(32024B)
<!DOCTYPE html> <?php $dbhost = "localhost"; $dbuser = "desid573_inquiri"; $dbpass = "@G&{)0*&Ts^V"; $dbname = "desid573_new_pro_api"; $conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname) or die($conn->connect_error); $result = mysqli_query($conn, "SELECT array FROM homekey_lat_lng WHERE id='1'"); $row = mysqli_fetch_assoc($result); $homekeyCoords = $row['array']; $result = mysqli_query($conn, "SELECT array FROM homekey_lat_lng WHERE id='2'"); $row = mysqli_fetch_assoc($result); $zone1Coords = $row['array']; $result = mysqli_query($conn, "SELECT array FROM homekey_lat_lng WHERE id='3'"); $row = mysqli_fetch_assoc($result); $zone2Coords = $row['array']; ?> <html lang="en"> <head> <meta charset="utf-8"> <title>DesiDrivers - We Drive You Home In Your Car</title> <meta name="description" content="Get a designated driver to get you and your car home safe" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--Bootstrap 4--> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"> <!--icons--> <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" /> <link rel="stylesheet" href="desis/css/style_green.css" /> <style> #map { height:200px; } </style> </head> <body> <!--header--> <nav class="navbar navbar-toggleable-md navbar-inverse fixed-top sticky-navigation"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> <span class="ion-grid icon-sm"></span> </button> <img src="desis/img/homekey.png" style="width: 60px; height: 60px; padding-right: 5px;"><a class="navbar-brand hero-heading" href="#">DESIDRIVERS</a> <div class="collapse navbar-collapse" id="navbarCollapse"> <ul class="navbar-nav ml-auto"> <li class="nav-item mr-3"> <a class="nav-link page-scroll" href="#main">DESIDRIVERS <span class="sr-only">(current)</span></a> </li> <li class="nav-item mr-3"> <a class="nav-link page-scroll" href="#download">Download</a> </li> <li class="nav-item mr-3"> <a class="nav-link page-scroll" href="#quote">Quote</a> </li> <li class="nav-item mr-3"> <a class="nav-link page-scroll" href="#blog">Blog</a> </li> <li class="nav-item mr-3"> <a class="nav-link page-scroll" href="#contact">Contact</a> </li> </ul> </div> </nav> <!--main section--> <section class="bg-texture hero" id="main"> <div class="container"> <div class="row d-md-flex brand"> <div class="col-md-6 hidden-sm-down wow fadeIn"> <img class="img-fluid mx-auto d-block" src="desis/img/iphone.png"/> </div> <div class="col-md-6 col-sm-12 text-white wow fadeIn"> <h2 class="pt-4">We Drive <b class="text-primary-light">You </b> Home in <b class="text-primary-light">Your Car </b></h2> <p class="mt-5"> Instant quotes, simple booking, competitive pricing. DesiDrivers gives you options when you are out with your car. </p> <p class="mt-5"> <a href="#instant" class="btn btn-primary mr-2 mb-2 page-scroll">Get Quote</a> <a href="#download" class="btn btn-white mb-2 page-scroll">Download App</a> </p> </div> </div> </div> </section> <!--features--> <section class="bg-faded" id="features"> <div class="container"> <div class="row mb-3"> <div class="col-md-6 offset-md-3 col-sm-8 offset-sm-2 col-xs-12 text-center wow fadeIn"> <h2 class="text-primary">How it Works!</h2> <p class="lead mt-4"> The DesiDrivers app allows you to simply<br/>book a driver to get you home<br>in your own car. </p> </div> </div> <div class="row mt-5 text-center"> <div class="col-md-4 wow fadeIn"> <div class="card"> <div class="card-block"> <div class="icon-box"> <em class="ion-beer icon-md"></em> </div> <h6>Had too much?</h6> <p> If you have your car and you are about to have more to drink than will keep your BAC below 0.05, start thinking about booking your DesiDriver. </p> </div> </div> </div> <div class="col-md-4 wow fadeIn"> <div class="card"> <div class="card-block"> <div class="icon-box"> <em class="ion-ios-pint-outline icon-md"></em> </div> <h6>Last drinks is called</h6> <p> When you know your not far off finishing, book your driver. Check the app for lead times. </p> </div> </div> </div> <div class="col-md-4 wow fadeIn"> <div class="card"> <div class="card-block"> <div class="icon-box"> <em class="ion-iphone icon-md"></em> </div> <h6>Check the ETA</h6> <p> Once a driver is en route you will receive a notification. You can then track them, see their ETA and get their contact details if needed. </p> </div> </div> </div> <div class="col-md-4 wow fadeIn"> <div class="card"> <div class="card-block"> <div class="icon-box"> <em class="ion-key icon-md"></em> </div> <h6>Hand over the keys</h6> <p> Once your driver arrives accompany them to your car and hand over the keys. The driver will take you home in your car! </p> </div> </div> </div> <div class="col-md-4 wow fadeIn"> <div class="card"> <div class="card-block"> <div class="icon-box"> <em class="ion-model-s icon-md"></em> </div> <h6>Your Car, Your Style!</h6> <p> Your phone is already synced to the stereo, your jumper is in the back, you may even have a bevvy stashed away somewhere. Its your car! </p> </div> </div> </div> <div class="col-md-4 wow fadeIn"> <div class="card"> <div class="card-block"> <div class="icon-box"> <em class="ion-ios-home icon-md"></em> </div> <h6>Arrive Home</h6> <p> The driver parks your car in your driveway or garage, hands you the keys and away they go. Payment is taken care of unless you need to pay with a different method. </p> </div> </div> </div> </div> </div> </section> <section class="bg-alt p-0"> <div class="container-fluid"> <div class="row d-md-flex mt-5"> <div class="col-sm-6 p-0 wow fadeInLeft"> <img class="img-fluid" src="desis/img/product2.jpg" alt="Gallery"> </div> <div class="col-sm-6 pl-5 pr-5 pt-5 pb-4 wow fadeInRight"> <h3><a href="#">Why get a designated driver?</a></h3> <p class="lead pt-4">Not every situation calls for one, but here are some of the common reasons why!</p> <ul class="pt-4 pb-3 list-default"> <li>You weren't expecting to drink but you're having too much fun!</li> <li>You can't leave your car on the street or in the car park.</li> <li>You really need your car the next day.</li> <li>You have your kids with you and prefer they have their own car seats on the way home.</li> <li>You have a car full of valuables, like band instruments or wedding presents.</li> <li>You want to do errands around town before you end up at the party.</li> <li>You need a boat towed or an animal transported.</li> </ul> <a href="#download" class="btn btn-primary mr-2 page-scroll">Download the App now!</a> </div> </div> </div> </section> <!--pricing--> <section class="bg-faded" id="pricing"> <div class="container"> <div class="row"> <div class="col-md-6 offset-md-3 col-sm-8 offset-sm-2 col-xs-12 text-center"> <h2 class="text-primary">Pricing</h2> <p class="lead pt-3"> Our no-nonsense pricing. </p> </div> </div> <div class="row d-md-flex text-center "> <div class="col-sm-4 mt-4 wow fadeIn"> <div class="card"> <div class="card-block"> <h5 class="card-title pt-4 text-orange">Standard Insured</h5> <h3 class="card-title text-primary pt-4">$39 + $2.50/km</h3> <p class="card-text text-muted pb-3 border-bottom">all times</p> <ul class="list-unstyled pricing-list"> <li>Driver insured to drive your car</li> <li>Bookings Secured</li> <li>Book for any time 24/7</li> <li>Callouts guaranteed from 8am - 1am</li> </ul> <a href="#instant" class="btn btn-primary btn-radius">Get a quote</a> </div> </div> </div> <div class="col-sm-4 mt-4 wow fadeIn"> <div class="card "> <div class="card-block"> <h5 class="card-title pt-4 text-orange">Uninsured Driver<small class="badge bg-primary small-xs">Popular</small></h5> <h3 class="card-title text-primary pt-4">Uber fare x 2</h3> <p class="card-text text-muted pb-3 border-bottom">4pm-12pm</p> <ul class="list-unstyled pricing-list"> <li>Lowest price designated driver</li> <li>Flexible booking times</li> <li>Available between 4pm and 12am daily</li> <li>All care, no responsibility</li> </ul> <a href="#instant" class="btn btn-primary btn-radius">Get a quote</a> </div> </div> </div> <div class="col-sm-4 mt-4 wow fadeIn"> <div class="card" id="instant"> <div class="card-block"> <h5 class="card-title pt-4 text-orange">Instant Quote</h5> <form class="" role="search"> <div class="row"> <div class="col-xs-24 col-md-12"> <input type="text" id="pickup" autocomplete="off" required class="form-control" placeholder="Pickup Address"> </div> </div> <div class="row" style="margin-top: 10px; margin-bottom: 10px;"> <div class="col-xs-24 col-md-12"> <input type="text" id="dropoff" autocomplete="off" required class="form-control" placeholder="Drop Off Address"> </div> </div> <div class="row" style="margin-top: 10px col-md-6"> <div class="col-xs-24 col-md-12"> <div id="map"></div> </div> </div> <div class="row"> <div class="col-xs-24 col-md-12"> <p> Uninsured Driver service available within the blue line border <table> <tr> <td>Standard Insured</h3></td><td width="100px"><span id="totalPrice"><strong>0</strong></span></td></tr> <td>Uninsured Driver</h3></td><td><span id="totalPrice2"><strong>0</strong></span></td></tr> </table> </p> </div> </div> </form> </div> </div> </div> </div> </div> </div> </section> <!--download--> <section class="bg-orange pt-0" id="download"> <div class="container"> <div class="row d-md-flex text-center wow fadeIn"> <div class="col-md-6 offset-md-3 col-sm-10 offset-sm-1 col-xs-12"> <h5 style="margin-top:20px;" class="text-primary">Download Our Mobile App</h5> <p class="mt-4"> Available now for FREE on both Apple App Store and Google Play Store. </p> <p class="mt-5"> <a href="https://play.google.com/store/apps/details?id=com.homekey.android&rdid=com.homekey.android" class="mr-2"><img src="desis/img/google-play.png" class="store-img bottom-image"/></a> <a href="https://itunes.apple.com/us/app/homekey/id1289132742?ls=1&mt=8"><img src="desis/img/apple_store.png" class="store-img"/> </a> </p> </div> </div> </div> </section> <!--blog--> <section class="bg-faded" id="blog"> <div class="container"> <div class="row"> <div class="col-md-6 offset-md-3 col-sm-8 offset-sm-2 col-xs-12 text-center"> <h2 class="text-primary">From Our Blog</h2> <p class="lead pt-3"> The latest DesiDrivers staff musings. </p> </div> </div> <div class="row d-md-flex mt-5"> <div class="col-sm-4 mt-2 wow fadeIn"> <div class="card"> <img class="card-img-top" src="desis/img/blog-1.jpg" alt="Image"> <div class="card-block"> <p class="card-text text-muted small-xl"> <em class="ion-ios-calendar-outline"></em> 1d ago <em class="ion-ios-person-outline"></em> Lewis Cann <em class="ion-ios-time-outline"></em> 5min read </p> <h5 class="card-title"><a href="#">Driving hungover is just as risky as drink driving.</a></h5> <p class="card-text">A UK study has found participants that had been drinking the night before but still had a BAC of 0.00 were just as impaired in a driving simulator as participants that were over BAC 0.05.</p> </div> <div class="card-block text-right"> <a href="desis/blog_hangover.php" class="card-link"><strong>Read more</strong></a> </div> </div> </div> <div class="col-sm-4 mt-2 wow fadeIn"> <div class="card"> <img class="card-img-top" src="desis/img/blog-2.jpg" alt="Image"> <div class="card-block"> <p class="card-text text-muted small-xl"> <em class="ion-ios-calendar-outline"></em> 1week ago <em class="ion-ios-person-outline"></em> DesiDrivers Staff <em class="ion-ios-time-outline"></em> 2min read </p> <h5 class="card-title"><a href="#">Frequently Asked Questions</a></h5> <p class="card-text">There are always many question when you try a new service, even more when you've had a few drinks! Our staff compile our most frequently asked questions.</p> </div> <div class="card-block text-right"> <a href="desis/blog_faq.php" class="card-link"><strong>Read more</strong></a> </div> </div> </div> <div class="col-sm-4 mt-2 wow fadeIn"> <div class="card"> <img class="card-img-top" src="desis/img/blog-3.jpg" alt="Image"> <div class="card-block"> <p class="card-text text-muted small-xl"> <em class="ion-ios-calendar-outline"></em> 1mon ago <em class="ion-ios-person-outline"></em> Lewis Cann <em class="ion-ios-time-outline"></em> 3min read </p> <h5 class="card-title"><a href="#">DesiDriver beginnings.</a></h5> <p class="card-text">A designated driver is a new concept for alot of people, but it has a long history and the founders of DesiDrivers started their first designated driver service 7 years ago in Perth.</p> </div> <div class="card-block text-right"> <a href="desis/blog_homekey.php" class="card-link"><strong>Read more</strong></a> </div> </div> </div> </div> </div> </section> <!--contact--> <section class="bg-texture-collage p-0" id="contact"> <div class="container"> <div class="row d-md-flex text-white text-center wow fadeIn"> <div class="col-sm-4 p-5"> <p><em class="ion-ios-telephone-outline icon-md"></em></p> <p class="lead">+61 413 774 931</p> </div> <div class="col-sm-4 p-5"> <p><em class="ion-ios-email-outline icon-md"></em></p> <p class="lead">info@desidrivers.net.au</p> </div> <div class="col-sm-4 p-5"> <p><em class="ion-ios-location-outline icon-md"></em></p> <p class="lead">Perth, Australia</p> </div> </div> </div> </section> <!--footer--> <section class="bg-footer" id="connect"> <div class="container"> <div class="row"> <div class="col-md-6 offset-md-3 col-sm-8 offset-sm-2 col-xs-12 text-center wow fadeIn"> <h1>DESIDRIVERS</h1> <p class="mt-4"> <a href="https://twitter.com/" target="_blank"><em class="ion-social-twitter text-twitter-alt icon-sm mr-3"></em></a> <a href="https://www.facebook.com/homekeydrivers/" target="_blank"><em class="ion-social-github text-facebook-alt icon-sm mr-3"></em></a> <a href="https://www.linkedin.com/" target="_blank"><em class="ion-social-linkedin text-linkedin-alt icon-sm mr-3"></em></a> <a href="https://plus.google.com/" target="_blank"><em class="ion-social-googleplus text-google-alt icon-sm mr-3"></em></a> </p> <p class="pt-2 text-muted"> © 2019 DesiDrivers. A Business from Sober Drivers Pty Ltd, </p> </div> </div> </div> </section> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script type="text/javascript"> map = null ; pickUp = null ; dropOff = null; directionsDisplay = null ; directionsService = null ; homekey = null; homekeyPoly = null; pickup_homekey = null; dropoff_homekey = null; $('#dropoff').on('blur',function(){ // initMap(); }); $('#pickup').on('click',function(){ // initMap(); }); function initMap() { if(map == null) { map = new google.maps.Map(document.getElementById('map'), { zoom: 10, 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(directionsDisplay != null) directionsDisplay.setDirections({routes: []}); directionsService = new google.maps.DirectionsService; directionsDisplay = new google.maps.DirectionsRenderer; directionsDisplay.setMap(map); calculateAndDisplayRoute(directionsService, directionsDisplay); distance(); // $homekeyCoords = [ // {lat: -31.855442, lng: 115.744506}, // {lat: -31.860540, lng: 115.917884}, // {lat: -31.919324, lng: 115.927814}, // {lat: -31.929517, lng: 115.991890}, // {lat: -31.987697, lng: 115.987427}, // {lat: -32.034053, lng: 115.967858}, // {lat: -32.096166, lng: 115.850785}, // {lat: -32.091726, lng: 115.732167} // ]; var homekeyCoords = unpackLatlng(<?=$homekeyCoords ?>); homekeyPoly = new google.maps.Polygon({ paths: homekeyCoords, strokeColor: '#0000FF', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.1 }); console.log(<?=$zone1Coords ?>); var zone1Coords = unpackLatlng(<?=$zone1Coords ?>); zone1Poly = new google.maps.Polygon({ paths: zone1Coords, strokeColor: '#00FF00', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#00FF00', fillOpacity: 0.1 }); var zone2Coords = unpackLatlng(<?=$zone2Coords ?>); var paths = []; zone2Poly = new google.maps.Polygon({ paths: zone2Coords, strokeColor: '#0000FF', strokeOpacity: 0.8, strokeWeight: 1, fillColor: '#0000FF', fillOpacity: 0.1 }); homekeyPoly.setMap(map); //zone1Poly.setMap(map); //zone2Poly.setMap(map); } function unpackLatlng(latlngarray) { var paths = []; for (var i = 0; i < latlngarray.length; i++) { paths.push(new google.maps.LatLng(latlngarray[i][0], latlngarray[i][1])); } console.dir(paths); return paths } 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}); if(google.maps.geometry.poly.containsLocation(results[0].geometry.location, homekeyPoly) == true) { homekey_pickup = true; } else { homekey_dropoff = false } } }); } 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}); if(google.maps.geometry.poly.containsLocation(results[0].geometry.location, homekeyPoly) == true) { homekey_dropoff = true; } else { homekey_dropoff = false; } } }); } function calculateAndDisplayRoute(directionsService, directionsDisplay) { directionsService.route({ origin: document.getElementById('pickup').value, destination: document.getElementById('dropoff').value, travelMode: google.maps.TravelMode.DRIVING }, function(response, status) { if (status === google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } 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() { homekeyPoly.setMap(null); 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() { homekeyPoly.setMap(null); initMap(); }); initMap(); } function distance() { var pickup = $('#pickup').val(); var dropoff = $('#dropoff').val(); var dataString = 'point1=' + pickup + "&point2=" + dropoff; $.ajax({ type: "POST", url: "desis/11.php", data: {pickup: pickup, dropoff: dropoff}, dataType: 'json', success: function (data) { console.log(data.distance); console.log(data.time); var distance = data.distance; var journey_time = data.time; $('#totalPrice').text( '$' + parseFloat(Math.ceil(( ( distance.split(" ")[0].replace("," , "") ) * 2.0) + 25 + ( journey_time.split(" ")[0].replace("mins" , "") ) * 1 )).toFixed(2)); $('#totalPrice2').text("Out of area"); if(homekey_pickup == true && homekey_dropoff == true) { var homekeyquote = Math.ceil(( ( distance.split(" ")[0].replace("," , "") ) * 1.7) + 15 + ( journey_time.split(" ")[0].replace("mins" , "") ) * 1 ); $('#totalPrice2').text('$' + parseFloat(homekeyquote).toFixed(2)) ; } else { } } }); } function isNumber(obj) { return !isNaN(parseFloat(obj)) } </script> <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.js"></script> <script src="desis/js/scripts.js"></script> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDUMedFP8nXhHL-T54w37TPhj4oj0dl-6c&libraries=places,geometry&callback=initAutocomplete" async defer></script> </body> </html>
Save
cmd:
run