📁 File Manager
Editing:
/home/wedigitalindia/public_html/demo.wedigitalindia.com/bbhealthy.in/shop.php
<!DOCTYPE html> <html lang="en"> <head> <?php include_once("assets/include/head.php")?> </head> <?php // $topc=$_GET['top']; $midc1=$_GET['slug']; $midc=str_replace("/","",$midc1); // if (str_contains($midc1, '/')) { // echo "asdds"; // } // echo $midc; // exit; // $tc=mysqli_query($con,"SELECT * FROM tbl_top_category where slug='$topc'"); // $tr=mysqli_fetch_array($tc); // $tid=$tr['tcat_id']; $mc=mysqli_query($con,"SELECT * FROM tbl_mid_category where slug='$midc'"); if(mysqli_num_rows($mc) > 0){ $mr=mysqli_fetch_array($mc); $mcid=$mr['mcat_id']; $content_mid = $mr['content']; } else{ ?> <script language="javascript" type="text/javascript"> // alert("Your message has been send successfully"); window.location.href="<?php path();?>/404.php"; </script> <?php } ?> <body> <div id="main"> <?php include_once("assets/include/header.php")?> <!-- sub-banner started... --> <section class="breadcrumb-area"> <!--<picture>--> <!-- <source media="(min-width: 768px)" srcset="<?php path() ?>/assets/images/mid-banner/<?php //echo $mr['banner']; ?>">--> <!-- <source media="(max-width: 767px)" srcset="<?php path() ?>/assets/images/mid-banner/<?php //echo $mr['cbanner']; ?>">--> <!-- <img src="#" alt="Sub Banner image">--> <!--</picture>--> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="breadcrumb-content"> <ul class="breadcrumb-links"> <li><a href="<?php echo path() ?>">Home</a></li> <li><?php echo $mr['mcat_name'];?></li> </ul> </div> </div> </div> </div> </section> <!-- sub-banner ended... --> <!-- Shop Category Area Start --> <div class="shop-category-area"> <div class="container"> <!-- Section Title Start --> <div class="row"> <div class="col-md-12"> <div class="section-title text-center"> <?php $query="SELECT * FROM tbl_product where p_is_active='1' AND mid_id='$mcid'"; // echo "SELECT * FROM tbl_product where p_is_active='1' AND mid_id='$mcid'"; $prd=mysqli_query($con,$query); if(mysqli_num_rows($prd)==0){?> <h2 class="mb-0">Products will be coming soon...</h2> <?php } else { ?> <h2 class="mb-0"><?php echo $mr['mcat_name'];?></h2> <!--<p class="mt-0">Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>--> <?php } ?> </div> </div> </div> <!-- Best Sell Slider Carousel Start --> <div class="row" style='--bs-gutter-x: .325rem'> <!-- Single Item --> <?php while($sh=mysqli_fetch_array($prd)){ $pid=$sh['p_id']; $cp=$sh['p_old_price']; $sp=$sh['p_current_price']; $dp=$cp-$sp; $discount=$dp/$cp*100; $pid=$sh['p_id']; $qty=$sh['p_qty']; ?> <div class="col-6 col-lg-4 col-xl-3 mb-3"> <article class="list-product product_data_id" data-id="<?php echo $sh['p_id']; ?>"> <div class="img-block"> <a href="<?php echo path() ?>/<?php echo $midc; ?>/<?php echo $sh['slug']; ?>" class="thumbnail"> <?php $qu=mysqli_query($con,"SELECT * FROM tbl_product_photo where p_id='$pid' limit 2 "); $i=0; while($s=mysqli_fetch_array($qu)){ $i++; ?> <img class="img-<?php echo $i; ?>" src="<?php path(); ?>/assets/images/product-image/<?php echo $s['photo']; ?>" style="height: 250px; width: 100%; object-fit: contain;" alt=""> <?php } ?> </a> </div> <ul class="product-flag"> <li class="new">New</li> </ul> <div class="product-decs"> <h2><a href="<?php echo path() ?>/<?php echo $midc; ?>/<?php echo $sh['slug']; ?>" class="product-link"><?php echo $sh['p_name']; ?> <span class="text-danger"><?php if($qty <= 0){ echo " (Out of stock)"; }?> </span></a></h2> <div class="pricing-meta"> <ul> <li class="old-price" style="font-size: 14px;">₹ <?php echo $sh['p_old_price']; ?></li> <li class="current-price" style="font-size: 14px;">₹ <?php echo $sh['p_current_price']; ?></li> <li class="discount-price" style="font-size: 14px;">-<?php echo intval($discount) ?>%</li> </ul> </div> <input class="product-quantity_val" type="hidden" name="qtybutton" readonly value="1"> <div class="add-to-link mt-3"> <?php if($qty > 0): ?> <button class="cart-btn" href="#" onclick="addCart(this)"> ADD TO CART </button> <?php else: ?> <button class="cart-btn" href="#" disabled style="opacity: .5;"> OUT OF STOCK </button> <?php endif; ?> </div> </div> </article> </div> <?php } ?> </div> <!-- Best Sells Carousel End --> <div class="mb-4 mt-4"> <p><?php echo $content_mid; ?></p> </div> </div> </div> <!-- Shop Category Area End --> <?php include_once("assets/include/footer.php")?> </div> </body> </html>
Save
Cancel