<?php include 'header.php'; ?>
<section class="page-header">
    <div class="page-header__bg" style="background-image: url(assets/banner.jpg);">
    </div>
    <div class="container">
        <div class="row">
            <div class="col-xl-12">
                <div class="page-header__wrapper">
                    <div class="page-header__content">
                        <?php
                        $page_flname = $_REQUEST['c_name'];
                        if (!empty($page_flname)) {

                            $flname1 = str_replace(".php", "", $page_flname);

                            $flname = strtolower($flname1);
                            //   $query = "SELECT category.id as catid, subcategory.* from category INNER JOIN subcategory on category.id = subcategory.catid WHERE category.slug = '$flname' ";

                            $query = "SELECT * FROM category  where slug = '$flname' ";
                            $executeQuery = $d->selectQueryInArray($query);

                            if ($executeQuery) {
                                foreach ($executeQuery as $row) {
                        ?>
                                    <h2><?php echo $row['category']; ?> </h2>
                                    <div class="page-header__menu">
                                        <ul>
                                            <li><a href="index.php">Home</a></li>
                                            <li>Products</li>
                                        </ul>
                                    </div>
                        <?php }
                            }
                        } ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section><br><br>

<section class="team-one">
    <div class="container">
        <div class="sec-title text-center">
            <span class=" sec-title__tagline">WELCOME TO KRISHNA CREATIONS</span>
            <h2 class="sec-title__title">Latest Product</h2>
        </div>
        <div class="row justify-content-center">
            <?php
            $page_flname = $_REQUEST['c_name'];
            if (!empty($page_flname)) {

                $flname1 = str_replace(".php", "", $page_flname);

                $flname = strtolower($flname1);
                $query = "SELECT category.id as catid, subcategory.* from category INNER JOIN subcategory on category.id = subcategory.catid WHERE category.slug = '$flname' ";

                // $query = "SELECT * FROM subcategory  where slug = '$flname' ";
                $executeQuery = $d->selectQueryInArray($query);

                if ($executeQuery) {
                    foreach ($executeQuery as $row) {
            ?>
                        <!--Start Single Team One-->
                        <div class="col-xl-4 col-lg-4 wow fadeInLeft" data-wow-delay="0ms" data-wow-duration="1500ms">
                            <div class="team-one__single">
                                <div class="team-one__single-img">
                                    <img src="admin/uploads/<?php echo $row['image']; ?>" alt="" />

                                </div>

                                <div class="team-one__single-content text-center">
                                    <h2>
                                        <a href="product/<?php echo $row['slug']; ?>.php"> <?php echo $row['product']; ?></a>
                                    </h2>

                                </div>
                            </div>
                        </div>
                        <!--End Single Team One-->
            <?php }
                }
            } ?>


        </div>
    </div>
</section>







<?php include 'footer.php'; ?>