<?php
include_once("include/main.inc.php");



@extract($_REQUEST);

if (preg_match('webpulse\.co$/', $_SERVER['HTTP_HOST'], $match)) {
    $match1 = $match[1];
    $vanity_url = 'http://' . $_SERVER['HTTP_HOST'];
}
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$ee = explode('/', $actual_link);
$loc_url = $ee[3];
$cat_url = $_REQUEST['pid'];
$cats = ucwords(str_replace("-", " ", $_REQUEST['pid']));
$cat_s = "select catName, catID from category_tbl where catName='$cats' or catUrl='$cat_url'";
$cat_q = mysqli_query($GLOBALS['dbconn'], $cat_s);

if (mysqli_num_rows($cat_q) > 0) {
} else {
    header("Location: " . site_url);
    exit;
}
$num = mysqli_num_rows($cat_q);
$cat_r = mysqli_fetch_array($cat_q);
$category_id = $cat_r['catID'];
$hover='category';
$catn = $cat_r['catName'];
$cat_sql = "select catImage, catName, displayName, catDesc, catID, catDesc1, parentID,catUrl 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,catHeading1, catHeading2,alt,pageTitle,pageKeywords,pageDescription,multi_image,catDesc2 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'];

$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], 420, 630, $cat_res[catName], "/uploaded-files/category/images/");
} else {
    $imglink = getImage("noimage.jpg", 420, 630, "noimages", "/uploaded-files/category/images/");
}
$loc_sql = mysqli_query($GLOBALS['dbconn'], "select locationID,locationName,loc_url from location_tbl where loc_url='$loc_url' and status='Y'");
$location = mysqli_fetch_array($loc_sql);
$locationName = $location['locationName'];
$location_id = $location['locationID'];
$category_sub_general = mysqli_query($dbconn, "select location_ids,meta_title,meta_keyword,meta_description,description,short_description,subheadingtwo,description2 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_metatitle = $categorysubdomain['meta_title'];
            }
            if ($categorysubdomain['meta_keyword'] != '') {
                $page_metakey = $categorysubdomain['meta_keyword'];
            }
            if ($categorysubdomain['meta_description']) {
                $page_metadesc = $categorysubdomain['meta_description'];
            }
            $page_desc = $categorysubdomain['description'];
            $page_desc2 = $categorysubdomain['description2'];
        }
    }
    //    specific location content
}

if ($cat_res['keyword1'] != '' && $cat_res['keyword2'] != '' && $cat_res['keyword3'] != '') {
    $m_title = "hotkeyword1 Manufacturers in location, hotkeyword2 Suppliers, Exporters 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 Manufacturers in location, hotkeyword2 Manufacturers in location, hotkeyword1 Suppliers in location, hotkeyword2 Suppliers in location, hotkeyword1 Exporters in location, hotkeyword2 Exporters in location";
    $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 = "companyName leading hotkeyword1 Manufacturers in location, Since 1970. Premium Quality hotkeyword2 Suppliers Exporters in location, Get latest factory price for hotkeyword3. ✓Fast Delivery ✓Good Price ✓Premium Quality";
    $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 Manufacturers in location, hotkeyword2 Suppliers Exporters 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 Manufacturers in location, hotkeyword2 Manufacturers in location, hotkeyword1 Suppliers in location, hotkeyword2 Suppliers in location";
    $page_metakey = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2], str_replace('location', $locationName, $m_keyword)));
    $meta_des = "companyName leading hotkeyword1 Manufacturers in location, since 1970. Premium Quality hotkeyword2 Suppliers, Exporters in location, Get latest factory price for hotkeyword1. ✓Fast Delivery ✓Good Price";
    $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 Manufacturers in location, hotkeyword1 Suppliers Exporters in location";
    $page_metatitle = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('location', $locationName, $m_title));
    $m_keyword = "hotkeyword1 in location, hotkeyword1 Manufacturers in location, hotkeyword1 Suppliers in location, hotkeyword1 Exporters in location";
    $page_metakey = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('location', $locationName, $m_keyword));
    $meta_des = "companyName leading hotkeyword1 Manufacturers in location, Since 1970. Premium Quality hotkeyword1 Suppliers Exporters in locationh, Get latest factory price for hotkeyword1. ✓Fast Delivery ✓Good Price ✓Premium Quality";
    $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);
