<?php
include_once("include/main.inc.php");
@extract($_REQUEST);

$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$ee = explode('/', $actual_link);
$ca_nam1 = $ee[3];
// $ca_nam1 = ucwords(str_replace("-", " ", $ca_nam1));
$pid = ucwords(str_replace("-", " ", $_REQUEST['pid']));
$cat_s = "select catImage, catName, displayName, catDesc, catID, catDesc1,catBanner, keyword1, keyword2, keyword3, parentID, headingh1, headingh2,alttag from category_tbl where catName='$pid'";
$cat_q = mysqli_query($GLOBALS['dbconn'], $cat_s);
$num = mysqli_num_rows($cat_q);
$cat_r = mysqli_fetch_array($cat_q);
$category_id = $cat_r['catID'];
$hover = $category_id;
$catn = $cat_r['catName'];
$cat_sql = "select catImage, catName, displayName, catDesc, catID, catDesc1,catBanner, parentID from category_tbl where parentID='$category_id' and status='Y'";
$cat_qry = mysqli_query($GLOBALS['dbconn'], $cat_sql);
$cccnum = mysqli_num_rows($cat_qry);
$cat_sql1 = "select catName, displayName, catID, parentID,catImage,catDesc1,catBanner,keyword1,keyword2,keyword3,headingh1, headingh2,alttag,pageTitle,pageKeywords,pageDescription,multi_image from category_tbl where catID='$category_id'";
$cat_qry1 = mysqli_query($GLOBALS['dbconn'], $cat_sql1);
$cat_res = mysqli_fetch_array($cat_qry1);
$pageTitles = $cat_res['catName'];
$disTitles = $cat_res['displayName'];
$pdes = $cat_res['catDesc'];
$page_desc = $cat_res['catDesc1'];
$page_desc = str_ireplace('{companyName}', $admin_res['companyName'], $page_desc);
$parent = $cat_res['parentID'];
$cat_sql2 = "select catName, displayName, catID, parentID from category_tbl where catID='$parent'";
$cat_qry2 = mysqli_query($GLOBALS['dbconn'], $cat_sql2);
$num2 = mysqli_num_rows($cat_qry2);
$cat_res2 = mysqli_fetch_array($cat_qry2);
$mparent = $cat_res2['parentID'];
$cat_sql3 = "select catName, displayName, catID, parentID from category_tbl where catID='$mparent'";
$cat_qry3 = mysqli_query($GLOBALS['dbconn'], $cat_sql3);
$num3 = mysqli_num_rows($cat_qry3);
$cat_res3 = mysqli_fetch_array($cat_qry3);
$mmparent = $cat_res3['parentID'];
$cat_sql4 = "select catName, displayName, catID, parentID from category_tbl where catID='$mmparent'";
$cat_qry4 = mysqli_query($GLOBALS['dbconn'], $cat_sql4);
$num4 = mysqli_num_rows($cat_qry4);
$cat_res4 = mysqli_fetch_array($cat_qry4);
$mobile = $admin_res['mobile'];
$city = $admin_res['city'];
$state = $admin_res['state'];
$country = $admin_res['country'];
$companyName = $admin_res['companyName'];
$address = $admin_res['address'];
$multi_image = explode(',', $cat_res['multi_image']);

