Server IP : 103.53.40.154 / Your IP : 13.58.200.16 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(); ?> <!doctype html> <html class="no-js" lang="zxx"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php include "top-links.php"; ?> <title> Rajwada House </title> <meta name="description" content="Rajwada House"> </head> <body> <div id="main-wrapper"> <?php include "header.php"; ?> <!-- Page Banner Section Start --> <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>Search</h1> <ul class="page-breadcrumb"> <li><a href="index.html">Home</a></li> <li>Search</li> </ul> </div> </div> </div> </div> </div> <!-- Page Banner Section End --> <div class="shop-section section"> <div class="container"> <div class="row"> <div class="col-12"> <div class="shop-area sb-border pb-70 pb-lg-50 pb-md-40 pb-sm-20 pb-xs-20"> <div class="row"> <div class="col-lg-12"> <div class="row"> <div class="col-12"> <div class="shop-product"> <div id="myTabContent-2" class="tab-content"> <div id="grid" class="tab-pane fade active show" role="tabpanel"> <div class="product-grid-view"> <div class="row"> <?php if(isset($_POST['search'])) { $prodsearch = $_POST['prodsearch']; $sqlprod = "SELECT * FROM `tbl_services` WHERE `tour_status`='Active' AND name LIKE '%$prodsearch%'"; $runprod = mysqli_query($db, $sqlprod) or die("Query Not run"); if(mysqli_num_rows($runprod) > 0) { while ($dataprod = mysqli_fetch_assoc($runprod)) { ?> <div class="col-lg-3 col-md-6 col-sm-6"> <!-- Single Grid product Start --> <div class="single-grid-product mb-40"> <div class="product-image"> <div class="product-label"> <?php $sale_price = $dataprod["mrp"]; // Sale price $actual_price = isset($dataprod["price"]) ? $dataprod["price"] : null; // Check if actual price is set if ($actual_price && $sale_price > 0) { // Calculate discount percentage $discount_percentage = (($sale_price - $actual_price) / $sale_price) * 100; // Ensure discount percentage is not negative and within reasonable limits if ($discount_percentage < 0) { $discount_percentage = 0; } } else { $discount_percentage = 0; // Set discount to 0% if price is not available } ?> <?php if ($discount_percentage > 0): ?> <span class="sale">-<?php echo number_format($discount_percentage, 0); ?>%</span> <?php endif; ?> <span class="new">New</span> </div> <a href="<?php echo $wspath ?>product<?php echo $dataprod['slug_url']; ?>.html"> <img src="<?php echo $wspath; ?>admin/images/property-image/<?php echo $dataprod['image']; ?>" class="img-fluid" alt="<?php echo $datadt["name"]; ?>" title="<?php echo $datadt["name"]; ?>"> <img src="<?php echo $wspath; ?>admin/images/property-image/<?php echo $dataprod['image']; ?>" class="img-fluid" alt="<?php echo $datadt["name"]; ?>" title="<?php echo $datadt["name"]; ?>"> </a> </div> <div class="product-content"> <div class="new-add"> <form action="<?php echo $wspath; ?>add-cart.php" method="POST"> <!-- Hidden Inputs to Pass Product Data --> <input name="sr_no" value="<?php echo $dataprod['id'] ?>" type="hidden"> <input name="name" value="<?php echo $dataprod['name'] ?>" type="hidden"> <input name="price" value="<?php echo $dataprod['price'] ?>" type="hidden"> <input name="image" value="admin/images/property-image/<?php echo $dataprod['image'] ?>" type="hidden"> <input name="quantity" value="1" type="hidden"> <!-- Submit Button --> <button type="submit" name="add_product"> <i class="fa fa-shopping-bag" aria-hidden="true"></i> ADD TO CART </button> </form> <?php session_start(); if (isset($_SESSION['user'])) { $user_id = $_SESSION['user']['cus_id']; $pro_id = $dataprod['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="action_link " > <i class="fa fa-heart" aria-hidden="true"></i> </button> </form>'; } else { echo ' <a href="login.html" class="action_link " > <i class="fa fa-heart" aria-hidden="true"></i> </a>'; } ?> </div> <h3 class="title pt-10"> <a href="<?php echo $wspath ?>product<?php echo $dataprod['slug_url']; ?>.html"> <?php echo $dataprod["name"]; ?> </a> </h3> <p class="product-price"> <span class="discounted-price">₹<?php echo $dataprod['price']; ?></span> <?php if(!empty($dataprod['mrp'])): ?> <span class="main-price discounted">₹<?php echo $dataprod['mrp']; ?></span> <?php endif; ?> </p> </div> </div> <!-- Single Grid product End --> </div> <?php } } else { echo'<h3 class="title pt-10">No Product Found</h3>'; } } else{ ?> <?php $sqlprod = "SELECT * FROM `tbl_services` WHERE `tour_status`='Active' ORDER BY id DESC LIMIT 16"; $runprod = mysqli_query($db, $sqlprod) or die("Query Not run"); while ($dataprod = mysqli_fetch_assoc($runprod)) { ?> <div class="col-lg-3 col-md-6 col-sm-6"> <!-- Single Grid product Start --> <div class="single-grid-product mb-40"> <div class="product-image"> <div class="product-label"> <?php $sale_price = $dataprod["mrp"]; // Sale price $actual_price = isset($dataprod["price"]) ? $dataprod["price"] : null; // Check if actual price is set if ($actual_price && $sale_price > 0) { // Calculate discount percentage $discount_percentage = (($sale_price - $actual_price) / $sale_price) * 100; // Ensure discount percentage is not negative and within reasonable limits if ($discount_percentage < 0) { $discount_percentage = 0; } } else { $discount_percentage = 0; // Set discount to 0% if price is not available } ?> <?php if ($discount_percentage > 0): ?> <span class="sale">-<?php echo number_format($discount_percentage, 0); ?>%</span> <?php endif; ?> <span class="new">New</span> </div> <a href="<?php echo $wspath ?>product<?php echo $dataprod['slug_url']; ?>.html"> <img src="<?php echo $wspath; ?>admin/images/property-image/<?php echo $dataprod['image']; ?>" class="img-fluid" alt="<?php echo $datadt["name"]; ?>" title="<?php echo $datadt["name"]; ?>"> <img src="<?php echo $wspath; ?>admin/images/property-image/<?php echo $dataprod['image']; ?>" class="img-fluid" alt="<?php echo $datadt["name"]; ?>" title="<?php echo $datadt["name"]; ?>"> </a> </div> <div class="product-content"> <div class="new-add"> <form action="<?php echo $wspath; ?>add-cart.php" method="POST"> <!-- Hidden Inputs to Pass Product Data --> <input name="sr_no" value="<?php echo $dataprod['id'] ?>" type="hidden"> <input name="name" value="<?php echo $dataprod['name'] ?>" type="hidden"> <input name="price" value="<?php echo $dataprod['price'] ?>" type="hidden"> <input name="image" value="admin/images/property-image/<?php echo $dataprod['image'] ?>" type="hidden"> <input name="quantity" value="1" type="hidden"> <!-- Submit Button --> <button type="submit" name="add_product"> <i class="fa fa-shopping-bag" aria-hidden="true"></i> ADD TO CART </button> </form> <?php session_start(); if (isset($_SESSION['user'])) { $user_id = $_SESSION['user']['cus_id']; $pro_id = $dataprod['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="action_link " > <i class="fa fa-heart" aria-hidden="true"></i> </button> </form>'; } else { echo ' <a href="login.html" class="action_link " > <i class="fa fa-heart" aria-hidden="true"></i> </a>'; } ?> </div> <h3 class="title pt-10"> <a href="<?php echo $wspath ?>product<?php echo $dataprod['slug_url']; ?>.html"> <?php echo $dataprod["name"]; ?> </a> </h3> <p class="product-price"> <span class="discounted-price">₹<?php echo $dataprod['price']; ?></span> <?php if(!empty($dataprod['mrp'])): ?> <span class="main-price discounted">₹<?php echo $dataprod['mrp']; ?></span> <?php endif; ?> </p> </div> </div> </div> <?php } } ?> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <?php include "footer.php"; ?> </div> </body> </html>