D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
u193541357
/
domains
/
racysanitaryware.com
/
public_html
/
1
/
dev
/
Filename :
collection-inner.php
back
Copy
<?php include('header.php'); include('db.php'); if (isset($_GET['category_id']) && !empty($_GET['category_id'])) { $category_id = $_GET['category_id']; $stmt = $conn->prepare("SELECT category_name, banner_image, category_description FROM categories WHERE id = ?"); $stmt->bind_param("i", $category_id); $stmt->execute(); $stmt->bind_result($category_name, $banner_image, $category_description); $stmt->fetch(); $stmt->close(); $products = []; $stmt1 = $conn->prepare("SELECT id, product_name, product_image FROM products WHERE category_id = ? AND status = 1"); $stmt1->bind_param("i", $category_id); $stmt1->execute(); $stmt1->bind_result($id, $product_name, $product_image); while ($stmt1->fetch()) { $products[] = [ 'product_id' => $id, 'product_name' => $product_name, 'product_image' => $product_image ]; } $stmt1->close(); } ?> <div class="blog-hero"> <div class="container"> <div class="blog-hero-layout"> <div class="blog-hero-title"> <h1 class="heading is-blog-hero-title hauora-font"><?php echo htmlspecialchars($category_name); ?></h1> </div> <div class="blog-hero-image"> <div class="scrolling-animation"> <div class="image-3d-parallax"> <div data-w-id="401f123e-d2b1-e517-289c-dc1a04c08d0a" class="image-overlay-colors"></div> <div class="_3d-block for-image"> <div class="_3d-trigger for-image"> <div class="image-animation-trigger"> <div class="parallax-animation"> <div class="animation-color-background"></div><img src="admin/<?php echo htmlspecialchars($banner_image); ?>" alt="<?php echo htmlspecialchars($category_name); ?>" class="cover-image is-parallax"> </div> </div> </div> </div> </div> </div> </div> <div class="vertical-flex with-gap-4em is-align-center"> <p class="article-description-title hauora-font"><?php echo htmlspecialchars($category_description); ?></p> </div> </div> </div> <div class="gradient-backgrounds"> <div class="gradient-background-1"></div> </div> </div> <section class="section"> <div class="container"> <div class="padding"> <div class="about-grid"> <?php if (!empty($products)): ?> <?php foreach ($products as $product): ?> <div id="w-node-_9190d6ce-3f5a-d9a9-b18e-fc9dac3d57ca-2a16a2ca" class="about-grid-block"> <a href="product-inner.php?product_id=<?php echo htmlspecialchars($product['product_id']); ?>"> <div class="about-grid-image"> <div class="image-3d-parallax"> <div data-w-id="401f123e-d2b1-e517-289c-dc1a04c08d0a" class="image-overlay-colors"></div> <div class="_3d-block for-image"> <div class="_3d-trigger for-image"> <div class="image-animation-trigger"> <div class="parallax-animation"> <div class="animation-color-background"></div> <img src="admin/<?php echo htmlspecialchars($product['product_image']); ?>" alt="" class="cover-image is-parallax"> </div> </div> </div> </div> </div> </div> <h4 class="heading product-heading"><?php echo htmlspecialchars($product['product_name']); ?></h4> </a> </div> <?php endforeach; ?> <?php else: ?> <p class="no-products">No products available right now.</p> <?php endif; ?> </div> </div> </div> </section> <?php include('footer.php'); ?>