if ($cat_res['catImage'] != '') {
    $imglink = getImage($cat_res[catImage], 498, 498, $cat_res[catName], "/uploaded-files/category/images/");
} else {
    $imglink = getImage("noimage.jpg", 498, 498, "noimages", "/uploaded-files/category/images/");
}
$loc_Name = ucfirst(str_replace("-", " ", $ca_nam1));
$loc_sql = mysqli_query($GLOBALS['dbconn'], "select locationID, locationName, loc_url from location_tbl where loc_url='$ca_nam1' or  locationName='$loc_Name' and status='Y'");
$location = mysqli_fetch_array($loc_sql);
$location_id = $location['locationID'];
$locationName = $location['locationName'];
$category_sub_general = mysqli_query($dbconn, "select location_ids,meta_title,meta_keyword,meta_description,description,short_description,subheadingtwo from location_content_tbl where category_id='$category_id' AND location_id='0'");
$content_count = mysqli_num_rows($category_sub_general);
if ($content_count > 0) {
    while ($categorysubdomain = mysqli_fetch_array($category_sub_general)) {
        $locati = explode(",", $categorysubdomain['location_ids']);
        if (in_array($location_id, $locati)) {
            if ($categorysubdomain['meta_title'] != '') {
                $page_metatitle1 = $categorysubdomain['meta_title'];
            }
            if ($categorysubdomain['meta_keyword'] != '') {
                $page_metakey1 = $categorysubdomain['meta_keyword'];
            }
            if ($categorysubdomain['meta_description']) {
                $page_metadesc1 = $categorysubdomain['meta_description'];
            }
            $page_desc = $categorysubdomain['description'];
            $heading2 = $categorysubdomain['subheadingtwo'];
        }
    }
    //    specific location content
}
if ($cat_res['keyword1'] != '' && $cat_res['keyword2'] != '' && $cat_res['keyword3'] != '') {
    $m_title = "hotkeyword1 in location, hotkeyword2 in location";
    $page_metatitle = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2], str_replace('location', $locationName, $m_title)));
    $m_keyword = "hotkeyword1 Services in location, hotkeyword2 Services in location, hotkeyword1 Services hotkeyword2 Services";
    $page_metakey = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2], str_replace('hotkeyword3', $cat_res[keyword3], str_replace('location', $locationName, $m_keyword))));
    $meta_des = "Looking for hotkeyword1 Services in location companyName provides hotkeyword2 Services ensure precision and efficiency in every project. Contact us at +91-9116325928 for tailored solutions and exceptional results.";

    $page_metadesc = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2], str_replace('hotkeyword3', $cat_res[keyword3], str_replace('companyName', $admin_res['companyName'], str_replace('phone', $admin_res['mobile_meta'], str_replace('location', $locationName, $meta_des))))));
} else if ($cat_res['keyword1'] != '' && $cat_res['keyword2'] != '') {
    $m_title = "hotkeyword1 in location, hotkeyword2 in location";
    $page_metatitle = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2], str_replace('location', $locationName, $m_title)));
    $m_keyword = "hotkeyword1 in location, hotkeyword2 in location, hotkeyword1 hotkeyword2";
    $page_metakey = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2], str_replace('location', $locationName, $m_keyword)));
    $meta_des = "Looking for hotkeyword1 Services in location companyName provides hotkeyword2 Services ensure precision and efficiency in every project. Contact us at +91-9116325928 for tailored solutions and exceptional results.";
    $page_metadesc = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2], str_replace('companyName', $admin_res[companyName], str_replace('phone', $admin_res['mobile_meta'], str_replace('location', $locationName, $meta_des)))));
} else if ($cat_res['keyword1'] != '') {
    $m_title = "hotkeyword1 in location, hotkeyword1 in location";
    $page_metatitle = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('location', $locationName, $m_title));
    $m_keyword = "hotkeyword1 in location, hotkeyword2 in location, hotkeyword1, hotkeyword2";
    $page_metakey = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('location', $locationName, $m_keyword));
    $meta_des = "Looking for hotkeyword1 Services in location companyName provides hotkeyword1 Services ensure precision and efficiency in every project. Contact us at +91-9116325928 for tailored solutions and exceptional results.";
    $page_metadesc = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('companyName', $admin_res[companyName], str_replace('phone', $admin_res['mobile_meta'], str_replace('location', $locationName, $meta_des))));
} else {
    $page_metatitle = $page_metatitle1;
    $page_metakey = $page_metakey1;
    $page_metadesc = $page_metadesc1;
}
$page_desc = str_replace('countryname', $locationName, $page_desc);
$page_desc = str_replace('catname', $pid, $page_desc);
$page_desc = str_replace('{location}', $locationName, $page_desc);
$page_desc = str_ireplace('{companyName}', $admin_res['companyName'], $page_desc);
$page_metatitle = str_replace('countryname', $locationName, $page_metatitle);
$page_metatitle = str_replace('catname', $pid, $page_metatitle);
$page_metatitle = str_replace('{location}', $locationName, $page_metatitle);
$page_metakey = str_replace('countryname', $locationName, $page_metakey);
$page_metakey = str_replace('catname', $pid, $page_metakey);
$page_metakey = str_replace('{location}', $locationName, $page_metakey);
$page_metadesc = str_replace('countryname', $locationName, $page_metadesc);
$page_metadesc = str_replace('catname', $pid, $page_metadesc);
$page_metadesc = str_replace('{location}', $locationName, $page_metadesc);
$page_short_desc = str_replace('countryname', $locationName, $page_short_desc);
$page_short_desc = str_replace('catname', $pid, $page_short_desc);
$page_short_desc = str_replace('{location}', $locationName, $page_short_desc);
$category_sub_uncheck_loc = mysqli_query($GLOBALS['dbconn'], "select description,subheadingtwo,short_description from location_content_tbl where category_id='$category_id' AND location_id='0'");
$category_sub_uncheck_res = mysqli_fetch_array($category_sub_uncheck_loc);
$page_desc1 = $category_sub_uncheck_res['description'];
$page_desc1 = str_replace('{location}', $locationName,  $page_desc1);
$page_desc1 = str_ireplace('{companyName}', $admin_res['companyName'], $page_desc1);
$heading2_uncheck = $category_sub_uncheck_res['subheadingtwo'];

$page_desc = $page_desc != '' ? $page_desc : $page_desc1;
if ($cat_res['headingh1'] != '') {
    $heading1 = $cat_res['headingh1'] . ' in ' . $locationName;
} else {
    $heading1 = $disTitles . ' in ' . $locationName;
}



// if($category_sub_uncheck_res['subheadingtwo']!=''){
//     $heading2=$category_sub_uncheck_res['subheadingtwo'].'';
// }else{
//     $heading2=$disTitles.' Services';
// }

if ($heading2 != '') {
    $heading2Subdomain = $heading2 . '';
} elseif ($heading2_uncheck != '') {
    $heading2Subdomain = $heading2_uncheck . '';
} else {
    $heading2Subdomain =   $disTitles . ' in ' . $locationName;
}


$heading2Subdomain = str_replace('{location}', $locationName, $heading2Subdomain);
$heading2Subdomain = str_ireplace('{companyName}', $admin_res['companyName'], $heading2Subdomain);

if ($cat_res['alttag'] != '') {
    $alttag = $cat_res['alttag'] . ' in ' . $locationName;
} else {
    $alttag = $disTitles . ' in ' . $locationName;
}
if (mysqli_num_rows($loc_sql) > 0) {
} else {
    header("Location: " . site_url);
    exit;
}

if (strpos($_SERVER['REQUEST_URI'], "?") !== false) {
    $uri_parts = explode('?', $_SERVER['REQUEST_URI']);
    $linksLoc = $uri_parts[0];
    header("Location: " . site_url . $linksLoc);
    exit;
}

