korsdfgdfgdxxdfgvdsttyrzxcddszangaiiddde
Elepffwfggxxcdfgdfgdffggdfghxcvdwcghf
/
home
/
u484192521
/
domains
/
zisco-sa.com
/
public_html
/
Upload FileeE
HOME
<?php session_start(); include('include/connect.php'); // Check if product_id is set in the URL if (isset($_GET['product_id'])) { $product_id = trim($_GET['product_id']) ?: ''; if ($product_id === '') { echo "No product_id specified."; exit(); } // Fetch product details from the database $query = "SELECT * FROM product WHERE product_id = ?"; $stmt = $con->prepare($query); $stmt->bind_param("i", $product_id); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $product = $result->fetch_assoc(); $subcategory_id = $product['subcategory_id']; // Get the subcategory ID of the current product } else { echo "Product not found."; exit(); } // Fetch the subcategory name $subcategory_query = "SELECT subcategory_name FROM subcategory WHERE subcategory_id = ?"; $subcategory_stmt = $con->prepare($subcategory_query); $subcategory_stmt->bind_param("i", $subcategory_id); $subcategory_stmt->execute(); $subcategory_result = $subcategory_stmt->get_result(); if ($subcategory_result->num_rows > 0) { $subcategory_row = $subcategory_result->fetch_assoc(); $subcategory_name = $subcategory_row['subcategory_name']; } else { $subcategory_name = "Unknown Subcategory"; // Fallback if subcategory is not found } // Fetch 12 products under the same subcategory, excluding the current product $subcategory_products_query = "SELECT * FROM product WHERE subcategory_id = ? AND product_id != ? LIMIT 12"; $subcategory_products_stmt = $con->prepare($subcategory_products_query); $subcategory_products_stmt->bind_param("ii", $subcategory_id, $product_id); $subcategory_products_stmt->execute(); $subcategory_products_result = $subcategory_products_stmt->get_result(); } if ($_SERVER["REQUEST_METHOD"] == "POST") { // Collect form data and sanitize $name = htmlspecialchars(trim($_POST['name'])); $email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL); $subject = htmlspecialchars(trim($_POST['subject'])); $message = htmlspecialchars(trim($_POST['message'])); // Set receiver email and compose email $to = "shahirsizcom9@gmail.com"; $subject = "Contact from Zisco Website: " . $subject; $body = "Name: $name\nEmail: $email\n\nMessage:\n$message"; $headers = "From: no-reply@zisco-sa.com\r\n"; $headers .= "Reply-To: $email\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/plain; charset=UTF-8\r\n"; if (mail($to, $subject, $body, $headers)) { echo "<script>alert('Message sent successfully.');</script>"; } else { echo "<script>alert('Failed to send the message. Please try again later.');</script>"; } $full_subject = "Contact from Zisco Website: " . $subject; $body = "Name: $name\nEmail: $email\n\nMessage:\n$message"; $headers = "From: no-reply@zisco-sa.com\r\nReply-To: $email"; // Attempt to send the email if (mail($to, $full_subject, $body, $headers)) { echo "<script>alert('Message sent successfully.');</script>"; } else { echo "<script>alert('Failed to send the message. Please try again later.');</script>"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Zain Industrial Solutions Company</title> <!-- Stylesheets --> <link href="css/bootstrap.css" rel="stylesheet" /> <link href="css/magnific-popup.css" rel="stylesheet" /> <link href="css/style.css" rel="stylesheet" /> <link href="css/responsive.css" rel="stylesheet" /> <link rel="shortcut icon" href="images/favicon.png" type="image/x-icon" /> <link rel="icon" href="images/favicon.png" type="image/x-icon" /> <link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet" /> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /> <!-- Responsive --> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> <!--[if lt IE 9 ]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script ><![endif]--> <!--[if lt IE 9]><script src="js/respond.js"></script><![endif]--> <style> img { pointer-events: none; } .sticky-header-1 { position: relative; z-index: 1000; background-color: white; /* Background color for sticky state */ box-shadow: none; /* Optional shadow for a clean look */ transition: all 0.3s ease-in-out; } .sticky-header-1.is-sticky { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Shadow effect when sticky */ } .sticky-header-1 .logo img { height: 50px; /* Fixed logo size */ } .sticky-header-1.is-sticky .logo img { height: 50px; /* Maintain same size in sticky state */ } body { margin: 0; padding: 0; } .auto-container { padding: 0 15px; } .nav-outer { display: flex; justify-content: space-between; } .navigation li a { color: black; /* Default text color */ font-size: 14px; transition: color 0.3s; } .sticky-header-1.is-sticky .navigation li a { color: #333; /* Text color in sticky state */ } </style> <style> .subcategory-list li { padding-bottom: 0.5rem; } .subcategory-list a { color: #333; text-decoration: none; display: block; padding: 2px; /* transition: color 0.3s ease, background-color 0.3s ease; */ } .subcategory-list a:hover { background-color: #e0e0e0; color: #fd7702; border-radius: 4px; } </style> </head> <body> <div class="wrapper_box"> <!-- Preloader --> <div class="loader-wrap"> <div class="preloader"></div> <div class="layer layer-one"><span class="overlay"></span></div> <div class="layer layer-two"><span class="overlay"></span></div> <div class="layer layer-three"><span class="overlay"></span></div> </div> <!-- Main Header--> <header class="main-header"> <div class="header_top"> <div class="auto-container"> <div class="row"> <div class="col-xl-12"> <div class="header_top_inner clearfix"> <div class="header_top_one_box pull-left"> <ul> <li> <span class="flaticon-placeholder"></span>Dammam, Saudi Arabia </li> <li> <span class="flaticon-phone-call-1"></span ><a href="tel:+9660564837175 "> +966 564 837 175 </a> </li> <li> <span class="flaticon-mail"></span ><a href="mailto:info@zisco-sa.com" >info@zisco-sa.com</a > </li> </ul> </div> <div class="header_top_two_box pull-right"> <div class="opening_hour"> <p> <span class="flaticon-clock-1"></span>Sat - Thrs: 8:00AM - 06:00PM </p> </div> <div class="social_links_1"> <a href="#"><i class="fab fa-facebook-square"></i></a> <a href=""><img style="width: 15px; height: 15px;" src="images/twitter.png" alt=""></a> <a href="#"><i class="fab fa-instagram"></i></a> <a href="#"><i class="fab fa-linkedin"></i></a> </div> </div> </div> </div> </div> </div> </div> <!-- Header Upper --> <div class="header_upper sticky-header-1"> <div class="auto-container"> <div class="row"> <div class="col-lg-12"> <div class="header_upper_inner clearfix"> <div class="header_upper_one_box pull-left"> <div class="logo"> <a href="index.php" ><img src="images/logo.png" alt="" title="" /></a> </div> </div> <div class="header_upper_two_box one pull-right"> <div class="nav-outer"> <!--Mobile Navigation Toggler--> <div class="mobile-nav-toggler"> <span class="icon flaticon-menu"></span> </div> <div class="nav-inner"> <!-- Main Menu --> <nav class="main-menu navbar-expand-xl navbar-dark"> <div class="collapse navbar-collapse" id="navbarSupportedContent" > <ul class="navigation"> <li > <a href="index.php">Home</a> </li> <li><a href="about.php">About</a></li> <li style="border-radius: 1rem;" class="dropdown"> <a href="#">Products <i style="padding-left: 5px;" class="fas fa-chevron-down"></i></a> <ul style="border-radius: 0.5rem;"> <!-- Main Categories Loop --> <?php // Fetch categories, subcategories, and products without any specific ordering $sql = " SELECT c.category_id, c.category_name, s.subcategory_id, s.subcategory_name, p.product_id, p.product_name FROM category c LEFT JOIN subcategory s ON c.category_id = s.category_id LEFT JOIN product p ON s.subcategory_id = p.subcategory_id"; $result = $con->query($sql); // Initialize categories array $categories = []; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { // Add categories and their subcategories to the array if (!isset($categories[$row['category_id']])) { $categories[$row['category_id']] = [ 'name' => $row['category_name'], 'subcategories' => [] ]; } if (!empty($row['subcategory_name'])) { if (!isset($categories[$row['category_id']]['subcategories'][$row['subcategory_id']])) { $categories[$row['category_id']]['subcategories'][$row['subcategory_id']] = [ 'name' => $row['subcategory_name'], 'products' => [] ]; } if (!empty($row['product_name'])) { $categories[$row['category_id']]['subcategories'][$row['subcategory_id']]['products'][$row['product_id']] = $row['product_name']; } } } } // Display categories, subcategories, and products foreach ($categories as $category_id => $category_data): ?> <li style="border-radius: 1rem;" class="dropdown"> <a style="font-size: 15px;" href="category-page.php?category_id=<?= htmlspecialchars($category_id); ?>"> <?= htmlspecialchars($category_data['name']); ?> </a> <?php if (!empty($category_data['subcategories'])): ?> <ul style="border-radius: 0.5rem;" class="subcategory-list"> <?php foreach ($category_data['subcategories'] as $subcategory_id => $subcategory_data): ?> <li style="border-radius: 0.5rem;" class="dropdown"> <a href="javascript:void(0);" style="font-size: 11px; color: black; font-weight: bold;" class="subcategory-toggle" data-subcategory-id="subcategory-<?= htmlspecialchars($subcategory_id); ?>"> <?= htmlspecialchars($subcategory_data['name']); ?> <i class="fas fa-chevron-right arrow-icon"></i> </a> <?php if (!empty($subcategory_data['products'])): ?> <ul style="border-radius: 0.5rem; display: none;" class="product-list" id="subcategory-<?= htmlspecialchars($subcategory_id); ?>"> <?php foreach ($subcategory_data['products'] as $product_id => $product_name): ?> <li> <a href="product.php?subcategory_id=<?= urlencode(htmlspecialchars($subcategory_id)); ?>"> <?= htmlspecialchars($product_name); ?> </a> </li> <?php endforeach; ?> </ul> <?php endif; ?> </li> <?php endforeach; ?> </ul> <?php endif; ?> </li> <?php endforeach; ?> </ul> </li> <script> function initializeDropdown() { const toggles = document.querySelectorAll(".subcategory-toggle"); toggles.forEach((toggle) => { toggle.addEventListener("click", function (event) { event.preventDefault(); const subcategoryId = this.getAttribute("data-subcategory-id"); const productList = document.getElementById(subcategoryId); const arrowIcon = this.querySelector(".arrow-icon"); // Close all other open dropdowns document.querySelectorAll(".product-list").forEach((list) => { if (list.id !== subcategoryId) { list.style.display = "none"; } }); // Reset all arrows document.querySelectorAll(".subcategory-toggle .arrow-icon").forEach((icon) => { icon.classList.remove("fa-chevron-down"); icon.classList.add("fa-chevron-right"); }); // Toggle current dropdown if (productList.style.display === "none" || productList.style.display === "") { productList.style.display = "block"; arrowIcon.classList.remove("fa-chevron-right"); arrowIcon.classList.add("fa-chevron-down"); } else { productList.style.display = "none"; arrowIcon.classList.remove("fa-chevron-down"); arrowIcon.classList.add("fa-chevron-right"); } }); }); } // Initialize dropdown once DOM is ready document.addEventListener("DOMContentLoaded", initializeDropdown); </script> <li><a href="service.php"> Services</a></li> <li ><a href="blog.php">Blog</a></li> <li><a href="gallery.php">Gallery</a></li> <li ><a href="contact.php">Contact</a></li> </ul> </div> </nav> <!-- Main Menu End--> </div> </div> </div> </div> </div> </div> </div> </div> <!--End Header Upper--> <!--End Header Upper--> <!-- Mobile Menu --> <div class="mobile-menu close-menu"> <!--Here Menu Will Come Automatically Via Javascript / Same Menu as in Header--> <nav class="menu-box"> <ul class="navigation"></ul> </nav> </div> <!-- End Mobile Menu --> <div class="nav-overlay"></div> </header> <section class="page-header" style="background-image: url(images/background/page-header-bg-2.png);"> <div class="container"> <h2><?= htmlspecialchars($subcategory_name); ?></h2> <ul class="thm-breadcrumb"> <li><a href="index.php"> <p><?= htmlspecialchars($subcategory_name); ?></p> </a></li> <li><span>></span></li> <li><span>Products</span></li> </ul> </div> </section> <!--End Page Header Section--> <!--Start Service Details Section--> <section class="service-details-section"> <div class="container"> <div class="row"> <div class="col-xl-4"> <div class="service-details-sidebar"> <div class="service-details-sidebar-single view-all-services"> <div class="title"> <h3>View other Products</h3> </div> <ul> <?php if ($subcategory_products_result->num_rows > 0) { while ($subcategory_product = $subcategory_products_result->fetch_assoc()) { echo '<li>'; echo ' <div class="icon">'; echo ' <i class="fa fa-angle-right"></i>'; echo ' </div>'; echo ' <div class="text">'; echo ' <a href="product-details.php?product_id=' . $subcategory_product['product_id'] . '">' . $subcategory_product['product_name'] . '</a>'; echo ' </div>'; echo '</li>'; } } else { echo '<li>No other products available.</li>'; } ?> </ul> </div> <!-- <div class="service-details-sidebar-single about-our-factory"> <div class="broucher-box"> <div class="icon"> <i class="flaticon-diploma"></i> </div> <div class="content"> <p>About Our factory</p> <a href="#"><i class="fa fa-download"></i>download.PDF</a> </div> </div> </div> --> </div> </div> <div class="col-xl-8"> <div class="service-details-right-content"> <div class="service-details-right-image"> <img style=" border: #f7f7f7 solid ; border-radius: 1rem;" src="backend-admin/product/product-images/<?php echo $product['product_id']; ?>/<?php echo $product['product_main_image']; ?>" alt=""> </div> <div class="service-details-right-text"> <div class="row"> <div class="col-lg-4"> <h3><?php echo $product['product_name']; ?></h3> <p style=" padding: 0px: font-size: larger; font-family: sans-serif;" class="first-text"><?php echo $product['product_description']; ?></p> </div> <div style="padding-top: 3rem;" class="col-lg-8"> <div class="service-details-inquiry-form"> <!-- <h4>Inquiry Form</h4> --> <form id="contactForm" class="contact-one-form"> <div class="row"> <div class="col-xl-6"> <div class="input-box"> <input type="text" name="name" placeholder="Your name" required> </div> </div> <div class="col-xl-6"> <div class="input-box"> <input type="email" name="email" placeholder="Your E-mail" required> </div> </div> <div class="col-xl-12"> <div class="input-box"> <input type="text" name="subject" placeholder="Subject" required> </div> </div> <div class="col-xl-12"> <div class="input-box"> <textarea name="message" placeholder="Your Message" required></textarea> </div> </div> <div class="col-xl-12"> <div class="link-box"> <button type="submit" class="theme-btn btn-style-one"> <span>Send Message</span> </button> </div> </div> </div> </form> <?php if (!empty($successMessage)): ?> <div style="color: green; font-weight: bold; margin-top: 20px;"> <?= $successMessage ?> </div> <?php endif; ?> <?php if (!empty($errorMessage)): ?> <div style="color: red; font-weight: bold; margin-top: 20px;"> <?= $errorMessage ?> </div> <?php endif; ?> </div> </div> </div> </div> </div> </div> </div> </div> </section> <section style="padding-bottom: 2rem;" class="features-one-section"> <div class="container"> <div class="thm-section-title text-center"> <h4 class="sub-title-shape-left section_title-subheading">Features</h4> <h2>Why ZISCO Stands Out in Industrial Excellence</h2> <p>Discover what makes ZISCO the preferred choice for top-quality industrial solutions,<br> unmatched expertise, and exceptional customer support.</p> </div> <div class="row"> <div class="col-xl-3 col-lg-6 col-md-6"> <!--Features One Sec Single--> <div style="width: 100%; height: 370px" class="features-one-sec-single wow fadeInUp"> <div class="features-one-sec-icon"> <span class="flaticon-robotic"></span> </div> <h3>Smart Technology</h3> <p>We leverage cutting-edge technology to deliver top-notch industrial hose and fitting solutions. </p> </div> </div> <div class="col-xl-3 col-lg-6 col-md-6"> <!--Features One Sec Single--> <div style="width: 100%; height: 370px" class="features-one-sec-single wow fadeInUp" data-wow-delay="100ms"> <div class="features-one-sec-icon"> <span class="flaticon-development"></span> </div> <h3>Awesome Team</h3> <p>Our success lies in the expertise of our dynamic team of engineers, skilled technicians, and informed sales professionals. </p> </div> </div> <div class="col-xl-3 col-lg-6 col-md-6"> <!--Features One Sec Single--> <div style="width: 100%; height: 370px" class="features-one-sec-single wow fadeInUp" data-wow-delay="200ms"> <div class="features-one-sec-icon"> <span class="flaticon-paint-roller"></span> </div> <h3>Quality Materials</h3> <p>We prioritize excellence by offering the highest standards in industrial products.</p> </div> </div> <div style="width: 100%; height: 370px" class="col-xl-3 col-lg-6 col-md-6"> <!--Features One Sec Single--> <div class="features-one-sec-single wow fadeInUp" data-wow-delay="300ms"> <div class="features-one-sec-icon"> <span class="flaticon-team"></span> </div> <h3>Great Support</h3> <p>We provide exceptional after-sales support and services, solidifying our reputation as a trusted industrial supplier across Saudi Arabia.</p> </div> </div> </div> </div> </section> <!--Start Footer Section --> <?php include('include/footer.php'); ?> <!--End Footer Section --> <a href="https://wa.me/966564837175?text=Hello thank you for visiting%20 our company%20How can we%20assist%20you%20today%20" class="whatsapp" target="_blank" > <i class="fa fa-whatsapp whatsapp-icon"></i ></a> <div id="mobile-call-btn"> <a href="tel:+966564837175" ><br /><img src="https://res.cloudinary.com/aldridgedev/image/upload/v1584316596/icons/call-answer-200.png" /></a> </div> <!--Scroll to top--> <div class="scroll-to-top scroll-to-target" data-target="html"> <span class="icon fas fa-arrow-up"></span> </div> </div> <!--End pagewrapper--> <script type="text/javascript" src="https://cdn.emailjs.com/dist/email.min.js"></script> <script type="text/javascript"> (function () { emailjs.init("6h_hF_THtnrPTVCAg"); // Replace with your EmailJS public key })(); </script> <script> document.getElementById("contactForm").addEventListener("submit", function (e) { e.preventDefault(); const form = this; emailjs.sendForm("service_9d9f0vk", "template_lhn9nz9", form) .then(function (response) { alert("Message sent successfully!"); form.reset(); // ✅ Reset the form after success }, function (error) { alert("Failed to send message: " + JSON.stringify(error)); }); }); </script> <script> document.addEventListener("DOMContentLoaded", function () { const subcategoryToggles = document.querySelectorAll(".subcategory-toggle"); subcategoryToggles.forEach((toggle) => { toggle.addEventListener("click", function () { const subcategoryId = this.getAttribute("data-subcategory-id"); const productList = document.getElementById(subcategoryId); const arrowIcon = this.querySelector(".arrow-icon"); // Toggle the visibility of the product list if (productList.style.display === "none" || productList.style.display === "") { productList.style.display = "block"; // Show the products arrowIcon.classList.remove("fa-chevron-right"); arrowIcon.classList.add("fa-chevron-down"); // Change arrow to down } else { productList.style.display = "none"; // Hide the products arrowIcon.classList.remove("fa-chevron-down"); arrowIcon.classList.add("fa-chevron-right"); // Change arrow to right } }); }); }); </script> <script> document.addEventListener("DOMContentLoaded", function () { const header = document.querySelector(".sticky-header-1"); window.addEventListener("scroll", function () { if (window.scrollY > 100) { header.classList.add("is-sticky"); } else { header.classList.remove("is-sticky"); } }); }); </script> <script> document.addEventListener('contextmenu', event => event.preventDefault()); </script> <script> document.onkeydown = function(e) { if (e.key === "F12" || (e.ctrlKey && e.shiftKey && e.key === 'I') || (e.ctrlKey && e.key === 'U') || (e.ctrlKey && e.shiftKey && e.key === 'J') || (e.ctrlKey && e.shiftKey && e.key === 'C')) { return false; } }; </script> <script> let devtools = {open: false}; const threshold = 160; setInterval(() => { const widthThreshold = window.outerWidth - window.innerWidth > threshold; const heightThreshold = window.outerHeight - window.innerHeight > threshold; if (widthThreshold || heightThreshold) { alert('Developer tools are open!'); window.location.href = 'about:blank'; } }, 1000); </script> <script> // Disable right-click document.addEventListener('contextmenu', event => event.preventDefault()); // Disable common DevTools shortcuts (desktop only) document.addEventListener('keydown', function(e) { if ( e.key === "F12" || (e.ctrlKey && e.shiftKey && ['i', 'j', 'c', 'k'].includes(e.key.toLowerCase())) || (e.ctrlKey && e.key.toLowerCase() === 'u') ) { e.preventDefault(); } }); // Optional: Detect DevTools via debugger trick (desktop only) let devtoolsOpen = false; const element = new Image(); Object.defineProperty(element, 'id', { get: function () { devtoolsOpen = true; throw new Error("DevTools detected"); } }); setInterval(() => { devtoolsOpen = false; console.log(element); if (devtoolsOpen && window.innerWidth > 768) { // Only trigger on larger screens (not mobile) document.body.innerHTML = "<h1>DevTools is not allowed</h1>"; } }, 1000); </script> <script> // Disable right-click document.addEventListener('contextmenu', e => e.preventDefault()); // Disable copy, cut, and drag document.addEventListener('copy', e => e.preventDefault()); document.addEventListener('cut', e => e.preventDefault()); document.addEventListener('dragstart', e => e.preventDefault()); </script> <script src="js/jquery.js"></script> <script src="js/popper.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/swiper.min.js"></script> <script src="js/appear.js"></script> <script src="js/jquery.countTo.js"></script> <script src="js/isotope.js"></script> <script src="js/owl.js"></script> <script src="js/wow.js"></script> <script src="js/jquery.fancybox.js"></script> <script src="js/TweenMax.min.js"></script> <script src="js/jquery.magnific-popup.min.js"></script> <script src="js/parallax.min.js"></script> <script src="js/custom.js"></script> </body> </html>