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
/
includes
/
Upload File:
files >> /home/apca/www/includes/header.php
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet"> <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/js/all.min.js"></script> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet"> <style> a{ text-decoration: none; } .nav-link a{ font-weight: bold !important; } </style> <?php if(basename($_SERVER['PHP_SELF'])=="page.php"){ $pagetype = $_GET['type']; $sql = "SELECT * FROM tblpages WHERE type = :pagetype"; $query = $dbh->prepare($sql); $query->bindParam(':pagetype', $pagetype, PDO::PARAM_STR); $query->execute(); $results = $query->fetchAll(PDO::FETCH_ASSOC); // <-- fetch as associative array } if(basename($_SERVER['PHP_SELF'])=="product-details.php"){ $pagetype = $_GET['phid']; $sql = "SELECT * FROM tblproducts WHERE id = :pagetype"; $query = $dbh->prepare($sql); $query->bindParam(':pagetype', $pagetype, PDO::PARAM_STR); $query->execute(); $results = $query->fetchAll(PDO::FETCH_ASSOC); // <-- fetch as associative array } if(basename($_SERVER['PHP_SELF'])=="vehical-details.php"){ $pagetype = $_GET['vhid']; $sql = "SELECT * FROM tblvehicles WHERE id = :pagetype"; $query = $dbh->prepare($sql); $query->bindParam(':pagetype', $pagetype, PDO::PARAM_STR); $query->execute(); $results = $query->fetchAll(PDO::FETCH_ASSOC); // <-- fetch as associative array } if(basename($_SERVER['PHP_SELF'])=="viewblog.php"){ $pagetype = $_GET['blog_id']; $sql = "SELECT * FROM c_blogs WHERE blog_id = :pagetype"; $query = $dbh->prepare($sql); $query->bindParam(':pagetype', $pagetype, PDO::PARAM_STR); $query->execute(); $results = $query->fetchAll(PDO::FETCH_ASSOC); // <-- fetch as associative array } $metaTitle=$results[0]['metaTitle']; $metaDesc=$results[0]['metaDescription']; $mTitle=($mTitle)? $mTitle : "Alpenpass.ca Motorcycle Rentals | $pageName "; $metaTitle=($metaTitle)? $metaTitle : $mTitle; $metaDesc = ($mDescription)? $mDescription : $metaDesc; ?> <title><?php echo $metaTitle; ?></title> <meta name="description" content="<?php echo $metaDesc; ?>" > </head> <body> <header> <div class="container py-3"> <div class="row align-items-center"> <!-- Logo Section --> <div class="col-12 col-md-2 text-center text-md-start"> <a href="index.php"> <img src="assets/images/Logo_AlpenPass-250.png" alt="Logo" style="height:150px;"> </a> </div> <!-- Contact Section --> <div class="col-12 col-md-10 text-center text-md-end"> <?php // Fetch contact details from the database $sql = "SELECT EmailId, ContactNo FROM tblcontactusinfo"; $query = $dbh->prepare($sql); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); foreach ($results as $result) { $email = $result->EmailId; $contactno = $result->ContactNo; } ?> <p class="mb-0"> <i class="fa fa-phone"></i> Booking Helpline Call Us: <a href="tel:<?php echo htmlentities($contactno); ?>"> <?php echo htmlentities($contactno); ?> </a> <a href="tel:18007997449"> or +1 800-799-7449 </a> <?php require_once('includes/config.php'); // Get user ID from session $user_id = $_SESSION['id'] ?? null; $cart_count = 0; // Default to 0 if ($user_id) { // Query to get the total number of items in the cart $stmt = $dbh->prepare("SELECT SUM(quantity) as total_items FROM cart WHERE user_id = :user_id"); $stmt->execute([':user_id' => $user_id]); $result = $stmt->fetch(PDO::FETCH_ASSOC); $cart_count = $result['total_items'] ?? 0; $stmt2 = $dbh->prepare("SELECT count(user_id) as rental_total_items FROM rental_cart WHERE user_id = :user_id"); $stmt2->execute([':user_id' => $user_id]); $result2 = $stmt2->fetch(PDO::FETCH_ASSOC); $rental_cart_count = $result2['rental_total_items'] ?? 0; } ?> <!-- Cart Icon with Count --> <div style="margin-top: 20px;"> <?php if ($rental_cart_count > 0){ ?> <a href="rental_cart.php" class="cart-link" style="position: relative; text-decoration: none; color: black; font-weight: bold;"> <br /><br /> <i class="fas fa-shopping-cart" style="font-size: 18px;"></i> Rental <div class="cart-badge" style="width: 25px; margin-right: -25px; margin-top: 30px;"><?php echo $rental_cart_count; ?></div> <?php } ?> <?php if ($cart_count > 0){ ?> <a href="cart.php" class="cart-link" style="position: relative; text-decoration: none; color: black; font-weight: bold;"> <br /><br /> <i class="fas fa-shopping-cart" style="font-size: 18px;"></i> Product<div class="cart-badge" style="width: 25px; margin-right: -25px; margin-top: 30px;"><?php echo $cart_count; ?></div> <?php } ?> </a> <!-- Cart Badge Styling --> <style> .cart-badge { position: absolute; top: -8px; right: -10px; background: red; color: white; font-size: 12px; font-weight: bold; border-radius: 50%; padding: 4px 8px; } </style> </div> </p> <?php if($_GET['message'] AND strlen($_SESSION['login'])<4){?> <div style="display: inline !important; margin-right: 100px; background-color: #CCFFCC; padding:10px 30px; border-radius: 20px; font-size: 18px"><?php echo $_GET['message']; ?></div> <?php } ?> <?php if (strlen($_SESSION['login']) == 0): ?> <a href="#loginform" class="btn btn-primary btn-md mt-2" data-bs-toggle="modal">Login / Register</a> <?php endif; ?> </div> </div> </div> <!-- Navigation Bar --> <nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="container"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav ms-auto"> <li class="nav-item"> <a class="nav-link active" href="index.php" style="font-weight:bold; padding: 20px 15px;">Home</a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false" style="font-weight:bold; padding: 20px 15px;"> About Us </a> <ul class="dropdown-menu" aria-labelledby="userDropdown"> <a class="dropdown-item" href="aboutus" >About Us</a> <li><a class="dropdown-item" href="https://alpenpass.ca/careers">Careers</a></li> <a class="dropdown-item" href="privacy" >Privacy Policy</a> <a class="dropdown-item" href="terms" >Terms of Use</a> <li><a class="dropdown-item" href="https://alpenpass.ca/faqs">FAQs</a></li> </ul> </li> <li class="nav-item"> <a class="nav-link" href="listing.php" style="font-weight:bold; padding: 20px 15px;">Motorcycles</a> </li> <li class="nav-item"> <a class="nav-link" href="tour_listing.php" style="font-weight:bold; padding: 20px 15px;">Tours</a> </li> <li class="nav-item"> <a class="nav-link" href="concierge" style="font-weight:bold; padding: 20px 15px;">Concierge</a> </li> <li class="nav-item"> <a class="nav-link" href="product_listing.php" style="font-weight:bold; padding: 20px 15px;">Products</a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false" style="font-weight:bold; padding: 20px 15px;"> Blog </a> <ul class="dropdown-menu" aria-labelledby="userDropdown"> <a class="dropdown-item" href="blog.php" >Blog</a> <li><a class="dropdown-item" href="https://alpenpass.ca/blog?cat_id=2">Routes</a></li> </ul> </li> <li class="nav-item"> <a class="nav-link" href="gallery.php" style="font-weight:bold; padding: 20px 15px;">Gallery</a> </li> <li class="nav-item"> <a class="nav-link" href="contact-us.php" style="font-weight:bold; padding: 20px 15px;">Contact Us</a> </li> <?php if ($_SESSION['login']): ?> <li class="nav-item dropdown"> <?php $email = $_SESSION['login']; $sql = "SELECT FullName FROM tblusers WHERE EmailId=:email"; $query = $dbh->prepare($sql); $query->bindParam(':email', $email, PDO::PARAM_STR); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); if ($query->rowCount() > 0) { foreach ($results as $result) { $fullName = htmlentities($result->FullName); } } ?> <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false" style="font-weight:bold; padding: 20px 15px;"> <?php echo $fullName; ?> </a> <ul class="dropdown-menu" aria-labelledby="userDropdown"> <li><a class="dropdown-item" href="profile.php">Profile Settings</a></li> <li><a class="dropdown-item" href="update-password.php">Update Password</a></li> <li><a class="dropdown-item" href="my-booking.php">My Bookings</a></li> <li><a class="dropdown-item" href="post-testimonial.php">Post a Testimonial</a></li> <li><a class="dropdown-item" href="my-testimonials.php">My Testimonial</a></li> <li><a class="dropdown-item" href="logout.php">Sign Out</a></li> </ul> </li> <?php endif; ?> </ul> </div> </div> </nav> </header>