if (mysqli_num_rows($cat_q) > 0) { ?>
    <!DOCTYPE html>

    <html lang="en">



    <head>

        <meta charset="utf-8">

        <meta http-equiv="X-UA-Compatible" content="IE=edge">



        <?php include "app_top.php"; ?>

    </head>



    <body>



        <?php include "app_header_sub.php"; ?>



        <div class="heading_banner" style="background-image: url(<?= site_url; ?>/designer/images/category-banner.jpg)">

            <div class="container">

                <div class="row">

                    <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 text-center">

                        <h1 class="cat_title"><?= $heading1; ?></h1>

                        <div class="clearfix"></div>

                        <!-- <div class="cat_title2">We Are Available For You</div> -->

                    </div>

                </div>

            </div>

        </div>



        <div class="inner_breadcrumb hidden_xs">

            <div class="container">

                <div class="row">

                    <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">

                        <ul class="breadcrumb">

                            <li><a href="<?= site_url; ?>" title="Home">Home</a></li>
                            <?php if ($num4 > 0) { ?>
                                <li><a href="<?= site_url; ?>/<?= getValidFileName($ca_nam1); ?>/<?= getValidFileName($cat_res4['catName']); ?>.htm"
                                        title="<?php echo $cat_res4['catName']; ?> "><?php echo $cat_res4['catName']; ?></a>
                                </li>
                            <?php } ?>
                            <?php if ($num3 > 0) { ?>

                                <li>
                                    <?php if ($cat_res3['catID'] == '1' || $cat_res3['catID'] == '14' || $cat_res3['catID'] == '9' || $cat_res3['catID'] == '10' || $cat_res3['catID'] == '18' || $cat_res3['catID'] == '19') { ?>
                                        <a href="javascript:void()"
                                            title="<?php echo $cat_res3['catName']; ?>"><?php echo $cat_res3['catName']; ?></a>
                                    <?php } else {  ?>
                                        <a href="<?= site_url; ?>/<?= getValidFileName($cat_res3['catName']); ?>.htm"
                                            title="<?php echo $cat_res3['catName']; ?>"><?php echo $cat_res3['catName']; ?></a>
                                    <?php } ?>
                                </li>
                            <?php } ?>
                            <?php if ($num2 > 0) {

                            ?>
                                <li>
                                    <?php if ($cat_res2['catID'] == '1' || $cat_res2['catID'] == '14' || $cat_res2['catID'] == '9' || $cat_res2['catID'] == '10' || $cat_res2['catID'] == '18' || $cat_res2['catID'] == '19') { ?>
                                        <a href="javascript:void()"
                                            title="<?php echo $cat_res2['catName']; ?>"><?php echo $cat_res2['catName']; ?></a>
                                    <?php } else {  ?>
                                        <a href="<?= site_url; ?>/<?= getValidFileName($ca_nam1); ?>/<?= getValidFileName($cat_res2['catName']); ?>.htm"
                                            title="<?php echo $cat_res2['catName']; ?>"><?php echo $cat_res2['catName']; ?></a>
                                    <?php } ?>
                                </li>
                            <?php  } ?>

                            <li class="active"><?php echo $cat_res['catName']; ?></li>

                        </ul>

                    </div>

                </div>

            </div>

        </div>



        <div class="category_page">

            <div class="container">

                <h2 class="section-title-2 text-center wow fadeInDown animated mb-4" data-wow-delay=".1s" style="visibility: visible; animation-delay: 0.1s; animation-name: fadeInDown;"><span class="line-divider-separator">

                    </span> <?= $heading2Subdomain; ?> <span class="outline-style-2"> </span> <br></h2>

                <div class="clearfix"></div>

                <div class="row">

                    <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">

                        <div class="wps_right">

                            <div class="product_right_image">

                                <a href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID" onclick="$('.catID').val('<?php echo $cat_res['catID']; ?>');
                                        $('.catName').html('<?php echo $cat_res['catName']; ?>');
                                        $('.catImg').attr('src','<?= $imglink; ?>');  $('.catImg').attr('alt','<?= $alttag; ?>'); $('.catImg').attr('title','<?= $alttag; ?>');">

                                    <div class="detail_image">

                                        <img class="img-responsive" src="<?= $imglink; ?>" alt="<?= $alttag; ?>" title="<?= $alttag; ?>">

                                    </div>

                                    <span class="read_more">

                                        <span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">

                                                <path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z"></path>

                                            </svg> Get Best Quote</span></span>

                                </a>



                            </div>

                            <?php echo html_entity_decode($page_desc); ?>



                            <div class="prodeccct_sec">

                                <div class="container">
                                    <?php
                                    $product_s = mysqli_query($GLOBALS['dbconn'], "select product_image,product_title,catalog,product_id,product_video,product_specfi from product_tbl where   FIND_IN_SET('" . $cat_res['catID'] . "',product_cat) ");
                                    $num = mysqli_num_rows($product_s);
                                    if ($num > 0) {    ?>

                                        <div class="you_may">You may Also Like These</div>

                                        <div class="allListing">
                                            <?php $i = 1;

                                            while ($product_r = mysqli_fetch_array($product_s)) {
                                                $pro_image =  explode(',', $product_r['product_image']);
                                                $probig_img = $pro_image[0];
                                                $prod_img = getImage($probig_img, 400, 400, $product_r['product_title'], "/uploaded-files/product-images/");
                                                $prod_imgsmall = getImage($probig_img, 175, 177, $product_r['product_title'], "/uploaded-files/product-images/");
                                            ?>

                                                <div class="product_listing">

                                                    <div class="row">

                                                        <div class="col-xxl-5 col-xl-5 col-lg-5 col-md-5 col-sm-5 col-12">

                                                            <div class="product">

                                                                <div class="w-100">

                                                                    <a class="largeImage"
                                                                        href="javascript:void(0);" data-bs-toggle="modal"
                                                                        data-bs-target="#productID"
                                                                        onclick="

var src = $(this).find('img.clickable-image').attr('src');

$('.catID').val('<?php echo $product_r['product_id']; ?>');

$('.catName').html('<?php echo $product_r['product_title']; ?>');  $('.catImg').attr('src', src); $('.catImg').attr('alt','<?= $product_r['product_title']; ?> in <?= $locationName; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> in <?= $locationName; ?>');"

                                                                        title="<?= $product_r['product_title']; ?> in <?= $locationName; ?>">


                                                                        <img id="myImage<?= $product_r['product_id']; ?>" class="clickable-image" onclick=" var src = $(this).find('img.clickable-image').attr('src'); $('.catID').val('<?php echo $product_r['product_id']; ?>');
$('.catName').html('<?php echo $product_r['product_title']; ?>');  $('.catImg').attr('src',src); $('.catImg').attr('alt','<?= $product_r['product_title']; ?> in <?= $locationName; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> in <?= $locationName; ?>');" title="<?= $product_r['product_title']; ?> in <?= $locationName; ?>" src="<?= $prod_img; ?>"
                                                                            alt="<?= $product_r['product_title']; ?> Services in <?= $admin_res['targetlocation']; ?>"
                                                                            title="<?= $product_r['product_title']; ?> Services in <?= $admin_res['targetlocation']; ?>">

                                                                    </a>

                                                                </div>

                                                                <div class="slider">
                                                                    <?php

                                                                    if (!empty($pro_image[1])) {
                                                                        $snn = 1;
                                                                        foreach ($pro_image as $pro_imag_vals) { ?>

                                                                            <div class="slides active"
                                                                                onclick="imgMulti(<?= $product_r['product_id']; ?>, '<?= getImage($pro_imag_vals, 506, 506, $product_r['product_title'] . $product_r['product_id'] . $snn, '/uploaded-files/product-images/'); ?>', this)">
                                                                                <img src="<?= getImage($pro_imag_vals, 50, 50, $product_r['product_title'] . $product_r['product_id'] . $snn, '/uploaded-files/product-images/'); ?>" alt="<?= $product_r['product_title']; ?> Manufacturers, Suppliers in <?= $locationName; ?>" title="<?= $product_r['product_title']; ?> Manufacturers, Suppliers in <?= $locationName; ?>">

                                                                            </div>
                                                                    <?php $snn++;
                                                                        }
                                                                    } ?>

                                                                    <!-- <img class="item" src="designer/images/image5.jpg" alt="Product">

                                            <img class="item" src="designer/images/image6.jpg" alt="Product"> -->
                                                                    <?php if ($product_r['product_video'] != '') { ?>

                                                                        <div class="item youtube">

                                                                            <a data-fancybox href="https://youtu.be/<?= $product_r['product_video']; ?>?si=omZU3ukCNaItsJIJ">

                                                                                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">

                                                                                    <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z" />

                                                                                </svg></a>

                                                                        </div>
                                                                    <?php } ?>

                                                                </div>

                                                            </div>

                                                        </div>



                                                        <div class="col-xxl-7 col-xl-7 col-lg-7 col-md-7 col-sm-7 col-12">

                                                            <div class="right-content">

                                                                <h4 class="title4"><?= $product_r['product_title']; ?></h4>

                                                                <div class="blue-line1"></div>

                                                                <?= html_entity_decode($product_r['product_specfi']); ?>



                                                                <div class="clearfix"></div>

                                                                <a class="read_more" href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID" onclick="$('.catID').val('<?php echo $product_r['product_id']; ?>');

$('.catName').html('<?php echo $product_r['product_title']; ?>');  $('.catImg').attr('src','<?= site_url; ?>/uploaded-files/product-images/<?= $probig_img; ?>'); $('.catImg').attr('alt','<?= $product_r['product_title']; ?> in <?= $locationName; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> Services in <?= $locationName; ?>');" title="<?= $product_r['product_title']; ?> Services in <?= $locationName; ?>" title="Get Best Quote">

                                                                    <span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">

                                                                            <path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z" />

                                                                        </svg> Get Best Quote</span></a>

                                                                <a href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#callback" onclick="$('.catID').val('<?php echo $product_r['product_id']; ?>');

$('.catName').html('<?php echo $product_r['product_title']; ?>');  $('.catImg').attr('src','<?= site_url; ?>/uploaded-files/product-images/<?= $probig_img; ?>'); $('.catImg').attr('alt','<?= $product_r['product_title']; ?> Services in <?= $locationName; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> Services in <?= $locationName; ?>');" class="read_more callback">

                                                                    <span><svg fill="currentColor" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">

                                                                            <g data-name="Layer 2">

                                                                                <g data-name="phone-call">

                                                                                    <rect width="24" height="24" opacity="0" />

                                                                                    <path d="M13 8a3 3 0 0 1 3 3 1 1 0 0 0 2 0 5 5 0 0 0-5-5 1 1 0 0 0 0 2z" />

                                                                                    <path d="M13 4a7 7 0 0 1 7 7 1 1 0 0 0 2 0 9 9 0 0 0-9-9 1 1 0 0 0 0 2z" />

                                                                                    <path d="M21.75 15.91a1 1 0 0 0-.72-.65l-6-1.37a1 1 0 0 0-.92.26c-.14.13-.15.14-.8 1.38a9.91 9.91 0 0 1-4.87-4.89C9.71 10 9.72 10 9.85 9.85a1 1 0 0 0 .26-.92L8.74 3a1 1 0 0 0-.65-.72 3.79 3.79 0 0 0-.72-.18A3.94 3.94 0 0 0 6.6 2 4.6 4.6 0 0 0 2 6.6 15.42 15.42 0 0 0 17.4 22a4.6 4.6 0 0 0 4.6-4.6 4.77 4.77 0 0 0-.06-.76 4.34 4.34 0 0 0-.19-.73zM17.4 20A13.41 13.41 0 0 1 4 6.6 2.61 2.61 0 0 1 6.6 4h.33L8 8.64l-.54.28c-.86.45-1.54.81-1.18 1.59a11.85 11.85 0 0 0 7.18 7.21c.84.34 1.17-.29 1.62-1.16l.29-.55L20 17.07v.33a2.61 2.61 0 0 1-2.6 2.6z" />

                                                                                </g>

                                                                            </g>

                                                                        </svg> Request A Callback</span></a>

                                                            </div>

                                                        </div>

                                                    </div>

                                                </div>

                                                <script>
                                                    $('#small<?= $i; ?> .item').click(function() {

                                                        $('#bigImage<?= $i; ?> img').attr('src', $(this).attr('src').replace('thumb', 'large'));

                                                        if ($(this).hasClass("active")) {

                                                            $("#small<?= $i; ?> .item").removeClass("active");

                                                        } else {

                                                            $("#small<?= $i; ?> .item").removeClass("active");

                                                            $(this).addClass("active");

                                                        }

                                                    });
                                                </script>

                                            <?php $i++;
                                            } ?>




                                        </div>
                                    <?php } ?>
                                </div>

                            </div>


                            <div class="you_may">All Category Range</div>

                            <div class="allListing">
                                <?php

                                if (mysqli_num_rows($cat_qry) > 1) {
                                    $subcat_sql = $cat_qry;
                                } else {
                                    $subcat_sql = mysqli_query($GLOBALS['dbconn'], "select catImage, catName, displayName, catDesc, catID, catDesc1, parentID from category_tbl where parentID ='$parent' and status='Y' and catID!='$category_id' order by catOrder Asc");
                                }
                                if (mysqli_num_rows($subcat_sql) < 2) {
                                    $subcat_sql = mysqli_query($GLOBALS['dbconn'], "select catImage, catName, displayName, catDesc, catID, catDesc1, parentID from category_tbl where parentID ='14' and status='Y' and catID!='$category_id' order by catOrder Asc");
                                }

                                while ($sub_res = mysqli_fetch_array($subcat_sql)) {

                                    if ($sub_res['catImage'] != '') {
                                        $img_link = getImage($sub_res[catImage], 375, 375, $sub_res[catName], "/uploaded-files/category/images/");
                                        $img_link1 = getImage($sub_res[catImage], 375, 375, $sub_res[catName], "/uploaded-files/category/images/");
                                    } else {
                                        $img_link = getImage("noimage.jpg",  375, 375, "noimages", "/uploaded-files/category/images/");
                                        $img_link1 = getImage("noimage.jpg", 375, 375, "noimages", "/uploaded-files/category/images/");
                                    }
                                    // echo $sub_res['catDesc'];
                                    $catIdss = $sub_res['catID'];
                                    $sql_content = mysqli_query($GLOBALS['dbconn'], "select subheadingtwo,short_description from location_content_tbl where category_id ='$catIdss'");
                                    $res_content = mysqli_fetch_array($sql_content);
                                    $subcontent_descc = html_entity_decode($res_content['short_description']);
                                    $subcontent_desccc = str_replace('{location}', $locationName, $subcontent_descc);
                                    $subcontent_descccc = str_replace('catname', $res_cat['catName'], $subcontent_desccc);
                                    $subcontent_descccc = str_ireplace('{companyName}', $admin_res['companyName'], $subcontent_descccc);
                                ?>


                                    <div class="product_listing">

                                        <div class="row">

                                            <div class="col-xxl-4 col-xl-4 col-lg-4 col-md-4 col-sm-5 col-12">

                                                <div class="product">

                                                    <a href="<?= site_url; ?>/<?= getValidFileName($ca_nam1); ?>/<?= getValidFileName($sub_res['catName']); ?>.htm" title="<?= $sub_res['displayName']; ?> in <?= $locationName; ?>">

                                                        <div class="image1">

                                                            <img src="<?= $img_link; ?>" alt="<?= $sub_res['displayName']; ?> in <?= $locationName; ?>" title="<?= $sub_res['displayName']; ?> in <?= $locationName; ?>">

                                                        </div>

                                                    </a>

                                                </div>

                                            </div>

                                            <div class="col-xxl-8 col-xl-8 col-lg-8 col-md-8 col-sm-7 col-12">

                                                <div class="right-content">

                                                    <div class="title4"><a href="<?= site_url; ?>/<?= getValidFileName($ca_nam1); ?>/<?= getValidFileName($sub_res['catName']); ?>.htm" title="<?= $sub_res['displayName']; ?> in <?= $locationName; ?>"><?= $sub_res['displayName']; ?></a></div>

                                                    <div class="blue-line1"></div>

                                                    <div class="more_info">

                                                        <p><?= $subcontent_descccc; ?>...</p>



                                                    </div>



                                                    <div class="clearfix"></div>

                                                    <a class="read_more" href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID" onclick="$('.catID').val('<?php echo $sub_res['catID']; ?>');
                                                $('.catName').html('<?php echo $sub_res['catName']; ?>');
                                                $('.catImg').attr('src','<?= $img_link1; ?>'); $('.catImg').attr('alt','<?= $sub_res['displayName']; ?> Services in <?= $locationName; ?>'); $('.catImg').attr('title','<?= $sub_res['displayName']; ?> Services in <?= $locationName; ?>');" title="Get Best Quote">

                                                        <span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">

                                                                <path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z" />

                                                            </svg> Get Best Quote</span></a>

                                                    <a href="<?= site_url; ?>/<?= getValidFileName($ca_nam1); ?>/<?= getValidFileName($sub_res['catName']); ?>.htm" class="read_more" title="Read More"><span> Read More <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">

                                                                <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"></path>

                                                            </svg></span></a>



                                                </div>

                                            </div>

                                        </div>

                                    </div>
                                <?php } ?>




                            </div>

                        </div>

                    </div>

                </div>

            </div>

        </div>





        <?php include "app_faq.php"; ?>
        <div class="home_blog video_gallery bg-light py-5">
            <div class="container">
                <div class="title-headings">
                    <div class="title_1">Latest Videos From Our YouTube Channel</div>
                    <p class="w-75 mx-auto text-center">
                        Check out our latest videos featuring innovative solutions, behind-the-scenes insights, and client
                        success stories. From expert design techniques to transformative project showcases, our channel
                        highlights the quality and expertise we bring to every endeavor. Stay informed with our newest
                        content and discover how we turn ideas into impactful, real-world results.
                    </p>
                </div>
                <div class="row g-2 mb-0">
                    <div class="col-lg-4 col-md-6 col-12">
                        <div class="vd_bx">
                            <img loading="lazy" src="https://img.youtube.com/vi/GGUanlk1TJI/hqdefault.jpg"
                                alt="Canntech Services Pvt Ltd" title="Canntech Services Pvt Ltd" width="480" height="360">
                            <a href="https://youtu.be/GGUanlk1TJI?si=jROWNjf1eUDBiO3M" data-fancybox=""
                                class="video-play-icon" title="Canntech Services Pvt Ltd">
                                <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
                                    class="bi bi-play-fill" viewBox="0 0 16 16">
                                    <path
                                        d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z">
                                    </path>
                                </svg>
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-6 col-12">
                        <div class="vd_bx">
                            <img loading="lazy" src="https://img.youtube.com/vi/8QX6MSy0E0Q/hqdefault.jpg"
                                alt="Canntech Services Pvt Ltd" title="Canntech Services Pvt Ltd" width="480" height="360">
                            <a href="https://youtu.be/8QX6MSy0E0Q?si=Zzv7CkYZHkknPxhq" data-fancybox=""
                                class="video-play-icon" title="Canntech Services Pvt Ltd">
                                <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
                                    class="bi bi-play-fill" viewBox="0 0 16 16">
                                    <path
                                        d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z">
                                    </path>
                                </svg>
                            </a>
                        </div>
                    </div>

                    <div class="col-lg-4 col-md-6 col-12">
                        <div class="vd_bx">
                            <img loading="lazy" src="https://img.youtube.com/vi/xgpJojDFaDQ/hqdefault.jpg"
                                alt="Canntech Services Pvt Ltd" title="Canntech Services Pvt Ltd" width="480" height="360">
                            <a href="https://youtu.be/xgpJojDFaDQ?si=HwluwvNHkeeQLlZQ" data-fancybox=""
                                class="video-play-icon" title="Canntech Services Pvt Ltd">
                                <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
                                    class="bi bi-play-fill" viewBox="0 0 16 16">
                                    <path
                                        d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z">
                                    </path>
                                </svg>
                            </a>
                        </div>
                    </div>


                </div>

            </div>
        </div>
        <?php include "app_footer_sub.php"; ?>

        <?php include "app_bottom.php"; ?>
        <script>
            function imgMulti(id, url, elm) {
                document.getElementById(`myImage${id}`).src = url;
                $(elm).addClass('active').siblings().removeClass('active');
            }
        </script>


    </body>



    </html>
<?php
} else {
    header("Location: " . site_url);
    exit;
}
?>