BLACKSITE
:
216.73.217.4
:
104.37.75.190 / alpenpass.ca
:
Linux server3.pointsplan.com 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
:
/
home
/
apca
/
www
/
Upload File:
files >> /home/apca/www/vehical-details.php
<?php session_start(); require_once('includes/config.php'); $head.=" <style> .imageBox{ height: 450px; overflow:hidden; } .imageStyle{ width: 100%; object-fit: cover; height: 450px; min-height: 450px; max-width:99vw; object-position: center bottom; } @media (max-width:767px) { .imageStyle{ width: 100%; object-fit: cover; min-height: 250px; max-width:99vw; } .imageBox{ height: 250px; } } #rateList .currency{ text-align:right; } #rateList td{ font-weight: bold; } .error-message { color: red; font-size: 0.9em; margin-top: 5px; display: none; position: relative; /* changed from absolute to relative */ } .form-group { position: relative; margin-bottom: 20px; } .form-group.has-error { margin-bottom: 40px; /* Increase margin when error is shown */ } </style>"; include("includes/head.php"); include("includes/header.php"); $vhid=intval($_GET['vhid']); $sql = "SELECT tblvehicles.*,tblbrands.BrandName,tblbrands.id as bid from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand where tblvehicles.id=:vhid"; $query = $dbh -> prepare($sql); $query->bindParam(':vhid',$vhid, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $result) { $_SESSION['brndid']=$result->bid; ?> <section id="listing_img_slider"> <div class="imageBox" ><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>" class="img-responsive imageStyle" alt="image" ></div> <div class="imageBox" ><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage2);?>" class="img-responsive imageStyle" alt="image" ></div> <div class="imageBox" ><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage3);?>" class="img-responsive imageStyle" alt="image" ></div> <div class="imageBox" ><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage4);?>" class="img-responsive imageStyle" alt="image" ></div> <?php if($result->Vimage5=="") { } else { ?> <div class="imageBox" ><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage5);?>" class="img-responsive imageStyle" alt="image" style="object-fit: cover; min-height: 450px;"></div> <?php } ?> </section> <!--/Listing-Image-Slider--> <!--Listing-detail--> <section class="listing-detail"> <div class="container" style="width:90vw !important;"> <?php if($rateName){ ?> <div style="padding: 50px; text-align:center; border-radius: 20px; background-color: #FFFF99;"><?php echo $rateName; ?></div></div> <?php } ?> <div class="listing_detail_head row"> <div class="col-md-9"> <h1><?php $vehicleName= htmlentities($result->BrandName)." ".htmlentities($result->VehiclesTitle); echo $vehicleName ?></h1> </div> </div> <div class="row"> <div class="col-md-9"> <div class="main_features"> <ul> <li> <i class="fa fa-calendar" aria-hidden="true"></i> <p>Year</p> <h5><?php echo htmlentities($result->ModelYear);?></h5> </li> <li> <i class="fa fa-cogs" aria-hidden="true"></i> <p>Engine</p> <h5><?php echo htmlentities($result->EngineCapacity);?></h5> </li> <li> <i class="fa fa-motorcycle" aria-hidden="true"></i> <p>Horsepower</p> <h5><?php echo htmlentities($result->horsepower);?></h5> </li> <li> <i class="fa fa-user-plus" aria-hidden="true"></i> <p>Licence Requied</p> <h5><?php echo htmlentities($result->LicenseType);?></h5> </li> </ul> </div> <div class="listing_more_info"> <div class="listing_detail_wrap"> <!-- Nav tabs --> <ul class="nav nav-tabs gray-bg" role="tablist"> <li role="presentation" class="active"><a href="#vehicle-overview " aria-controls="vehicle-overview" role="tab" data-toggle="tab">Vehicle Overview </a></li> <li role="presentation"><a href="#accessories" aria-controls="accessories" role="tab" data-toggle="tab">Specifications</a></li> </ul> <!-- Tab panes --> <div class="tab-content"> <!-- vehicle-overview --> <div role="tabpanel" class="tab-pane active" id="vehicle-overview"> <?php echo $result->VehiclesOverview;?> </div> <!-- Accessories --> <div role="tabpanel" class="tab-pane" id="accessories"> <!--Accessories--> <table> <thead> <tr> <th colspan="2">Specifications</th> </tr> </thead> <tbody> <tr> <?php $specs=array("VehiclesTitle", "VehiclesBrand", "EngineType", "ModelYear", "EngineCapacity", "GasTankCapacity", "Range1", "horsepower", "transmission", "Usage1", "Passenger", "LicenseType", "Weight", "RiderExperience", "ABS", "model"); foreach($specs as $value){ ?> <td><?php echo trim(ucwords(preg_replace('/(?<!^)([A-Z])/', ' \\1', $value)),"1");?></td> <td><?php echo $result->$value; ?></i></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> <?php }} ?> </div> <!--Side-Bar--> <aside class="col-md-3"> <div class="price_info"> <form method="post" action="add-to-rental-cart.php"> <input type="hidden" name="vehicleName" value="<?php echo $vehicleName;?>"/><input type="hidden" name="vehicleID" value="<?php echo $result->id?>"/> <table id="rateList"> <th colspan="3" style="background-color: #000; font-size:24px; color:#fff;">RATES</th> <tr> <?php $rateList=array("hourly", "two_hours", "four_hours", "all_day", "twentyfour_hours", "two_to_nine_days", "ten_days_plus", "seasonal_discount","security_deposit" ); foreach($rateList as $rate){ if(!$result->seasonal_discount){continue;} $percentSymbol=($rate=="seasonal_discount" AND $result->seasonal_discount>0)? "%" : ""; // $chooseRate=($rate=="seasonal_discount" AND $result->seasonal_discount>0)? "" : "<input type='radio' name='bookingRate' value='".$result->$rate."' required >"; if($result->$rate<>"0.01"){ $addAsterisk=($rate=='all_day')? " **" : ""; echo"<td>".ucwords(str_replace("_"," ",preg_replace('/(?<!^)([A-Z])/', ' \\1', $rate)))."$addAsterisk</td><td class='currency'>$".number_format($result->$rate,2)."$percentSymbol </td></tr>"; } } ?> </table> <p>** Return before we close<br />Insurance and Deposit are extra<br /><strong>All prices in Canadian Dollars</strong></p> </div> <?php /** <div class="share_vehicle"> <p>Share: <a href="#"><i class="fa fa-facebook-square" aria-hidden="true"></i></a> <a href="#"><i class="fa fa-twitter-square" aria-hidden="true"></i></a> <a href="#"><i class="fa fa-linkedin-square" aria-hidden="true"></i></a> <a href="#"><i class="fa fa-google-plus-square" aria-hidden="true"></i></a> </p> </div> */ ?> <div class="sidebar_widget"> <div class="widget_heading"> <h1><i class="fa fa-envelope" aria-hidden="true"></i>Book Now</h1> </div> <?php if($_SESSION['login']){ ?> <div class="form-group"> <label>Pickup Date and Time:</label> <input type="datetime-local" class="form-control" id="pickupDateTime" name="fromdate" required> <div class="error-message" id="pickupError">Pickup date and time must be earlier than the dropoff date and time.</div> </div> <div class="form-group"> <label>Dropoff Date and Time:</label> <input type="datetime-local" class="form-control" id="dropoffDateTime" name="todate" required> <div class="error-message" id="dropoffError">Dropoff date and time must be later than the pickup date and time.</div> </div> <?php } // <div class="form-group"> // <textarea rows="4" class="form-control" name="message" placeholder="Message" required></textarea> // </div> ?> <?php if($_SESSION['login']) {?> <div class="form-group"> <input type="submit" class="btn btn-md" name="submit" value="Book Now"> </div> <?php } else { ?> <a href="#loginform" class="btn btn-md uppercase" data-toggle="modal" data-dismiss="modal" style="font-size: 14px !important;">Login or Create Account to Book</a> <?php } ?> </form> </div> </aside> <!--/Side-Bar--> </div> <div class="space-20"></div> <div class="divider"></div> <!--Similar-Motorcycles--> <div class="similar_cars"> <h3>Similar Vehicles</h3> <div class="row"> <?php $bid=$_SESSION['brndid']; $sql="SELECT tblvehicles.VehiclesTitle,tblbrands.BrandName,tblvehicles.all_day,tblvehicles.LicenseType,tblvehicles.ModelYear,tblvehicles.Passenger,tblvehicles.id,tblvehicles.EngineCapacity,tblvehicles.VehiclesOverview,tblvehicles.Vimage1 from tblvehicles join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand where tblvehicles.VehiclesBrand=:bid AND tblvehicles.status='Active' LIMIT 4"; $query = $dbh -> prepare($sql); $query->bindParam(':bid',$bid, PDO::PARAM_STR); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $result) { ?> <div class="col-md-3 grid_listing"> <div class="product-listing-m gray-bg"> <div class="product-listing-img"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>" class="img-responsive" alt="image" style="width:100%; height:100%; object-fit: cover; overflow: hidden;"/> </a> </div> <div class="product-listing-content"> <h5><a href="vehical-details.php?vhid=<?php echo htmlentities($result->id);?>"><?php echo htmlentities($result->BrandName);?> <?php echo htmlentities($result->VehiclesTitle);?></a></h5> <p class="list-price"><span style="font-size: 12px; font-weight:normal;">From </span>$<?php echo htmlentities($result->all_day);?><span style="font-size: 12px; font-weight:normal;"> Day Rate</span></p> <ul class="features_list"> <li><i class="fa fa-user" aria-hidden="true"></i> Passenger: <?php echo htmlentities($result->Passenger);?></li> <li><i class="fa fa-calendar" aria-hidden="true"></i> <?php echo htmlentities($result->ModelYear);?> Model</li> <li style="width: 100% !important;"><i class="fa fa-motorcycle" aria-hidden="true"></i> Engine:<?php echo htmlentities($result->EngineCapacity);?></li> </ul> </div> </div> </div> <?php }} ?> </div> </div> <!--/Similar-Motorcycles--> </div> </section> <!--/Listing-detail--> <!--Footer --> <?php include('includes/footer.php');?> <!-- /Footer--> <!--Back to top--> <div id="back-top" class="back-top"> <a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i> </a> </div> <!--/Back to top--> <!--Login-Form --> <?php include('includes/login.php');?> <!--/Login-Form --> <!--Register-Form --> <?php include('includes/registration.php');?> <!--/Register-Form --> <!--Forgot-password-Form --> <?php include('includes/forgotpassword.php');?> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/interface.js"></script> <script src="assets/switcher/js/switcher.js"></script> <script src="assets/js/bootstrap-slider.min.js"></script> <script src="assets/js/slick.min.js"></script> <script src="assets/js/owl.carousel.min.js"></script> <script> $(document).ready(function () { function validateDates() { const pickupDateTime = new Date($('#pickupDateTime').val()); const dropoffDateTime = new Date($('#dropoffDateTime').val()); let isValid = true; // Hide any previous error messages $('.error-message').hide(); $('.form-group').removeClass('has-error'); // Reset additional spacing // Check if the pickup date is later than the dropoff date if (pickupDateTime && dropoffDateTime && pickupDateTime > dropoffDateTime) { $('#pickupError').show(); // Show error message near pickup date $('#pickupGroup').addClass('has-error'); // Add spacing to avoid overlap isValid = false; } return isValid; } $('#pickupDateTime, #dropoffDateTime').on('change', validateDates); $('#rentalForm').on('submit', function (e) { if (!validateDates()) { e.preventDefault(); // Prevent form submission if dates are invalid } }); }); </script> </body> </html>