D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
u193541357
/
domains
/
racysanitaryware.com
/
public_html
/
1
/
dev
/
Filename :
product-inner.php
back
Copy
<?php include('header.php'); include('db.php'); if (isset($_GET['product_id']) && !empty($_GET['product_id'])) { $product_id = $_GET['product_id']; // $stmt = $conn->prepare("SELECT * FROM products WHERE id = ?"); $stmt = $conn->prepare(" SELECT products.*, categories.id AS category_id, categories.category_slug, categories.category_name FROM products JOIN categories ON products.category_id = categories.id WHERE products.id = ? "); $stmt->bind_param("i", $product_id); $stmt->execute(); $result = $stmt->get_result(); $product = $result->fetch_assoc(); $stmt->close(); } ?> <?php if ($product) { ?> <div class="strore-category-hero"> <div class="container"> <div class="vertical-flex with-gap-4em is-align-center"> <h1 data-w-id="604117ce-d778-cec4-207e-9cb211043898" class="heading is-strore-category-hero-title hauora-font"><?php echo htmlspecialchars($product['product_name']); ?></h1> <div class="divider"> <div class="divider-line"></div> </div> <!-- <div class="max-width-50"> <p class="paragraph is-large"><?php echo htmlspecialchars($product['product_codeno']); ?></p> </div> --> </div> </div> </div> <section id="products" class="section"> <div class="products w-dyn-list"> <div role="list" class="products-list w-dyn-items"> <div role="listitem" class="product-item w-dyn-item"> <div class="product-layout"> <div class="product-content"> <h2 class="heading is-product-title hauora-font"><?php echo htmlspecialchars($product['product_name']); ?></h2> <div class="rich-text w-richtext"> <?php if ($product['category_name']) { ?> <p class="border-bottom1 category_name">Category - <a href="collection-inner.php?category=<?= urlencode($product['category_slug']); ?>&category_id=<?= $product['id']; ?>"><?php echo htmlspecialchars($product['category_name']); ?></a></p> <?php } ?> <?php if (!empty($product['product_codeno1']) && !empty($product['product_desc1'])) { ?> <p class="border-bottom product_code"><?php echo htmlspecialchars($product['product_codeno1']); ?></p> <p class="product_desc"><?php echo htmlspecialchars($product['product_desc1']); ?></p> <?php } ?> <?php if (!empty($product['product_codeno2']) && !empty($product['product_desc2'])) { ?> <p class="border-bottom product_code"><?php echo htmlspecialchars($product['product_codeno2']); ?></p> <p class="product_desc"><?php echo htmlspecialchars($product['product_desc2']); ?></p> <?php } ?> <?php if (!empty($product['product_codeno3']) && !empty($product['product_desc3'])) { ?> <p class="border-bottom product_code"><?php echo htmlspecialchars($product['product_codeno3']); ?></p> <p class="product_desc"><?php echo htmlspecialchars($product['product_desc3']); ?></p> <?php } ?> <?php if (!empty($product['product_extra_description'])) { ?> <p class="border-bottom1 product_desc"><?php echo htmlspecialchars($product['product_extra_description']); ?></p> <?php } ?> <?php // Fetch icons if available $icons = []; if (!empty($product['product_icon_ids'])) { $iconIds = explode(',', $product['product_icon_ids']); if (count($iconIds) > 0) { $placeholders = implode(',', array_fill(0, count($iconIds), '?')); $stmt = $conn->prepare("SELECT icon_image, icon_name FROM icons WHERE id IN ($placeholders)"); if ($stmt) { $stmt->bind_param(str_repeat('i', count($iconIds)), ...$iconIds); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $icons[] = [ 'image' => $row['icon_image'], 'name' => $row['icon_name'] ]; } } $stmt->close(); } } } // Display icon items if (!empty($icons)) { echo '<div class="product-icons">'; foreach ($icons as $icon) { echo '<div class="product-icon-item">'; echo '<img src="admin/' . htmlspecialchars($icon['image']) . '" alt="' . htmlspecialchars($icon['name']) . '" class="product-icon">'; echo '<p>' . htmlspecialchars($icon['name']) . '</p>'; echo '</div>'; } echo '</div>'; } ?> <!-- <ul role="list"> <?php if ($product['category_name']) { ?> <li><strong>Category: </strong><?php echo htmlspecialchars($product['category_name']); ?></li> <?php } ?> <?php if ($product['product_codeno1']) { ?> <li> <strong>Product Varietion: </strong> <br /> 1. <?php echo htmlspecialchars($product['product_codeno1']); ?> <br /> <strong> </strong><?php echo stripslashes($product['product_desc1']); ?> </li> <?php } ?> <?php if ($product['product_description']) { ?> <li><strong>Description: </strong><?php echo stripslashes($product['product_description']); ?></li> <?php } ?> <?php if ($product['product_extra_description']) { ?> <li><strong>Extra Information: </strong><?php echo htmlspecialchars($product['product_extra_description']); ?></li> <?php } ?> </ul> --> </div> <?php if ($product['product_drawing']) { ?> <p class="product-description-text">Product Drawing</p> <div class="product-gallery w-dyn-list w-dyn-items-repeater-ref"> <div role="list" class="product-gallery-list w-dyn-items"> <div role="listitem" class="product-gallery-item w-dyn-item w-dyn-repeater-item"> <div class="gallery-lightbox-block in-product"> <a href="#" class="gallery-lightbox in-product-gallery w-inline-block w-lightbox"> <img loading="lazy" src="admin/<?php echo htmlspecialchars($product['product_drawing']); ?>" alt="" class="gallery-thumbnail in-product"> <img src="assets/images/open-image.svg" loading="lazy" alt="" class="icon in-gallery"> <div class="gallery-background"></div> <script type="application/json" class="w-json"> { "items": [{ "url": "admin/<?php echo htmlspecialchars($product['product_drawing']); ?>", "type": "image" }], "group": "Product Gallery" } </script> </a> </div> </div> </div> <div class="empty-state-hidden w-dyn-hide w-dyn-empty"> <div>No items found.</div> </div> </div> <?php } ?> </div> </div> <div class="product-images"> <div class="product-image-layout"> <div class="product-image"> <div class="parallax-animation"> <img alt="<?php echo htmlspecialchars($product['product_name']); ?>" src="admin/<?php echo htmlspecialchars($product['product_image']); ?>" class="cover-image is-parallax"> </div> </div> </div> <?php // Fetch colors if available $colors = []; if (!empty($product['product_color_ids'])) { $colorIds = explode(',', $product['product_color_ids']); if (count($colorIds) > 0) { $placeholders = implode(',', array_fill(0, count($colorIds), '?')); $stmt1 = $conn->prepare("SELECT color_image, color_name FROM colors WHERE id IN ($placeholders)"); if ($stmt1) { $stmt1->bind_param(str_repeat('i', count($colorIds)), ...$colorIds); $stmt1->execute(); $result1 = $stmt1->get_result(); if ($result1->num_rows > 0) { while ($row1 = $result1->fetch_assoc()) { $colors[] = [ 'image' => $row1['color_image'], 'name' => $row1['color_name'] ]; } } $stmt1->close(); } } } // Display color items if (!empty($colors)) { echo '<p class="border-bottom product_code" style="margin-top:20px">Product Colors</p><div class="product-colors">'; foreach ($colors as $color) { echo '<div class="product-color-item">'; echo '<img src="admin/' . htmlspecialchars($color['image']) . '" alt="' . htmlspecialchars($color['name']) . '" class="product-color">'; echo '<p>' . htmlspecialchars($color['name']) . '</p>'; echo '</div>'; } echo '</div>'; } ?> </div> </div> </div> </div> </section> <?php } else { echo "<p>Product not found.</p>"; } ?> <!-- <section id="products" class="section"> <div class="products w-dyn-list"> <div role="list" class="products-list w-dyn-items"> <div role="listitem" class="product-item w-dyn-item"> <div class="product-layout"> <div class="product-content"> <h2 class="heading is-product-title hauora-font">CELIO SIT 114</h2> <div class="rich-text w-richtext"> <ul role="list"> <li><strong>Product Code No : </strong>123</li> <li><strong>Product Size : </strong>123</li> <li><strong>Extra Information : </strong>123</li> </ul> </div> <p class="product-description-text">Product Drawing</p> <div class="product-gallery w-dyn-list w-dyn-items-repeater-ref"> <div role="list" class="product-gallery-list w-dyn-items" data-wf-collection="f_more_images_4dr" data-wf-template-id="wf-template-c0f9f878-ae19-eb3e-48ec-6dd90c024ca6"> <div role="listitem" class="product-gallery-item w-dyn-item w-dyn-repeater-item"> <div class="gallery-lightbox-block in-product"> <a href="#" class="gallery-lightbox in-product-gallery w-inline-block w-lightbox"><img loading="lazy" data-wf-sku-bindings="%5B%7B%22from%22%3A%22f_more_images_4dr%5B%5D%22%2C%22to%22%3A%22src%22%7D%5D" src="https://cdn.prod.website-files.com/65ccdc43fbbffc0bf011482b/65d393cb8a11538dcc6ba0f4_micheile-henderson-wwTvwS9vKZs-unsplash-p-800.jpg" alt="" class="gallery-thumbnail in-product"> <img src="assets/images/open-image.svg" loading="lazy" alt="" class="icon in-gallery"> <div class="gallery-background"></div> <script type="application/json" class="w-json"> { "items": [{ "url": "https://cdn.prod.website-files.com/65ccdc43fbbffc0bf011482b/65d393cb8a11538dcc6ba0f4_micheile-henderson-wwTvwS9vKZs-unsplash-p-800.jpg", "type": "image" }], "group": "Product Gallery" } </script> </a> </div> </div> </div> <div class="empty-state-hidden w-dyn-hide w-dyn-empty"> <div>No items found.</div> </div> </div> </div> </div> <div class="product-images"> <div class="product-image-layout"> <div class="product-image"> <div class="parallax-animation"> <img alt="Signature Essence Toiletry Set" src="https://cdn.prod.website-files.com/65ccdc43fbbffc0bf011482b/65d393cb8a11538dcc6ba0f4_micheile-henderson-wwTvwS9vKZs-unsplash-p-800.jpg" class="cover-image is-parallax"> </div> </div> </div> </div> </div> </div> </div> </section> --> <!-- <section id="categories" class="section"> <div class="store-categories w-dyn-list"> <div role="list" class="store-categories-list w-dyn-items"> <div role="listitem" class="store-category-item w-dyn-item"><a href="experiences-and-packages.html" class="store-category-link w-inline-block"> <div class="store-category-block"> <p class="paragraph is-uppercase-text">Previous Product</p> </div> <h3 class="heading is-store-category-title">Product Name</h3> <div class="store-category-background"> <div class="store-category-overlay-color"></div> <div class="_3d-block for-image"> <div class="_3d-trigger for-image"> <div class="parallax-animation"><img alt="Experiences and Packages" src="assets/images/banner2.jpg" sizes="(max-width: 479px) 92vw, (max-width: 991px) 96vw, 52vw" class="cover-image is-parallax"></div> </div> </div> </div> </a></div> <div role="listitem" class="store-category-item w-dyn-item"><a href="hotel-branded-toiletry-sets.html" aria-current="page" class="store-category-link w-inline-block w--current"> <div class="store-category-block"> <p class="paragraph is-uppercase-text">Next Product</p> </div> <h3 class="heading is-store-category-title">Product Name</h3> <div class="store-category-background"> <div class="store-category-overlay-color"></div> <div class="_3d-block for-image"> <div class="_3d-trigger for-image"> <div class="parallax-animation"> <img alt="Hotel-branded Toiletry Sets" src="assets/images/banner1.jpg" sizes="(max-width: 479px) 92vw, (max-width: 991px) 96vw, 52vw" class="cover-image is-parallax"> </div> </div> </div> </div> </a></div> </div> </div> </section> --> <!-- <div class="blog-hero"> <div class="container product"> <div class="blog-hero-layout"> <div class="blog-hero-title"> <h1 class="heading is-blog-hero-title hauora-font">CELIO SIT 114</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="assets/images/product/sit114.jpg" alt="" class="cover-image is-parallax"> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="gradient-backgrounds"> <div class="gradient-background-1"></div> </div> </div> --> <!-- <section id="gallery" class="section is-gallery-section"> <div class="content-component"> <div class="container"> <div class="padding in-content-component"> <div class="vertical-flex with-gap-4em is-align-center"> <div class="dividers"> <div class="divider"> <div class="divider-line"></div> </div> <p class="medium-uppercase-title">Gallery</p> <div class="divider"> <div class="divider-line"></div> </div> </div> <h2 class="heading is-component-title">Visual Comfort Tour</h2> </div> </div> </div> </div> <div class="container is-wider"> <div class="padding top-0em"> <div class="w-dyn-list"> <div role="list" class="hotel-gallery-grid w-dyn-items"> <div role="listitem" class="gallery-lightbox-block w-dyn-item w-dyn-repeater-item"> <a href="#" class="gallery-lightbox w-inline-block w-lightbox"> <img src="assets/images/product/sit114.jpg" loading="lazy" alt="" sizes="(max-width: 479px) 38vw, (max-width: 767px) 41vw, (max-width: 991px) 39vw, (max-width: 1919px) 20vw, 319.90625px" class="gallery-thumbnail"> <img src="../65ccdc43fbbffc0bf011481f/65ccdc43fbbffc0bf01149eb_add-fill0-wght400-grad0-opsz24%20%281%29.svg" loading="lazy" alt="" class="icon in-gallery"> <div class="gallery-background"></div> <script type="application/json" class="w-json"> { "items": [{ "url": "assets/images/product/sit114.jpg", "type": "image" }], "group": "Gallery" } </script> </a> </div> </div> <div class="empty-state-default w-dyn-hide w-dyn-empty"> <div>No items found.</div> </div> </div> </div> </div> </section> --> <?php include('footer.php'); ?>