<!DOCTYPE html>
<html lang="en">
<head>
    <?php include_once("assets/include/head.php")?>
</head>
<body>
    <?php include_once("assets/include/header.php")?>
    <?php 
             $slug=$_GET['slug'];
             
            $qry=mysqli_query($con,"SELECT * from category where slug='$slug'");
            // echo "SELECT * from category where slug='$slug'";
            $rn=mysqli_fetch_array($qry);
            $cid=$rn['id'];
            $qry1=mysqli_query($con,"SELECT * from cat_content where cat_id='$cid'");
            $row=mysqli_fetch_array($qry1);
            if(mysqli_num_rows($qry)==0){
              ?>
                <script>window.location.replace('https://www.koscove.co.in/404');</script>
                <?php 
              
                // header("location: https://www.koscove.in/404");
                
            }
            
    ?>
    <!-- section subbanner started... -->
    <section class="sub-banner">
        <picture>
            <?php
            $im=mysqli_query($con,"select * from top_cat_banner where cat_id='$cid' AND mobile='0'");
            $mim=mysqli_query($con,"select * from top_cat_banner where cat_id='$cid' AND mobile='1'");
            $si=mysqli_fetch_array($im);
            $msi=mysqli_fetch_array($mim);
            // echo "select * from top_cat_banner where cat_id='$cid' AND mobile='0'";
?>
            <source media="(max-width:767px)" srcset="<?php path();?>/assets/images/service-banner/<?php echo $msi['image']; ?>">
            <source media="(min-width:768px)" srcset="<?php path();?>/assets/images/service-banner/<?php echo $si['image']; ?>">
            <img src="#" alt="banner-img" class="">
        </picture>
        <nav aria-label="breadcrumb">
             
            <div class="container">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="<?php path();?>">Home</a></li>
                    <li class="breadcrumb-item"><a href="<?php path();?>/resource">Our Services</a></li>
                    <li class="breadcrumb-item active" aria-current="page"><?php echo $rn['cat_name']; ?></li>
                </ol>
            </div>
        </nav>
    </section>
    <!-- section subbanner ended... -->
    <!-- single process started... -->
    <section class="single-process py-40">
   
        <div class="container">
            <h1 class="title text-center mb-5"><?php echo $rn['cat_name']; ?></h1>
            <div class="row">
                <div class="col-md-6">
                     <?php echo  $row['description1']; ?>
                </div>
                <div class="col-md-6">
                    <img src="<?php path();?>/assets/images/service_img/<?php echo $row['simg']; ?>" alt="">
                </div>
            </div>
        </div>
    </section>
    <section class="single-process back_fade py-40">
        <div class="container">
            <?php echo  $row['description2'];?>
        </div>
    </section>
    <!-- single process ended... -->
    <?php include_once("assets/include/footer.php")?>
</body>
</html>