// for second description
$page_desc2 = str_replace('countryname', $locationName, $page_desc2);
$page_desc2 = str_replace('catname', $pid, $page_desc2);
$page_desc2 = str_replace('{location}', $locationName, $page_desc2);
$page_desc2 = str_ireplace('{companyName}', $admin_res['companyName'], $page_desc2);
// meta keywords
$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);
// if location not checked in admin
$category_sub_uncheck_loc = mysqli_query($GLOBALS['dbconn'], "select description,subheadingtwo,short_description,description2 from location_content_tbl where category_id='$category_id' AND location_id='0'");
$category_sub_uncheck_res = mysqli_fetch_array($category_sub_uncheck_loc);
// For description 1 (uncheck location)
$page_descUncheck = $category_sub_uncheck_res['description'];
$page_descUncheck = str_replace('{location}', $locationName,  $page_descUncheck);
$page_descUncheck = str_ireplace('{companyName}', $admin_res['companyName'], $page_descUncheck);
// For description 2 (uncheck location)
$page_desc2Uncheck = $category_sub_uncheck_res['description'];
$page_desc2Uncheck = str_replace('{location}', $locationName,  $page_desc2Uncheck);
$page_desc2Uncheck = str_ireplace('{companyName}', $admin_res['companyName'], $page_desc2Uncheck);
$page_desc = $page_desc != '' ? $page_desc : $page_descUncheck;
$page_desc2 = $page_desc2 != '' ? $page_desc2 : $page_desc2Uncheck;


if ($cat_res['catHeading1'] != '') {
    $heading1 = $cat_res['catHeading1'] . ' Manufacturers in ' . $locationName;
} else {
    $heading1 = $disTitles . ' Manufacturers in ' . $locationName;
}

if ($cat_res['catHeading2'] != '') {
    $heading2 = $cat_res['catHeading2'] . ' in ' . $locationName;
} else {
    $heading2 = $disTitles . ' in ' . $locationName;
}

