Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('db.php');
- ?>
- <!doctype html>
- <html class="no-js" lang="zxx">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <title>Booking | Odyssey</title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- <link rel="manifest" href="site.webmanifest"> -->
- <!-- Place favicon.ico in the root directory -->
- <!-- CSS here -->
- <link rel="stylesheet" href="css/bootstrap.min.css">
- <link rel="stylesheet" href="css/owl.carousel.min.css">
- <link rel="stylesheet" href="css/magnific-popup.css">
- <link rel="stylesheet" href="css/font-awesome.min.css">
- <link rel="stylesheet" href="css/themify-icons.css">
- <link rel="stylesheet" href="css/nice-select.css">
- <link rel="stylesheet" href="css/flaticon.css">
- <link rel="stylesheet" href="css/gijgo.css">
- <link rel="stylesheet" href="css/animate.css">
- <link rel="stylesheet" href="css/slick.css">
- <link rel="stylesheet" href="css/slicknav.css">
- <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css">
- <link rel="stylesheet" href="css/style.css">
- <!-- <link rel="stylesheet" href="css/responsive.css"> -->
- </head>
- <body>
- <header>
- <div class="header-area ">
- <div id="sticky-header" class="main-header-area">
- <div class="container-fluid">
- <div class="header_bottom_border">
- <div class="row align-items-center">
- <div class="col-xl-6 col-lg-6">
- <div class="main-menu d-none d-lg-block">
- <nav>
- <ul id="navigation">
- <li><img src="img/logotransparent.png" width="150" height="50"></li>
- <li><a class="active" href="index.html">home</a></li>
- <li><a class="" href="travel_destination.html">Destinations</a></l/li>
- <li><a href="mainbookingpage.php">Bookings</a></li>
- <li><a href="about.html">About Us</a></li>
- </ul>
- </nav>
- </div>
- </div>
- <div class="col-xl-6 col-lg-6">
- <div class="main-menu d-flex align-items-center justify-content-end">
- <nav>
- <ul id="navigation">
- <li><a href="login.html">Login</a></li>
- <a href="signup.html" class="genric-btn primary circle">Sign-Up</a>
- </ul>
- </nav>
- </div>
- </div>
- <div class="col-12">
- <div class="mobile_menu d-block d-lg-none"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </header>
- <!-- header-end -->
- <div class="sidebar1 checkout-text bold-text">
- <?php
- $conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT * FROM destination";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- echo '<a href="#' . strtolower($row["name"]) . '">•<span>' . $row["name"] . "</span></a>";
- }
- }
- $conn->close();
- ?>
- </div>
- <?php
- $conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "SELECT * FROM destination";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- echo '<div class="header"><br>';
- echo '<div class="modal-center">';
- echo '<br>';
- echo '<h1 id="'. strtolower($row["name"]) .'">' . $row["name"] . "</h1>";
- echo '</div>';
- echo '</div>';
- echo '<br>';
- echo '<br>';
- $products = $conn->query("SELECT * FROM product WHERE destinationId=" . $row['id']);
- if ($products->num_rows > 0) {
- while($productRow = $products->fetch_assoc()) {
- $product_images = $conn->query("SELECT * FROM product_images WHERE productId=" . $productRow["id"]);
- if ($product_images->num_rows > 0) {
- $images = array();
- while($imageRow = $product_images->fetch_assoc()) {
- array_push($images, $imageRow);
- }
- echo '<div class="container-booking">';
- echo '<form name="item" class="row" method="POST" action="checkout.php">';
- echo '<div class="col-4">';
- echo '<div class="row">';
- echo '<img src="' . $images[0]["path"] . '"/><br>';
- echo '</div>';
- echo '<div class="row">';
- echo '<center>';
- echo '<br>';
- echo '<img class="col-3" src="'. $images[1]['path'] .'"/>';
- echo '<img class="col-3" src="'. $images[2]['path'] .'"/>';
- echo '<img class="col-3" src="'. $images[3]['path'] .'"/>';
- echo '</div>';
- echo '<div class="row">';
- echo '<center>';
- echo '<br>';
- echo '<img class="col-3" src="'. $images[4]['path'] .'"/>';
- echo '<img class="col-3" src="'. $images[5]['path'] .'"/>';
- echo '<img class="col-3" src="'. $images[6]['path'] .'"/>';
- echo '</div>';
- echo '</div>';
- echo '<div class="col-8">';
- echo '<div class="row">';
- echo '<h3>' . $productRow["name"] . "</h3>";
- echo '</div>';
- echo '<div class="row">';
- echo '<p>' . $productRow["description"] . "</p>";
- echo '</div>';
- echo '<br>';
- echo '<div class="row">';
- echo '<div class="col-5 ticket-info">';
- echo '<div class="form-group row">';
- echo '<label for="datetime-booking-date" style="color:black" class="col-6 col-form-label">Booking Date</label>';
- echo '<div class="col-6">';
- echo '<input class="form-control" type="date" name="date" id="date-booking-date" required>';
- echo '</div>';
- echo '</div>';
- echo '<div class="form-group row">';
- echo '<label for="book-quantity" style="color:black" class="col-6 col-form-label">Quantity</label>';
- echo '<div class="col-6">';
- echo '<input class="form-control" type="number" name="quantity" min="0" max="20" id="book-quantity" required>';
- echo '</div>';
- echo '</div>';
- echo '</div>';
- echo '<div class="col-3"></div>';
- echo '<div class="col-4">';
- echo '<div class="row col-12">';
- echo '<h2>₱ ' . $productRow["price"] . "</h2>";
- echo '</div>';
- echo '<div class="row">';
- echo '<input type="submit" class="selector col-5 btn-design1" value="Add to cart"/>';
- echo '<div class="col-1"></div>';
- echo '<button type="button" class="selector col-5 btn-design">Book now</button>';
- echo '</div>';
- echo '</div>';
- echo '</div>';
- echo '</div>';
- echo '<input type="hidden" name="id" value="'. $productRow["id"] .'">';
- echo '</form>';
- echo '</div>';
- echo '<br>';
- echo '<br>';
- }
- }
- }
- }
- }
- $conn->close();
- ?>
- <script>
- if ( window.history.replaceState ) {
- window.history.replaceState( null, null, window.location.href );
- }
- $(document).ready(function () {
- $('sidebar1 > a')
- .click(function (e) {
- $('sidebar1 > a')
- .removeClass('active');
- $(this).addClass('active');
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement