<?php
include('include/main.inc.php');
$actual_links = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
$ex_cat = explode("/", $actual_links);
$loc_url = $ex_cat[3];
$locat = str_ireplace("-", " ", $loc_url);
$location_name = ucwords($locat);
$cat_url = $ex_cat[4];
$cat_name = explode(".", $cat_url);
$catName = str_ireplace("-", " ", $cat_name[0]);
$catName = ucwords($catName);
$sel_cat_query = "select * from category_tbl where catName ='$catName'";
$res_cat = $dbconn->query($sel_cat_query);
if ($res_cat->num_rows > 0) {
    $cat_details = $res_cat->fetch_assoc();

    $sel_loca_query = "Select * from location_tbl where locationName = '$location_name'";
    $res_loca = $dbconn->query($sel_loca_query);
    $locatios = $res_loca->fetch_assoc();
    if ($res_loca->num_rows == 0) {
        header('location:' . site_url);
    }
    $location_id = $locatios['locationID'];
    // echo $location_id;die;
    $description = '';
    $short_description = '';
    $sel_specific_category = "Select * from location_content_tbl where category_id = '" . $cat_details['catID'] . "'";
    $res_specific_cat = $dbconn->query($sel_specific_category);
    if ($res_specific_cat->num_rows > 0) {
        while ($specific_categories = $res_specific_cat->fetch_assoc()) {
            $locat = explode(",", $specific_categories['location_ids']);
            if (in_array($location_id, $locat)) {
                if ($specific_categories['meta_title'] != '') {
                    $page_metatitle = $specific_categories['meta_title'];
                }
                if ($specific_categories['meta_keyword'] != '') {
                    $page_metakey = $specific_categories['meta_keyword'];
                }
                if ($specific_categories['meta_description'] != '') {
                    $page_metadesc = $specific_categories['meta_description'];
                }
                $description = $specific_categories['description'];
            }
        }
    } else {
        $page_metatitle = ($cat_details['pageTitle']) ? $cat_details['pageTitle'] . ' in ' . $location_name : '';
        $page_metakey = ($cat_details['pageKeywords']) ? $cat_details['pageKeywords'] . ' in ' . $location_name : '';
        $page_metadesc = ($cat_details['pageDescription']) ? $cat_details['pageDescription'] . ' in ' . $location_name : '';
    }

    $web_det_query = "Select * from admin_details where slno = '1'";
    $res_web = $dbconn->query($web_det_query);
    $web_details = $res_web->fetch_assoc();

    $page_metatitle = str_ireplace("{location}", $location_name, $page_metatitle);
    $page_metadesc = str_ireplace("{location}", $location_name, $page_metadesc);
    $page_metakey = str_ireplace("{location}", $location_name, $page_metakey);
    $description = str_ireplace("{location}", $location_name, $description);

    $page_metatitle = ($page_metatitle) ? $page_metatitle : $cat_details['keyword1'] . ' Manufacturers in ' . $location_name . ', ' . $cat_details['keyword2'] . ' Suppliers, Wholesalers in ' . $location_name;
    $page_metadesc = ($page_metadesc) ? $page_metadesc : $web_details['companyName'] . ' is the leading ' . $cat_details['keyword1'] . ' Manufacturers in ' . $location_name . '. Best Quality ' . $cat_details['keyword2'] . ' Suppliers, Wholesalers in ' . $location_name . ' at Factory Price. Call +91-9811176505';
    $page_metakey = ($page_metakey) ? $page_metakey : $cat_details['keyword1'] . ' in ' . $location_name . ', ' . $cat_details['keyword2'] . ' in ' . $location_name .', ' . $cat_details['keyword1'] . ' Manufacturers in ' . $location_name . ', ' . $cat_details['keyword2'] . ' Manufacturers in ' . $location_name . ', ' . $cat_details['keyword1'] . ' Suppliers in ' . $location_name . ', ' . $cat_details['keyword2'] . ' Suppliers in ' . $location_name . ', ' . $cat_details['keyword1'] . ' Wholesalers in ' . $location_name . ', ' . $cat_details['keyword2'] . ' Wholesalers in ' . $location_name;

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

  }

?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?= $page_metatitle; ?></title>
    <meta name="description" content="<?= $page_metadesc; ?>">
    <meta name="keywords" content="<?= $page_metakey; ?>">
    <?php include "app_top.php"; ?>
</head>

<body>

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

    <section 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"><?php if ($cat_details['catID'] == 1) {
                                                    echo "Shuttering Materials";
                                                } else { ?><?= $cat_details['displayName'];
                                                        } ?> Manufacturers in <?= $location_name; ?></h1>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </section>

    <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 ($cat_details['parentID'] != 0) {
                                $sel_pr_cat_query = "select * from category_tbl where catID = '" . $cat_details['parentID'] . "'";
                                $res_pr_cat = $dbconn->query($sel_pr_cat_query);
                                $res_cat_pr = $res_pr_cat->fetch_assoc();
                                $res_pr_href = str_ireplace(" ", "-", $res_cat_pr['catName']);
                            ?>
                        <li><a href="<?= site_url . '/' . $location . '/' . strtolower($res_pr_href); ?>.htm"
                                title="<?= $res_cat_pr['displayName']; ?>"><?= $res_cat_pr['displayName']; ?></a></li>
                        <?php } ?>
                        <li class="active"><?= $cat_details['displayName']; ?></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <section class="category_page">
        <div class="container">
            <!-- <h2 class="title_2"><?php if ($cat_details['catID'] == 1) {
                                        echo "Shuttering Materials";
                                    } else { ?><?= $cat_details['displayName'];
                                            } ?> in <?= $location_name; ?></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"><?php if ($cat_details['catImage']) { ?>
                            <a href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID"
                                class="main-category-image"
                                title="<?php if ($cat_details['catID'] == 1) {
                                                                                                                                                            echo "Shuttering Materials";
                                                                                                                                                        } else { ?><?= $cat_details['displayName'];
                                                                                                                                                                } ?> Manufacturers in <?= $location_name; ?>">
                                <div class="detail_image">
                                    <img class="img-responsive main-cat-image"
                                        src="<?= site_url . '/uploaded-files/category/images/' . $cat_details['catImage']; ?>"
                                        alt="<?php if ($cat_details['catID'] == 1) {
                                                                                                                                                                                        echo "Shuttering Materials";
                                                                                                                                                                                    } else { ?><?= $cat_details['displayName'];
                                                                                                                                                                                            } ?> Manufacturers in <?= $location_name; ?>"
                                        title="<?php if ($cat_details['catID'] == 1) {
                                                                                                                                                                                                                                                        echo "Shuttering Materials";
                                                                                                                                                                                                                                                    } else { ?><?= $cat_details['displayName'];
                                                                                                                                                                                                                                                        } ?> Manufacturers in <?= $location_name; ?>">
                                    <input type="hidden" class="main_heading"
                                        value="<?= $cat_details['displayName']; ?>">
                                </div>
                                <span class="read_more_btn" title="Get Best Quote"><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>
                            </a>
                            <?php } ?>
                        </div>
                        <?= $description; ?>
                        <?php
                            $sub_cat_query = "select * from category_tbl where parentID = '" . $cat_details['catID'] . "' order by catOrder asc";
                            $res_cat = $dbconn->query($sub_cat_query);
                            if ($res_cat->num_rows > 0) {
                            ?>
                        <div class="you_may">All Category Related to <?= $cat_details['displayName']; ?></div>
                        <div class="allListing">
                            <?php while ($sub_cat_det = $res_cat->fetch_assoc()) {
                                        $sub_cat_href = str_ireplace(" ", "-", $sub_cat_det['catName']);
                                        $sel_specific_category = "Select * from location_content_tbl where category_id = '" . $sub_cat_det['catID'] . "'";
                                        $res_specific_cat = $dbconn->query($sel_specific_category);
                                        if ($res_specific_cat->num_rows > 0) {
                                            while ($specific_categories = $res_specific_cat->fetch_assoc()) {
                                                $locat = explode(",", $specific_categories['location_ids']);
                                                if (in_array($location_id, $locat)) {
                                                    $short_description = str_ireplace("{location}", $location_name, $specific_categories['short_description']);
                                                }
                                            }
                                        }
                                    ?>
                            <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"><?php if ($sub_cat_det['catImage']) { ?>
                                            <a href="<?= site_url . '/' . $location . '/' . strtolower($sub_cat_href); ?>.htm"
                                                title="<?= $sub_cat_det['displayName']; ?> Manufacturers in <?= $location_name; ?>">
                                                <div class="image1">
                                                    <img class="category_image<?= $sub_cat_det['catID']; ?>"
                                                        src="<?= getImage($sub_cat_det['catImage'], 300, 300, $sub_cat_det['catName'], "/uploaded-files/category/images/"); ?>"
                                                        alt="<?= $sub_cat_det['displayName']; ?> Manufacturers in <?= $location_name; ?>"
                                                        title="<?= $sub_cat_det['displayName']; ?> Manufacturers in <?= $location_name; ?>">
                                                </div>
                                            </a><?php } ?>
                                        </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 class="category_title<?= $sub_cat_det['catID']; ?>"
                                                    href="<?= site_url . '/' . $location . '/' . strtolower($sub_cat_href); ?>.htm"
                                                    title="<?= $sub_cat_det['displayName']; ?> Manufacturers in <?= $location_name; ?>"><?= $sub_cat_det['displayName']; ?></a>
                                            </div>
                                            <div class="blue-line1"></div>
                                            <div class="more_info">
                                                <?= $short_description; ?>
                                            </div>
                                            <div class="clearfix"></div>
                                            <a class="read_more_btn pop_cat_id" href="javascript:void(0);"
                                                data-bs-toggle="modal" data-bs-target="#productID"
                                                title="Get Best Quote"><input type="hidden" class="cat_id"
                                                    value="<?= $sub_cat_det['catID']; ?>"><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</a>
                                            <a href="<?= site_url . '/' . $location . '/' . strtolower($sub_cat_href); ?>.htm"
                                                class="read_more_btn" title="Read More">Read More</a>

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php } ?>
                        </div>
                        <?php } else {
                                $sel_product_query = "SELECT * FROM `product_tbl` WHERE prodcut_subcat = '" . $cat_details['catID'] . "' order by product_id desc";
                                $res_product = $dbconn->query($sel_product_query);
                                if ($res_product->num_rows > 0) {
                                ?>
                        <div class="you_may">Product Related to <?= $cat_details['displayName']; ?></div>
                        <div class="allListing">
                            <?php
                                        $sno = 0;
                                        while ($products = $res_product->fetch_assoc()) {
                                            $sno++;
                                            $pr_href = str_ireplace(" - ", "-", $products['product_title']);
                                            $pro_href = str_ireplace(" ", "-", $pr_href);
                                            $product_href = $pro_href . '-' . $products['product_id'];
                                        ?>
                            <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">
                                            <?php
                                                            $pr_images = explode(",", $products['product_image']);
                                                            $prno = 0;
                                                            foreach ($pr_images as $image) {
                                                                $prno++;
                                                                if ($prno == 1) {
                                                            ?>
                                            <div class="single_image">
                                                <a class="largeImage product_pop_up" href="javascript:void(0);"
                                                    data-bs-toggle="modal" data-bs-target="#productID"
                                                    title="<?= $products['product_title']; ?> Manufacturers, Suppliers and Wholesalers in <?= $location_name; ?>"><input
                                                        type="hidden" class="product_id"
                                                        value="<?= $products['product_id']; ?>">
                                                    <img class="activeImage<?= $sno; ?> product_image<?= $products['product_id']; ?>"
                                                        src="<?= site_url . '/uploaded-files/product-images/' . $image; ?>"
                                                        alt="<?= $products['product_title']; ?> Manufacturers, Suppliers and Wholesalers in <?= $location_name; ?>"
                                                        title="<?= $products['product_title']; ?> Manufacturers, Suppliers and Wholesalers in <?= $location_name; ?>">
                                                </a>
                                            </div>
                                            <?php }
                                                            } ?>
                                            <div id="small<?= $sno; ?>" class="small">
                                                <?php $prno = 0;
                                                                foreach ($pr_images as $image) {
                                                                    $prno++; ?>
                                                <img class="item product_aimage <?= ($prno == 1) ? 'active' : ''; ?>"
                                                    src="<?= site_url . '/uploaded-files/product-images/' . $image; ?>"
                                                    alt="<?= $products['product_title']; ?> Manufacturers, Suppliers and Wholesalers in <?= $location_name; ?>"
                                                    title="<?= $products['product_title']; ?> Manufacturers, Suppliers and Wholesalers in <?= $location_name; ?>">
                                                <?php } ?>
                                                <input type="hidden" class="pr_sno" value="<?= $sno; ?>">
                                                <?php if ($products['product_video']) { ?>
                                                <div class="item youtube">
                                                    <a data-fancybox href="<?= $products['product_video']; ?>"
                                                        title="<?= $products['product_title']; ?> Manufacturers, Suppliers and Wholesalers in <?= $location_name; ?>">
                                                        <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"><?= $products['product_title']; ?> in <?= $location_name; ?></a></h4>
                                            <div class="blue-line1"></div>
                                            <!-- <div class="d-flex align-items-center gap-2 mb-3">
                                                                <div class="productBrochureandvideo">
                                                                    <a href="#" title="Product Brochure" target="_blank">
                                                                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-filetype-pdf" viewBox="0 0 16 16">
                                                                            <path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5L14 4.5ZM1.6 11.85H0v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38.574.574 0 0 1-.238.241.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084 0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592 1.14 1.14 0 0 1-.196.422.8.8 0 0 1-.334.252 1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z">
                                                                            </path>
                                                                        </svg>

                                                                        <span>Product Brochure</span>
                                                                    </a>
                                                                </div>
                                                                <a href="" data-fancybox="" class="v-btn">
                                                                    <svg version="1.1" viewBox="0 0 68 48" width="45">
                                                                        <path class="ytp-large-play-button-bg" d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="#f00"></path>
                                                                        <path d="M 45,24 27,14 27,34" fill="#fff"></path>
                                                                    </svg>
                                                                </a>
                                                            </div> -->
                                            <div class="more_info">
                                                <?= $products['product_specfi']; ?>
                                            </div>

                                            <div class="clearfix"></div>
                                            <a class="read_more_btn product_pop_up" href="javascript:void(0);"
                                                data-bs-toggle="modal" data-bs-target="#productID"
                                                title="Get Best Quote"><input type="hidden" class="product_id"
                                                    value="<?= $products['product_id']; ?>"><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</a>
                                            <a href="javascript:void(0);" data-bs-toggle="modal"
                                                data-bs-target="#callback"
                                                class="read_more_btn callback Request_call_back"
                                                title="Request A Callback"><input type="hidden" class="product_id"
                                                    value="<?= $products['product_id']; ?>">
                                                <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</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php } ?>
                        </div>
                        <?php }
                                $sub_cat_query = "select * from category_tbl where parentID = '" . $cat_details['parentID'] . "' and catID != '" . $cat_details['catID'] . "' order by catOrder asc";
                                $res_cat = $dbconn->query($sub_cat_query);
                                if ($res_cat->num_rows > 0) {
                                ?>
                        <div class="you_may">You May Also Like These</div>
                        <div class="allListing">
                            <?php while ($sub_cat_det = $res_cat->fetch_assoc()) {
                                            $sub_cat_href = str_ireplace(" ", "-", $sub_cat_det['catName']);
                                            $sel_specific_category = "Select * from location_content_tbl where category_id = '" . $sub_cat_det['catID'] . "'";
                                            $res_specific_cat = $dbconn->query($sel_specific_category);
                                            if ($res_specific_cat->num_rows > 0) {
                                                while ($specific_categories = $res_specific_cat->fetch_assoc()) {
                                                    $locat = explode(",", $specific_categories['location_ids']);
                                                    if (in_array($location_id, $locat)) {
                                                        $short_description = str_ireplace("{location}", $location_name, $specific_categories['short_description']);
                                                    }
                                                }
                                            }
                                        ?>
                            <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"><?php if ($sub_cat_det['catImage']) { ?>
                                            <a href="<?= site_url . '/' . $location . '/' . strtolower($sub_cat_href); ?>.htm"
                                                title="<?= $sub_cat_det['displayName']; ?> Manufacturers in <?= $location_name; ?>">
                                                <div class="image1">
                                                    <img class="category_image<?= $sub_cat_det['catID']; ?>"
                                                        src="<?= getImage($sub_cat_det['catImage'], 300, 300, $sub_cat_det['catName'], "/uploaded-files/category/images/"); ?>"
                                                        alt="<?= $sub_cat_det['displayName']; ?> Manufacturers in <?= $location_name; ?>"
                                                        title="<?= $sub_cat_det['displayName']; ?> Manufacturers in <?= $location_name; ?>">
                                                </div>
                                            </a><?php } ?>
                                        </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 class="category_title<?= $sub_cat_det['catID']; ?>"
                                                    href="<?= site_url . '/' . $location . '/' . strtolower($sub_cat_href); ?>.htm"
                                                    title="<?= $sub_cat_det['displayName']; ?> Manufacturers in <?= $location_name; ?>"><?= $sub_cat_det['displayName']; ?></a>
                                            </div>
                                            <div class="blue-line1"></div>
                                            <div class="more_info">
                                                <?= $short_description; ?>
                                            </div>

                                            <div class="clearfix"></div>
                                            <a class="read_more_btn pop_cat_id" href="javascript:void(0);"
                                                data-bs-toggle="modal" data-bs-target="#productID"
                                                title="Get Best Quote"><input type="hidden" class="cat_id"
                                                    value="<?= $sub_cat_det['catID']; ?>"><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</a>
                                            <a href="<?= site_url . '/' . $location . '/' . strtolower($sub_cat_href); ?>.htm"
                                                class="read_more_btn" title="Read More">Read More</a>

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


    <?php //include "app_faq.php";
        ?>
          <?php include 'app_factory.php'; ?>

    <?php include "app_footer_sub.php"; ?>
    <?php include "app_bottom.php"; ?>
    <script>
    $(document).ready(function() {
        $('.product_aimage').click(function() {
            var pr_image = $(this).attr('src');
            var s_no = $(this).siblings('.pr_sno').val();
            $('.activeImage' + s_no).attr('src', pr_image);
        });
    })
    </script>
</body>

</html>
<?php } else {
    header('location:' . site_url);
} ?>