hjkhhjhjol;io;ioio;ioiio;ioreererereio;;iooi;i;o;oii;o;ioo;iio;oi;
bnmbnmbnmnbmbio;io;irererereeo;o;oi;;oi;oioi;oi;oio;;oovn
/
home
/
u174022924
/
domains
/
rockonwheelstravels.in
/
public_html
/
Upload FileeE
HOME
<!DOCTYPE html> <html lang="en" style="overflow-x: hidden;"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Local Rental Result - Rock On Wheels Travels</title> <?php include "include/header.php"; $origin = $_POST['o']; $destination = $_POST['d']; $pickup_date = $_POST['pickup_date']; $pickup_time = $_POST['pickup_time']; ?> <style> .bg-banner { background: url(images/select_cab.jpg) no-repeat; background-size: cover; width: 100%; position: relative; } </style> <section class="same-section-spacing bg-banner"> <div class="container"> <div class="row"> <div class="col-lg-12"> <div class="banner-box"> <h2></h2> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="index">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Select Cabs</li> </ol> <h2 style="text-align: center; ">Select Cabs</h2> <hr id="hr3"> </nav> </div> </div> </div> </div> </section> <div class="wrapperhead bg-head pb-1"> <div class="container-fluid head-out fixed-top sticky-top bg-white"> <div class="secondPageSearchBar bg-secPageNavForm " style="margin-bottom:-15px!important; margin-left:-15px; margin-right:-15px; "> <div class="container-fluid"> <div class="row text-white secondPageSearchBarA navbar-collapse tab-content" id="secondPageSearchBarid" style="margin-bottom: -15px; "> <div class="tab-pane container-fluid active" id="rental"> <form method="POST" action=""> <div class="form-group mt-2 mb-2 pl-2 bg-lighttrans col-12 col-sm-6"> <div class="bg-transparent text-white border-0 pl-0 f-mFormIB" name="source" id="rental_source"><strong style="color:#ed1b24;">FROM - </strong> <?php echo $origin; ?> <br><strong style="color:#ed1b24;"> TO - </strong> <?php echo $destination; ?></div> </div> <div class="form-group mt-2 mb-2 pl-2 bg-lighttrans col-6 col-sm-2"> <label for="rental_pickupdate" class="label-font text-colorSecPageNavFormLabel p-b">Pick Up Date:</label></br> <div class="bg-transparent text-white border-0 pl-0 f-mFormIB" name="pickup_date" id="rental_pickupdate"><?php echo $pickup_date; ?></div> </div> <div class="form-group mt-2 mb-2 pl-2 bg-lighttrans col-6 col-sm-2"> <label for="rental_pickupdate" class="label-font text-colorSecPageNavFormLabel p-b">Pick Up Time:</label></br> <div class="bg-transparent text-white border-0 pl-0 f-mFormIB" name="pickup_time" id="rental_pickupdate"><?php echo $pickup_time; ?></div> </div> <div class="form-group mt-2 mb-2 pl-2 bg-lighttrans col-6 col-sm-2"> <button type="button" class=" editbutton btn btn-primary " style="background: #000; height: 43.4px; width: 90px;border-color: #ed1b24;" data-toggle="modal" data-backdrop="false" data-target="#myModal">Modify</button> </div> </form> </div> </div> </div> </div> </div> </div> <div class="wrapperhead bg-head py-3"> <div class="head-out bg-white"> <div class="secondPageSearchBar bg-secPageNavForm " style="margin-left:-15px;margin-right:-15px;"> <div class=""> <div class="row text-white secondPageSearchBarA navbar-collapse head2-remove tab-content" id="secondPageSearchBarid" style=""> <div class="modal fade" id="myModal" role="dialog" style="z-index: 10000;margin-top:70px;"> <div class="modal-dialog"> <div class="modal-content"> <!-- Modal content--> <div class=""> <button type="button" class="close" style="font-size:29px;margin-right:10px;" data-dismiss="modal">×</button> </div> <div class=""> <div class="col-lg-12 roundedbox p-0" style="background-color: #ffffff;margin:0px;"> <button style="display:none;" class="tablink " onclick="openPage('Outstation', this, '#61b134')" id="defaultOpen"><span><i class="fa fa-car" aria-hidden="true"></i></span> Outstation</button> <div id="Outstation" class="tabcontent2"> <div class="col-lg-12"> <form class="m-0 rentalPage mainForm" method="POST" action="local-rental-result"> <div class="row px-2 ui-widget"> <div class="firstInputSection bg-white w-100"> <div class="form-group col-12 col-md-12 p-0 border-bottom mb-2 text-center"> <label style="color:#000 !important">ONE WAY</label> </div> <div class="form-group col-12 col-md-12 p-0 border-bottom mb-0 border-bottom"> <div class="col-md-3 col-4 "> <label for="sources" class="small pt-3 px-3 mb-0 text-dark">From:</label> </div> <div class="col-md-9 col-8"> <input required type="text" style="font-size: 14px;" class="form-control form-control-lg inp-m rounded-0 h-100 bg-transparent my-2 f-mFormIB" placeholder="Start Typing City" id="autocomplete" name="o" value="<?php echo $origin; ?>"> </div> </div> <input type="hidden" name="lat" id="lat"> <input type="hidden" name="long" id="long"> <div class="form-group col-12 col-md-12 p-0 border-bottom mb-0 border-xx-right-0 border-radius-xx-right border-bottom" id="desti1"> <div class="col-md-3 col-4"> <label for="desti" class="small pt-3 px-3 mb-0 text-dark">To:</label> </div> <div class="col-md-9 col-8 "> <input required type="text" style="font-size: 14px;" class="form-control form-control-lg inp-m rounded-0 h-100 bg-transparent my-2 f-mFormIB" placeholder="Start Typing City" id="autocomplete102" name="d" value="<?php echo $destination; ?>"> </div> </div> <div class="form-group col-12 col-md-6 p-0 mb-0 border-bottom border-radius-xx-left border-bottom"> <div class="col-md-12 col-4"> <label for="" class="small pt-3 px-3 mb-0 text-dark">Pick Up:</label></div> <div class="col-md-12 col-8 "> <input type="date" style="font-size: 14px; padding: 6px 12px;" required class="date form-control form-control-lg inp-m h-100 bg-transparent my-2 f-mFormIB" placeholder="Pickup Date" min="<?php echo date('Y-m-d'); ?>" id="out_pick_date" name="pickup_date" value="<?php echo $pickup_date; ?>"> </div> </div> <div class="form-group col-12 col-md-6 p-0 mb-0 border-bottom" style="border-radius: 0 6px 6px 0;"> <div class="col-md-12 col-4"> <label for="" class="small pt-3 px-3 mb-0 text-dark">Pick At:</label></div> <div class="col-md-12 col-8 "> <select class="form-control form-control-lg inp-m h-100 bg-transparent my-2 f-mFormIB" style="font-size: 14px;" name="pickup_time" id="time" placeholder="Time" required> <option value="<?php echo $pickup_time; ?>" id="first_opt"><?php echo $pickup_time; ?></option> <?php $q = "select * from time_slots"; $query = mysqli_query($db,$q); while($time = mysqli_fetch_array($query)) { $start = strtotime($time['opening_time']); $end = strtotime($time['closing_time']); $timeSlot = $time['time_slot']; for ($i=$start; $i<$end; $i = $i + $timeSlot*60){ $timeFrom = date('h:i A',$i); $timeTo = date('h:i A',strtotime('+'.$timeSlot.'minutes',strtotime($timeFrom))); ?> <?php date_default_timezone_set('Asia/Kolkata'); $timestamp = strtotime(date('H:i')) + 360*60; $currentTime = strtotime(date('h:i A', $timestamp)); if($currentTime <= strtotime($timeFrom)){ ?> <option value="<?php echo $timeFrom; ?>" style="display:none;" class="time1"><?php echo $timeFrom; ?></option> <?php } ?> <option value="<?php echo $timeFrom; ?>" class="time2" style="display:none;"><?php echo $timeFrom; ?></option> <?php } } ?> </select> </div> </div> </div> </div> <div class="row"> <div class="form-group col-12 p-0 m-0 text-center "> <label for="" class="small sr-only">Submit:</label> <input type="submit" class="btn btn-theme border-0 placeholder-font1 mt-auto py-2 px-5 mt-3 " name="submit" style="margin-top: 20px! important;margin-bottom: -25px;background-color: #ed1b24;color: #ffffff;height: 45px;font-weight: bold;" value="SELECT CAR" /> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div> <!-- ===========not working cities===================== --> <?php $show = "SELECT * FROM not_working_cities"; $result = $db->query($show); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $state[] = $row; } } foreach ($state as $cities) { $city_exclude = $cities['city']; if (preg_match("/{$city_exclude}/i", $origin) || preg_match("/{$city_exclude}/i", $destination)) { $match = 'true'; } } ?> <?php if ($match == 'true') { ?> <div class="text-center"> <img src="images/empty.gif" class="img-fluid" alt="img" style="height: 400px;"> <h3>Service not Available in this City</h3> <p>Please try a valid search</p> </div> <style> .bg-background, .bannerimage, #display_hide { display: none; } </style> <?php } ?> <!-- ===========not working cities===================== --> <!--cab type--> <?php $origin = $_POST['o']; $destination = $_POST['d']; $pickup_date = $_POST['pickup_date']; $pickup_time = $_POST['pickup_time']; $lat = $_POST['lat']; $long = $_POST['long']; $api = file_get_contents("https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=" . urlencode($origin) . "&destinations=" . urlencode($destination) . "&key=".$google_key); $datas = json_decode($api); $distances = round(((int)$datas->rows[0]->elements[0]->distance->value / 1000)); $distance=$distances; // if ($distances>=250) { // $distance=$distances; // }else{ // $distance=250; // } $time = $datas->rows[0]->elements[0]->duration->text; $sql2 = "SELECT * FROM cab_types"; // $sql = "SELECT rentalcar.*, cab_types.* FROM rentalcar INNER JOIN cab_types ON rentalcar.id=cab_types.id"; // print_r($origin); $search_hisar = 'Hisar'; if (preg_match("/{$search_hisar}/i", $origin)) { $origin_hisar = 'Hisar, Haryana, India'; } $search = 'Hisar'; if (preg_match("/{$search}/i", $destination)) { $hisar_destination = 'Hisar, Haryana, India'; } $result2 = mysqli_query($db, $sql2); $from_hisar = mysqli_query($db, "SELECT * FROM `no_return_cities` WHERE city ='$origin_hisar'"); $from_hisar = mysqli_fetch_assoc($from_hisar); $Checker = $from_hisar['city']; $price_km = $from_hisar['price_km']; if ($price_km==0) { $price_km = $from_hisar['low_price']; } $sql3 = mysqli_query($db, "SELECT * FROM `no_return_cities` WHERE city ='$hisar_destination'"); $sql3 = mysqli_fetch_assoc($sql3); $destination_hisar = $sql3['city']; $hisar_price_km = $sql3['price_km']; if ($hisar_price_km==0) { $hisar_price_km = $sql3['low_price']; } $sql = "SELECT * FROM `no_return_cities` "; $result = mysqli_query($db, $sql); // echo $result->num_rows; $cab_type_id=array(); $cab_type_ids=array(); //Cab_Names (ARRAY) $match_city_price=array(); //Cab_Price (ARRAY) while ($city = mysqli_fetch_array($result)){ $priceNew=$city['price_km']; if ($priceNew==0) { $priceNew=-$city['low_price']; } $check = $city['city']; $city_check = explode(":", $check); if (preg_match("/{$city_check[0]}/i", $origin) && preg_match("/{$city_check[1]}/i", $destination)) { $temp_array=explode(",", $city['cab_type_id']); foreach ($temp_array as $key) { array_push($cab_type_ids, $key); } for ($i=0; $i < count($temp_array); $i++) array_push($match_city_price, $priceNew); } } ?> <div class="tab-pane container-fluid active" id="rental"> <div class="" id="display_hide"> <div class="row"> <?php while ($row2 = mysqli_fetch_array($result2)) { ?> <?php // distance fare $distance_fare = mysqli_query($db, "SELECT * FROM distance_fare INNER JOIN distance_fare_cab ON distance_fare.id=distance_fare_cab.distance_fare_id WHERE km_from<=".$distance." AND km_to>=".$distance." AND cab_typeid='".$row2['id']."'"); if(mysqli_num_rows($distance_fare)){ $distance_fare_price = mysqli_fetch_assoc($distance_fare); // print_r($distance_fare_price); }else{ $distance_fare_price = 0; } // distance fare if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); $price_rs = $rate = ($row2['price'] + $match_city_price[$pos]) * $distance; } else { $price_rs = $rate = $row2['price'] * $distance; } ?> <div class="col-md-3 col-12 mt-4"> <form method="POST" action="./one-way-booking"> <input type="hidden" name="distance" value="<?php echo $distance; ?>" /> <input type="hidden" name="time" value="<?php echo $time; ?>" /> <input type="hidden" name="o" value="<?php echo $origin; ?>" /> <input type="hidden" name="d" value="<?php echo $destination; ?>" /> <input type="hidden" name="pickup_date" value="<?php echo $pickup_date; ?>" /> <input type="hidden" name="pickup_time" value="<?php echo $pickup_time; ?>" /> <input type="hidden" name="dis" value="<?php echo round($distances); ?>" /> <input type="hidden" name="time" value="<?php echo $time; ?>" /> <input type="hidden" name="lat" value="<?php echo $lat; ?>" /> <input type="hidden" name="long" value="<?php echo $long; ?>" /> <input type="hidden" name="extra_km" value="<?php echo $row2['extra_afterkms']?>" /> <input type="hidden" name="rate" value="<?php if ($distance_fare_price==0) { if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); echo round($rate = ($row2['price'] + $match_city_price[$pos]) * $distance, 2); } else { echo round($rate = $row2['price'] * $distance, 2); } } else{ if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); echo round($rate = ($distance_fare_price['price'] + $match_city_price[$pos]) * $distance, 2); } else { echo round($distance_fare_price['price']*$distance,2); } } ?>" /> <div class="card card-blog shadow text-center"> <div class="card-image"> <img class="img img-raised car-image w-75" src="admin/<?php echo $row2['img'] ?>" alt="<?php echo $row2['type']; ?>"> </div> <div class="card-body pt-1"> <h4 class="margin-price"> <span class="font-weight-bold text-danger" style="font-size:16px;"> <?php if ($distance_fare_price==0) { if ($row2['extra_price'] != 0) { ?> <span class=""><s><?php if ($row2['extra_price'] != 0) { if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); $price_rs_extra=$rate = ($row2['extra_price'] + $match_city_price[$pos]) * $distance; echo '₹' . number_format($price_rs_extra, 2); } else { $price_rs_extra=$rate = $row2['extra_price'] * $distance; echo '₹' . number_format($price_rs_extra, 2); } } else { echo ''; } ?></s> <?php $res1=$price_rs/$price_rs_extra*100; $off=100-$res1; if ($off > 0) { echo '<strong class="pl-2">(' . number_format($off, 2) . '% off)</strong>'; } else { echo ''; } ?> </span> <?php } }else{ ?> <span class=""><s><?php if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); $price_rs_extra=$rate = ($distance_fare_price['extra_price'] + $match_city_price[$pos]) * $distance; echo '₹' . number_format($price_rs_extra, 2); } else { $price_rs_extra=$rate = $distance_fare_price['extra_price'] * $distance; echo '₹' . number_format($price_rs_extra, 2); } ?></s> <?php $res1=$distance_fare_price['price']/$distance_fare_price['extra_price']*100; $off=100-$res1; if ($off > 0) { echo '<strong class="pl-2">(' . number_format($off, 2) . '% off)</strong>'; } else { echo ''; } ?> </span> <?php } ?> <br> <span class="font-weight-bold theme_color"> ₹ <?php if ($distance_fare_price==0) { if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); echo number_format($rate = ($row2['price'] + $match_city_price[$pos]) * $distance, 2); } else { echo number_format($rate = $row2['price'] * $distance, 2); } }else{ if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); echo number_format($rate = ($distance_fare_price['price'] + $match_city_price[$pos]) * $distance, 2); } else { echo number_format($distance_fare_price['price']*$distance,2); } } ?> </span> </h4> <h6 class="card-category font-weight-bold text-uppercase text-dark" style="text-transform: uppercase;"><?php echo $row2['type']; ?></h6> <div class="row"> <div class="col-md-12"> <ul> <li> <p class="include_tax my-0"><i class="fa fa-check"></i> <span class="text-danger">Free Cancellation</span> till 4 hours of departure.</p> </li> <li> <p class="include_tax my-0"><i class="fa fa-check"></i> 100% Verified Drivers.</p> </li> <li> <p class="text-success my-0 include_tax"><i class="fa fa-check"></i> Best Price Guaranteed.</p> </li> <li> <p class="include_tax my-0"><i class="fa fa-check"></i> <?php echo (round($distances)); ?> km Included</p> </li> <li> <p class="text-danger my-0 include_tax"><i class="fa fa-check"></i> <?php if ($distance_fare_price==0) { echo $row2['extra_afterkms']; }else{ echo $distance_fare_price['extra_price']; } ?>/Km After <?php echo round($distances); ?> Kms.</p> </li> </ul> </div> <div class="col-md-12"> <button type="submit" class="btn custom-btn w-100" name="cab_cat_id" value="<?php echo $row2['id']; ?>">SELECT</button> </div> </div> </div> </div> </form> </div> <?php } ?> </div> </div> </div> </div> </div> </div> </div> <!--search form--> <!-- try --> <style> .pac-container { z-index: 10000 !important; } </style> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<?=$google_key?>&libraries=places"></script> <script> function initialize() { var options = { types: "cities", componentRestrictions: { country: "ind" }, }; var input = document.getElementById("autocomplete"); var autocomplete = new google.maps.places.Autocomplete(input, options); var input = document.getElementById("autocomplete102"); var autocomplete102 = new google.maps.places.Autocomplete(input, options); google.maps.event.addListener(autocomplete102, "place_changed", function() { var one_way = autocomplete102.getPlace(); // document.getElementById('city2').value = place.name; document.getElementById("lat").value = one_way.geometry.location.lat(); document.getElementById("long").value = one_way.geometry.location.lng(); }); } google.maps.event.addDomListener(window, "load", initialize); // ================one way=================== function oneway(e) { var type = 'One Way'; $.ajax({ url: 'ajax-db-search', type: 'POST', data: { city: e, type: type, }, success: function(data) { console.log(data); $('#onewaycity2').html(data); } }); } $(".date").on('change', function() { var selectdate = $(this).val(); var minDate = $(this).attr('min'); if (minDate != selectdate) { $(".time2").show(); $(".time1").hide(); $("#first_opt").html('Select Pick Up Time'); } else { $(".time1").show(); $(".time2").hide(); $("#first_opt").html('Select Pick Up Time');; } }); </script> <?php include "include/footer.php" ?>