���� JFIF fdasasfas213sdaf
Server IP : 88.222.243.122 / Your IP : 216.73.216.200 Web Server : LiteSpeed System : Linux in-mum-web669.main-hosting.eu 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 12 05:52:18 EST 2025 x86_64 User : u479334040 ( 479334040) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u479334040/domains/rfconnector.info/public_html/ |
Upload File : |
<?php include('includes/config.php'); if (!isset($_GET['parent_id'])) { die("Parent Category ID missing!"); } $parent_id = $_GET['parent_id']; function getSubcategories($parent_id, $con) { $query = "SELECT * FROM category WHERE parent_id = '$parent_id'"; // Fetch subcategories $result = mysqli_query($con, $query); if (!$result) { die("Subcategory Query Failed: " . mysqli_error($con)); } return $result; } $subcategories = getSubcategories($parent_id, $con); // ✅ Check if subcategories exist if (mysqli_num_rows($subcategories) == 0) { // If no subcategories, go directly to products page echo "<script>window.location.href='products.php?subcategory_id=$parent_id';</script>"; exit(); } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="keywords" content=""> <title>Synergy Telecom - All Products</title> <!-- Include assets (CSS, JS, etc.) --> <?php include('include/assets.php'); ?> </head> <body> <!-- Include header --> <?php include('include/header.php'); ?> <section class="breadcrumb-header style-2" id="page" style="background: radial-gradient(circle, rgb(235 27 35) -24%, rgb(63 71 204) 100%); filter: saturate(0.5);; ; "> <div class="overlay"></div> <div class="container"> <div class="row"> <div class="col-md-8"> <div class="banner"> <h1>Subcategory</h1> <ul> <li><a href="index.php">Home</a></li> <li><i class="fas fa-angle-right"></i></li> <li>Subcategory</li> </ul> </div> </div> </div> </div> </section> <section class="team home-2 pb-4"> <div class="container"> <div class="sec-title home-2"> <div class="row"> <div class="col-lg-5"> <h2>Premium Products</h2> <h3 class="text-uppercase">Premium Products for Swivels and Swing Units</h3> </div> <div class="col-lg-7 d-flex align-items-center"> <p class="sec-explain"> At Synergy Telecom, we offer a comprehensive range of high-quality Swivels and Swing Units designed to meet the diverse needs of various industries. Our product line includes Clutch-Style Swivels, Friction-Style Swivels, Key-Style Swivels, and Swing-Unit Swivels, each engineered for precision, durability, and reliable performance. </p> </div> </div> </div> <!-- Categories List --> <div class="row"> <?php // Fetch categories from the database while ($sub = mysqli_fetch_assoc($subcategories)) { // Fetch the subcategory image $subcategoryImage = $sub['categoryImage']; // Image stored in the database $imagePath = 'product-admin/uploads/category/' . urlencode($subcategoryImage); ?> <!-- Category Box --> <div class="col-md-6 col-lg-3"> <div class="team-box"> <div class="img-box"> <img src="product-admin/uploads/category/<?php echo $subcategoryImage; ?>" alt="<?php echo $sub['categoryName']; ?>" class="subcategory-image"> <div class="img-box-hover"> <!-- You can add hover effects here if needed --> </div> </div> <div class="text-box text-center"> <h5> <a href="subcategories.php?parent_id=<?php echo $sub['id']; ?>" class="subcategory"><?php echo $sub['categoryName']; ?></a> </h5> <span>Synergy Telecom</span> </div> </div> </div> <?php } ?> </div> </div> </section> <!-- Include Footer --> <?php include('include/footer.php'); ?> </body> </html>