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
:
/
home2
/
apca
/
www
/
Upload File:
files >> //home2/apca/www/rental_cart.php
<?php session_start(); include('includes/config.php'); if (!isset($_SESSION['login'])) { header("Location: index2.php?message=Please Log In To View Cart"); die; } $user_id = $_SESSION['id']; // Using email as user_id $stmt = $dbh->prepare("SELECT * FROM rental_cart WHERE user_id = :user_id"); $stmt->bindParam(':user_id', $user_id, PDO::PARAM_STR); $stmt->execute(); $cart_items = $stmt->fetchAll(PDO::FETCH_ASSOC); $head.=" <style> .imageBox{ height: 450px; overflow:hidden; } .imageStyle{ width: 100%; object-fit: cover; min-height: 450px; } #rateList .currency{ text-align:right; } #rateList td{ font-weight: bold; } .fr{ text-align: right; padding-right: 20px; } .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 */ } .tableCurrency{ text-align:right; padding-right: 10px; } .currencyRow{ text-align:center; } </style> <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css\"> "; include("includes/head.php"); include("includes/header.php"); ?> <div class="container"> <div class="row justify-content-center"> <div class="col-sm-12"> <br /><br /> <title>Rental Cart</title> <div class="container mt-4"> <h2>Your Rental Cart</h2> <table class="table table-bordered"> <thead> <tr> <th>Vehicle</th> <th>Dates</th> <th>Rate Description</th> <th class="currencyRow">Rate<br />Amount</th> <th class="currencyRow">Insurance</th> <?php // <th class="currencyRow">Security<br />Deposit</th> ?> <th class="currencyRow">Total</th> <th class="currencyRow">Action</th> </tr> </thead> <tbody> <?php $grand_total=0; foreach ($cart_items as $item){ $total=0; ?> <tr> <td><?php echo htmlentities($item['vehicle_name']); ?></td> <td style="font-size: 12px;"><?php echo date("F d, Y - g:i A", strtotime($item['from_date'])); ?> to <?php echo date("F d, Y - g:i A", strtotime($item['to_date'])); ?><br />Booking Number: <?php echo $item['booking_no']?> </td> <td style="font-size: 12px;"><?php echo $item['rate_name']; ?></td> <td class="tableCurrency"><?php echo number_format($item['amount_charged'], 2); ?></td> <td class="tableCurrency"><?php echo number_format($item['insurance_fee'], 2); ?></td> <?php // <td class="tableCurrency"><?php echo number_format($item['security_deposit'], 2); ?></td> ?> <?php $total=$item['amount_charged']+$item['insurance_fee']; //+$item['security_deposit']; ?> <td class="tableCurrency"><?php echo number_format($total, 2); ?></td> <?php $grand_total+=$total; // $grand_total_deposit+=$item['security_deposit']; ?> <td> <a href="remove_rental.php?id=<?php echo $item['id']; ?>" class="btn btn-danger btn-sm">Remove</a> </td> </tr> <?php } ?> <tr><td colspan="3"> </td><td colspan="2">Subtotal: </td><td class="fr tableCurrency"><?php echo number_format($grand_total,2); ?></td><td> </td></tr> <?php $taxable_total=$grand_total; //-$grand_total_deposit; ?> <tr><td colspan="3"> </td><td colspan="2">GST on: <?php echo number_format($taxable_total,2); ?><br /><!--<div style="font-size: 11px; line-height:10px;">Total less deposit</div>--></td><td class="fr tableCurrency"><?php echo number_format(($taxable_total*.05),2); ?></td><td> </td></tr> <tr><td colspan="3"> </td><td colspan="2">PST on: <?php echo number_format($taxable_total,2); ?><br /><!--<div style="font-size: 11px; line-height:10px;">Total less deposit</div>--></td><td class="fr tableCurrency"><?php echo number_format(($taxable_total*.07),2); ?></td><td> </td></tr> <?php $afterTaxTotal=$grand_total+($taxable_total*.05)+($taxable_total*.07); ?> <tr><td colspan="3"> </td><td colspan="2"><strong>Total Due</strong></td><td class="fr tableCurrency"><strong><?php echo number_format($afterTaxTotal,2); ?></strong></td><td style="font-size: 12px; text-align:center;">Canadian<br />Dollars</td></tr> </table> <a href="rental_checkout.php" class="btn btn-primary" style="float: right; border: none;">Proceed to Checkout</a><br /><br /><br /><br /><br /><br /> </div> </div> </div> </div> <!--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> </body> </html>