if ($cat_res['alt'] != '') {
    $alttag = $cat_res['alt'] . ' Manufacturers in ' . $locationName;
} else {
    $alttag = $disTitles . ' Manufacturers in ' . $locationName;
}
if (mysqli_num_rows($loc_sql) > 0) {
} else {
    header("Location: " . site_url);
    exit;
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <?php include "app_top.php"; ?>
    <style>
    .slides {
        width: 50px;
        border: 1px solid #ccc;
        cursor: pointer;

    }

    .slides.active {
        border: 1px solid #b46f0d;
    }

    .item.youtube {
        display: flex;
        align-items: center;
        justify-content: center;
        background: red;
        color: #fff;
        height: 40px;
        border-radius: 5px;
        width: 40px;
    }

    .item.youtube svg {
        fill: #fff;
        width: 30px;
        height: 30px;
    }

    .product_showcase {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 0 0 6px 0;
        margin-bottom: 8px;
    }

    .productBrochureandvideo {
        margin-right: 15px;
        border: 1px dashed #16417887;
        padding: 5px;
        border-radius: 5px;
    }

    .productBrochureandvideo a {
        font-weight: 800;
        color: #508b93;
    }

    .productBrochureandvideo a svg {
        color: #508b93;
        width: 20px;
        height: 20px;
        margin-right: 5px;
    }

    .productBrochureandvideo a {
        font-weight: 800;
        color: #508b93;
    }
    </style>
</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>
            </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($loc_url); ?>/<?= getValidFileName($cat_res4['catName']); ?>.htm"
                                title="<?php echo $cat_res4['catName']; ?> "><?php echo $cat_res4['catName']; ?></a>
                        </li>
                        <?php } ?><?php if (mysqli_num_rows($cat_qry3) > 0) { ?>
                        <li><a href="<?= site_url; ?>/<?= getValidFileName($loc_url); ?>/<?= getValidFileName($cat_res3['catName']); ?>.htm"
                                title="<?php echo $cat_res3['catName']; ?>"><?php echo $cat_res3['catName']; ?></a>
                        </li>
                        <?php } ?>
                        <?php if ($cat_res2['catID'] == '1') { ?>
                        <?php if (mysqli_num_rows($cat_qry2) > 0) { ?>
                        <li>
                            <a href="javascript:void(0);"
                                title="<?php echo $cat_res2['catName']; ?>"><?php echo $cat_res2['catName']; ?></a>
                        </li>
                        <?php } else { ?>
                        <li><a href="<?= site_url; ?>/<?= getValidFileName($loc_url); ?>/<?= getValidFileName($cat_res2['catName']); ?>.htm"
                                title="<?php echo $cat_res2['catName']; ?>"><?php echo $cat_res2['catName']; ?></a>
                        </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="title_2"><?= $heading2; ?></h2> -->

            <div class="right_side">
                <div class="wps_right">
                    <div class="product_right_image">
                        <div data-bs-target="#productID" data-bs-toggle="modal"
                            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="moreBtn2"><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> Send Enquiry</span>
                        </div>

                    </div>
                    <div class="scrollbar-with">
                        <?php echo html_entity_decode($page_desc); ?>
                    </div>
                </div>
            </div>
        </div>



        <div class="container pb-5">
            <div class="right_side">
                <div class="wps_right">

                    <div class="row g-3 category-gallery">
                        <?php $gallery_122 = mysqli_query($GLOBALS['dbconn'], "select * from catgallery_tbl where FIND_IN_SET('" . $cat_res['catID'] . "',	gallery_cat) order by id ASC ");
                
                                while ($gallery_res1 = mysqli_fetch_assoc($gallery_122)) {
                                    $galImg = getImage($gallery_res1[gallery_image], 500, 500, $gallery_res1[gallery_title] . $gallery_res1[id], "/uploaded-files/catgallery/");
                                    $galImg1 = getImage($gallery_res1[gallery_image], 500, 500, $gallery_res1[galery_title] . $gallery_res1[id], "/uploaded-files/catgallery/");
                                ?>
                        <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                            <div class="gallery_item">
                                <a class="hover_effect h_yellow" data-fancybox="photo-gallery" href="<?=$galImg1;?>"
                                    title="<?=$gallery_res1['gallery_title'];?> in <?= $locationName; ?>">
                                    <img src="<?=$galImg1;?>"
                                        alt="<?=$gallery_res1['gallery_title'];?> in <?= $locationName; ?>"
                                        title="<?=$gallery_res1['gallery_title'];?> in <?= $locationName; ?>">
                                </a>

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


                    </div>

                    <!-- Product section starts -->

                    <?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) AND product_status = '1' order by product_id asc ");
                            $num = mysqli_num_rows($product_s);
                            if ($num > 0) {    ?>
                    <div class="you_may">Check Our All <?=$disTitles;?></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];
                                        $imgname = explode('.', $pro_image[0]);
                                        $prod_img = getImage($probig_img, 525, 525, $product_r['product_title'] . $imgname[0], "/uploaded-files/product-images/");
                                        $prod_imgsmall = getImage($probig_img, 60, 60, $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 productGallery">
                                        <div class="single_image">
                                            <div class="largeImage" data-bs-target="#productID" data-bs-toggle="modal"
                                                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']; ?> Manufacturers, Suppliers, Exporters in <?= $locationName; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> Manufacturers, Suppliers, Exporters in <?= $locationName; ?>');"
                                                title="<?= $product_r['product_title']; ?> Manufacturers, Suppliers, Exporters in <?= $locationName; ?>">
                                                <img id="myImage<?= $i; ?>" src="<?= $prod_img; ?>"
                                                    class="clickable-image"
                                                    alt="<?= $product_r['product_title']; ?> Manufacturers, Suppliers, Exporters in <?= $locationName; ?>"
                                                    title="<?= $product_r['product_title']; ?> Manufacturers, Suppliers, Exporters in <?= $locationName; ?>">


                                            </div>
                                        </div>

                                        <div class="small productThumbs">
                                            <?php
                                                            if (!empty($pro_image[1])) {
                                                                $snn = 1;
                                                                foreach ($pro_image as $pro_imag_vals) { ?>
                                            <img class="item <?= $snn == 1 ? 'active' : ''; ?>"
                                                src="<?= getImage($pro_imag_vals, 60, 60, $product_r['product_title'] . $product_r['product_id'] . $snn, '/uploaded-files/product-images/'); ?>"
                                                data-src="<?= getImage($pro_imag_vals, 525, 525, $product_r['product_title'] . $product_r['product_id'] . $snn, '/uploaded-files/product-images/'); ?>"
                                                alt="Product">

                                            <?php $snn++;
                                                                }
                                                            } ?>
                                            <?php if ($product_r['product_video'] != '') { ?>
                                            <div class="item youtube">
                                                <a data-fancybox=""
                                                    href="https://www.youtube.com/watch?v=<?= $product_r['product_video']; ?>">
                                                    <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">
                                                        </path>
                                                    </svg>
                                                </a>
                                            </div>
                                            <?php } ?>

                                            <?php if ($product_r['catalog'] != '') { ?>
                                            <div class="item pdf">
                                                <a data-fancybox=""
                                                    href="<?= site_url; ?>/uploaded-files/pdf/<?= $product_r['catalog']; ?>">
                                                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
                                                        fill="currentColor" viewBox="0 0 16 16">
                                                        <path
                                                            d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2M9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z" />
                                                        <path
                                                            d="M4.603 14.087a.8.8 0 0 1-.438-.42c-.195-.388-.13-.776.08-1.102.198-.307.526-.568.897-.787a7.7 7.7 0 0 1 1.482-.645 20 20 0 0 0 1.062-2.227 7.3 7.3 0 0 1-.43-1.295c-.086-.4-.119-.796-.046-1.136.075-.354.274-.672.65-.823.192-.077.4-.12.602-.077a.7.7 0 0 1 .477.365c.088.164.12.356.127.538.007.188-.012.396-.047.614-.084.51-.27 1.134-.52 1.794a11 11 0 0 0 .98 1.686 5.8 5.8 0 0 1 1.334.05c.364.066.734.195.96.465.12.144.193.32.2.518.007.192-.047.382-.138.563a1.04 1.04 0 0 1-.354.416.86.86 0 0 1-.51.138c-.331-.014-.654-.196-.933-.417a5.7 5.7 0 0 1-.911-.95 11.7 11.7 0 0 0-1.997.406 11.3 11.3 0 0 1-1.02 1.51c-.292.35-.609.656-.927.787a.8.8 0 0 1-.58.029m1.379-1.901q-.25.115-.459.238c-.328.194-.541.383-.647.547-.094.145-.096.25-.04.361q.016.032.026.044l.035-.012c.137-.056.355-.235.635-.572a8 8 0 0 0 .45-.606m1.64-1.33a13 13 0 0 1 1.01-.193 12 12 0 0 1-.51-.858 21 21 0 0 1-.5 1.05zm2.446.45q.226.245.435.41c.24.19.407.253.498.256a.1.1 0 0 0 .07-.015.3.3 0 0 0 .094-.125.44.44 0 0 0 .059-.2.1.1 0 0 0-.026-.063c-.052-.062-.2-.152-.518-.209a4 4 0 0 0-.612-.053zM8.078 7.8a7 7 0 0 0 .2-.828q.046-.282.038-.465a.6.6 0 0 0-.032-.198.5.5 0 0 0-.145.04c-.087.035-.158.106-.196.283-.04.192-.03.469.046.822q.036.167.09.346z" />
                                                    </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="productTitle"><?= $product_r['product_title']; ?> in
                                            <?= $locationName; ?></h4>
                                        <div class="more_info">

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

                                        <div class="clearfix"></div>
                                        <button class="moreBtn2" data-bs-target="#productID" data-bs-toggle="modal"
                                            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']; ?> Manufacturers, Suppliers, Exporters in <?= $locationName; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> Manufacturers, Suppliers, Exporters in <?= $locationName; ?>');"
                                            title="Send Enquiry">
                                            <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> Send Enquiry</button>

                                        <button class="moreBtn2 ms-2" data-bs-target="#whatsapp" data-bs-toggle="modal"
                                            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']; ?> Manufacturers, Suppliers, Exporters in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> Manufacturers, Suppliers, Exporters in <?= $admin_res['targetlocation']; ?>');"
                                            title="Whatsapp Enquiry">
                                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
                                                fill="currentColor" viewBox="0 0 16 16">

                                                <path
                                                    d="M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z">
                                                </path>

                                            </svg> Whatsapp Enquiry</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php $i++;
                                    } ?>
                    </div>

                    <?php } ?>
                </div>

            </div>
        </div>
                 <?php include 'app_video.php'; ?>
        <div class="right_side">
            <div class="wps_right">
                <!-- Product section ends -->
       
                <div class="container">
                    <div class="you_may">All Category Range</div>
                    <div class="allListing">
                        <div class="row g-4">
                            <?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,catUrl from category_tbl where parentID ='$parent' 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], 380, 380, $sub_res[catName], "/uploaded-files/category/images/");

                                    $img_link1 = getImage($sub_res[catImage], 380, 380, $sub_res[catName], "/uploaded-files/category/images/");
                                } else {

                                    $img_link = getImage("noimage.jpg",  380, 380, "noimages", "/uploaded-files/category/images/");

                                    $img_link1 = getImage("noimage.jpg", 380, 380, "noimages", "/uploaded-files/category/images/");
                                }

                                $caturls1 = $sub_res != '' ? $sub_res['catUrl'] : $sub_res['catName'];
                                $catIdss = $sub_res['catID'];
                                $sql_content = mysqli_query($GLOBALS['dbconn'], "select subheadingtwo,short_description,meta_title,meta_keyword,meta_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="col-lg-3 col-md-6">
                                <div class="product_listing">


                                    <div class="product">
                                        <a href="<?= site_url; ?>/<?= getValidFileName($loc_url); ?>/<?= getValidFileName($caturls1); ?>.htm"
                                            title="<?= $sub_res['displayName']; ?> Manufacturers in <?= $locationName; ?>">
                                            <div class="image1">
                                                <img src="<?= $img_link; ?>"
                                                    alt="<?= $sub_res['displayName']; ?> Manufacturers in <?= $locationName; ?>"
                                                    title="<?= $sub_res['displayName']; ?> Manufacturers in <?= $locationName; ?>">
                                            </div>
                                        </a>

                                        <!-- <p>Interested in this product?</p>
                                    <button class="moreBtn2" 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']; ?> Manufactiurers in <?= $locationName; ?>'); $('.catImg').attr('title','<?= $sub_res['displayName']; ?> Manufactiurers in <?= $locationName; ?>');"
                                        title="Send Enquiry"><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> Send Enquiry</button> -->
                                    </div>


                                    <div class="right-content">

                                        <?php
                                                if ($num <= 0) { ?>
                                        <h4 class="productTitle"><a
                                                href="<?= site_url; ?>/<?= getValidFileName($loc_url); ?>/<?= getValidFileName($caturls1); ?>.htm"
                                                title="<?= $sub_res['displayName']; ?> Manufacturers in <?= $locationName; ?>"><?= $sub_res['displayName']; ?></a>
                                        </h4>
                                        <?php } else { ?>
                                        <div class="productTitle">
                                            <a href="<?= site_url; ?>/<?= getValidFileName($loc_url); ?>/<?= getValidFileName($caturls1); ?>.htm"
                                                title="<?= $sub_res['displayName']; ?> Manufacturers in <?= $locationName; ?>"><?= $sub_res['displayName']; ?></a>
                                        </div>
                                        <?php } ?>




                                        <div class="more_info">

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

                                        <div class="clearfix"></div>
                                        <a href="<?= site_url; ?>/<?= getValidFileName($loc_url); ?>/<?= getValidFileName($caturls1); ?>.htm"
                                            class="moreBtn2">Read More <svg xmlns="http://www.w3.org/2000/svg"
                                                width="16" height="16" fill="currentColor"
                                                class="bi bi-arrow-right-circle-fill" viewBox="0 0 16 16">
                                                <path
                                                    d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0M4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5z">
                                                </path>
                                            </svg></a>

                                    </div>


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

            </div>
        </div>



        <?php include 'app_clients.php'; ?>
        <?php include "app_footer.php"; ?>
        <?php include "app_bottom.php"; ?>
        <script>
        $('.productThumbs img.item').on('click', function() {
            let largeImg = $(this).closest('.productGallery').find('.largeImage img');
            let newSrc = $(this).attr('data-src');

            largeImg.fadeOut(200, function() {
                largeImg.attr('src', newSrc).fadeIn(200);
            });
            $(this).closest('.productGallery').find(".productThumbs .item").removeClass("active");
            $(this).addClass("active");
        });
        </script>
</body>

</html>