<?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 = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$ee = explode('/', $actual_link);
$mm = $ee[3];
$ss = explode('.', $mm);
$cc = $ss[0];
$cat = str_replace("-", " ", $cc);
$cats = ucfirst($cat);
$cat_s = "select * from category_tbl where catName='$cats'";
$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';
$catn = $cat_r['catName'];
$cat_sql = "select * 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 * 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'];
$pdes1 = $cat_res['catDesc1'];
$parent = $cat_res['parentID'];
$cat_sql2 = "select * 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 * 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 * 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);
$admin_sql = mysqli_query($GLOBALS['dbconn'], "select * from admin_details");
$admin_res = mysqli_fetch_array($admin_sql);
$mobile = $admin_res['mobile'];
$city = $admin_res['city'];
$state = $admin_res['state'];
$country = $admin_res['country'];
$companyName = $admin_res['companyName'];
$address = $admin_res['address'];
if ($cat_res['catImage'] != '') {
    $imglink = getImage($cat_res[catImage], 499, 499, $cat_res[catName], "/uploaded-files/category/images/");
} else {
    $imglink = NO_IMG_URL;
}
if ($cat_res['keyword1'] != '' && $cat_res['keyword2'] != '' && $cat_res['keyword3'] != '') {
    // echo "3";
    // exit;
    $m_title = "hotkeyword1 Manufacturers in Ahmedabad,hotkeyword2 Suppliers in Gujarat";
    $page_metatitle = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2],  str_replace('state', $admin_res[targetlocation], str_replace('country', $admin_res[country], $m_title))));

    $m_keyword = "hotkeyword1 in state,hotkeyword2 in state,hotkeyword3 in state, hotkeyword1 Manufacturers in state,hotkeyword2 Manufacturers in state, hotkeyword3 Manufacturers in state,hotkeyword1 Suppliers in state,hotkeyword2 Suppliers in state";
    $page_metakey = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2], str_replace('hotkeyword3', $cat_res[keyword3], str_replace('state', $admin_res[targetlocation], $m_keyword))));

    $m_desc = "companyName leading hotkeyword1 Manufacturers in city, since 2016. Premium Quality hotkeyword2 Suppliers in state, Get latest factory price for hotkeyword3. Call +91-8980428094, ✓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], str_replace('hotkeyword3', $cat_res[keyword3], str_replace('state', $admin_res[targetlocation], str_replace('country', $admin_res[country], $m_desc))))))));
} else if ($cat_res['keyword1'] != '' && $cat_res['keyword2'] != '') {
    // echo "2";
    // exit;
    $m_title = "hotkeyword1 Manufacturers in Ahmedabad,hotkeyword2 Suppliers in Gujarat";
    $page_metatitle = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2],  str_replace('state', $admin_res[targetlocation], str_replace('country', $admin_res[country], $m_title))));

    $m_keyword = "hotkeyword1 in state,hotkeyword2 in state, hotkeyword1 Manufacturers in state,hotkeyword2 Manufacturers in state,hotkeyword1 Suppliers in state,hotkeyword2 Suppliers in state";
    $page_metakey = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('hotkeyword2', $cat_res[keyword2],  str_replace('state', $admin_res[targetlocation], $m_keyword)));

    $m_desc = "companyName leading hotkeyword1 Manufacturers in city, since 2016. Premium Quality hotkeyword2 Suppliers in state, Get latest factory price. Call +91-8980428094, ✓Fast Delivery ✓Good Price ✓Premium Quality";

    $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], str_replace('city', $admin_res[city], str_replace('state', $admin_res[state], str_replace('country', $admin_res[country], $m_desc)))))));
} else if ($cat_res['keyword1'] != '') {
    // echo "1";
    // exit;
    $m_title = "hotkeyword1 Manufacturers in Ahmedabad,hotkeyword1 Suppliers in Gujarat";
    $page_metatitle = str_replace('hotkeyword1', $cat_res[keyword1], str_replace('state', $admin_res[targetlocation], str_replace('country', $admin_res[country], $m_title)));

    $m_keyword = "hotkeyword1 in state,hotkeyword1 Manufacturers in state,hotkeyword1 Suppliers in state";
    $page_metakey = str_replace('hotkeyword1', $cat_res[keyword1],  str_replace('state', $admin_res[targetlocation], $m_keyword));

    $m_desc = "companyName leading hotkeyword1 Manufacturers in city, since 2016. Premium Quality hotkeyword2 Suppliers in state, Get latest factory price. Call +91-8980428094, ✓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], str_replace('state', $admin_res[targetlocation], str_replace('country', $admin_res[country], $m_desc)))));
} else {
    // echo "0";
    // exit;
    $page_metatitle = $cat_res['pageTitle'];
    $page_metakey = $cat_res['pageKeywords'];
    $page_metadesc = $cat_res['pageDescription'];
}
$heading2 = explode(',', $page_metatitle);
if ($heading2[0] != '') {
    $h2 = $heading2[0];
} else {
    $h2 = $disTitles . ' in ' . $admin_res['targetlocation'];
}
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.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"><?= $disTitles; ?> Manufacturers</h1>
                        <div class="clearfix"></div>
                        <!-- <div class="cat_title2">Quality Snacks, Made Effortlessly By Our Machines</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 ($num4 > 0) { ?>
                                <li><a href="<?= site_url; ?>/<?= getValidFileName($cat_res4['catName']); ?>.htm" title="<?php echo $cat_res4['catName']; ?> "><?php echo $cat_res4['catName']; ?></a>
                                </li>
                            <?php } ?>
                            <?php if ($num3 > 0) { ?>
                                <li><a href="javascript:void(0)" title="<?php echo $cat_res3['catName']; ?>"><?php echo $cat_res3['catName']; ?></a></li>
                            <?php } ?>
                            <?php if ($num2 > 0) { ?>
                                <?php if ($cat_res2['parentID'] == '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($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>
        <?php if ($cat_res['parentID'] == '0') { ?>
            <section class="category_page">
                <div class="container">
                    <h2 class="title_2"><?= $disTitles; ?> in <?= $admin_res['targetlocation']; ?></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="#" 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','<?= $h2; ?>'); $('.catImg').attr('title','<?= $h2; ?>');" title="<?= $h2; ?>">
                                        <div class="detail_image">
                                            <img class="img-responsive" src="<?= $imglink; ?>" alt="<?= $h2; ?>" title="<?= $h2; ?>">
                                        </div>
                                    </a>

                                    <div class="buttons">

                                    <a href="https://www.youtube.com/watch?v=q6l3JgDEqvM" data-fancybox="" class="youTubeBtn" title="Youtube video">
                                        <svg version="1.1" viewBox="0 0 68 48">
                                            <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>


                                    <a class="read_more_1 bg_btn_1" href="#" 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','<?= $h2; ?>'); $('.catImg').attr('title','<?= $h2; ?>');" title="<?= $h2; ?>"><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><span></span><span></span><span></span></a>

                                    </div>







                                </div>
                                <?php echo html_entity_decode($cat_res['catDesc1']); ?>

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



                                    <?php
                                    while ($sub_res = mysqli_fetch_array($cat_qry)) {
                                        if ($sub_res['catImage'] != '') {
                                            $img_link = getImage($sub_res[catImage], 374, 374, $sub_res[catName], "/uploaded-files/category/images/");
                                            $img_link1 = getImage($sub_res[catImage], 435, 428, $sub_res[catName], "/uploaded-files/category/images/");
                                        } else {
                                            $img_link = NO_IMG_URL;
                                            $img_link1 = NO_IMG_URL;
                                        }
                                    ?>

                                        <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($sub_res['catName']); ?>.htm" title="<?= $sub_res['displayName']; ?> in <?= $admin_res['targetlocation']; ?>">
                                                            <div class="image1">
                                                                <img src="<?= $img_link; ?>" alt="<?= $h2; ?>" title="<?= $h2; ?>">
                                                            </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">
                                                        <h4><a href="<?= site_url; ?>/<?= getValidFileName($sub_res['catName']); ?>.htm" title="<?= $sub_res['displayName']; ?> in <?= $admin_res['targetlocation']; ?>"><?= $sub_res['displayName']; ?></a>
                                                        </h4>
                                                        <div class="blue-line1"></div>
                                                        <div class="more_info">

                                                            <p> <?= html_entity_decode($sub_res['catDesc']); ?></p>
                                                        </div>

                                                        <div class="clearfix"></div>
                                                        <a class="read_more_1 bg_btn_1" 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']; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $sub_res['displayName']; ?> in <?= $admin_res['targetlocation']; ?>');" 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" />
                                                            </svg> Get Best Quote
                                                            <span></span><span></span><span></span><span></span></a>
                                                        <a href="<?= site_url; ?>/<?= getValidFileName($sub_res['catName']); ?>.htm" class="read_more_1 bg_btn_1" title="Read More">Read More
                                                            <span></span><span></span><span></span><span></span></a>

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

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

        <?php } else { ?>



            <section class="category_page">
                <div class="container">
                    <h2 class="title_2"><?= $disTitles; ?> in <?= $admin_res['targetlocation']; ?></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">
                                    <div class="more_images">
                                        <div class="single_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','<?= $disTitles; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $disTitles; ?> in <?= $admin_res['targetlocation']; ?>');" title="Get Best Quote"><img id="largeImage" src="<?= $imglink; ?>" alt="<?= $h2; ?>" title="<?= $h2; ?>">
                                            </a>
                                        </div>
                                    </div>

                                    
                                    <div class="buttons">
                                    <?php if ($cat_res['catVideo'] != '') { ?>
                                    <a href="https://www.youtube.com/watch?v=<?= $cat_res['catVideo']; ?>" data-fancybox="" class="youTubeBtn" title="Youtube video">
                                        <svg version="1.1" viewBox="0 0 68 48">
                                            <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>
                                    <?php }?>
                                    <a class="read_more_1 bg_btn_1" 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','<?= $disTitles; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $disTitles; ?> in <?= $admin_res['targetlocation']; ?>');" 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></span><span></span><span></span><span></span></a>


                                    </div>



                                </div>

                                <?php echo html_entity_decode($cat_res['catDesc1']); ?>

                                <!-- <div class="interested_section">
                            <a class="interested_btn" 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','<?= $disTitles; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $disTitles; ?> in <?= $admin_res['targetlocation']; ?>');"
                                title="Yes, I Am Interested"><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> Yes, I am Interested</a>
                        </div> -->
                                <?php $product_s = mysqli_query($GLOBALS['dbconn'], "select * 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="you_may">Products Related To <?=$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]; ?>

                                            <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="single_image">
                                                                <a class="largeImage" id="bigImage<?= $i; ?>" 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',$('.mycatimg_<?php echo $product_r['product_id']; ?> ').attr('src')); $('.catImg').attr('alt','<?= $product_r['product_title']; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> in <?= $admin_res['targetlocation']; ?>');" title="<?= $product_r['product_title']; ?>">
                                                                    <img class="mycatimg_<?= $product_r['product_id']; ?>" src="<?= getImage($probig_img, 523, 523, $product_r[product_title], "/uploaded-files/product-images/"); ?>" alt="<?= $product_r['product_title']; ?> Manufacturers, Suppliers in <?= $admin_res['targetlocation']; ?>" title=" <?= $product_r['product_title']; ?> Manufacturers, Suppliers in <?= $admin_res['targetlocation']; ?>">
                                                                </a>
                                                            </div>
                                                            <div id="small<?= $i; ?>" class="small">
                                                                <?php
                                                                if (!empty($pro_image[1])) {
                                                                    $count = 1;
                                                                    foreach ($pro_image as $pro_imag_vals) { ?>
                                                                        <img class="item active" src="<?= getImage($pro_imag_vals, 523, 523, $product_r[product_title] . $count, "/uploaded-files/product-images/"); ?>" alt="<?= $product_r['product_title']; ?> Manufacturers, Suppliers in <?= $admin_res['targetlocation']; ?>" title="<?= $product_r['product_title']; ?> Manufacturers, Suppliers in <?= $admin_res['targetlocation']; ?>">
                                                                <?php $count++;
                                                                    }
                                                                } ?>

                                                            </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><?= $product_r['product_title']; ?></h4>
                                                            <div class="blue-line1"></div>
                                                            <div class="more_info">


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

                                                            <div class="clearfix"></div>
                                                            <a class="read_more_1 bg_btn_1" 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',$('.mycatimg_<?php echo $product_r['product_id']; ?> ').attr('src')); $('.catImg').attr('alt','<?= $product_r['product_title']; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> in <?= $admin_res['targetlocation']; ?>');" 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" />
                                                                </svg> Get Best Quote
                                                                <span></span><span></span><span></span><span></span></a>
                                                            <a class="read_more_1 bg_btn_1 callback moreBtn callback" 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',$('.mycatimg_<?php echo $product_r['product_id']; ?> ').attr('src')); $('.catImg').attr('alt','<?= $product_r['product_title']; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $product_r['product_title']; ?> in <?= $admin_res['targetlocation']; ?>');" title="Request A Callback">




                                                                <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></span><span></span><span></span><span></span></a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <script>
                                                $('#small<?= $i; ?> .item').click(function() {
                                                    $('#bigImage<?= $i; ?> img').attr('src', $(this).attr('src').replace('thumb',
                                                        'thumb'));
                                                    if ($(this).hasClass("active")) {
                                                        $("#small<?= $i; ?> .item").removeClass("active");
                                                    } else {
                                                        $("#small<?= $i; ?> .item").removeClass("active");
                                                        $(this).addClass("active");
                                                    }
                                                });
                                            </script>


                                        <?php $i++;
                                        } ?>

                                    </div>
                                <?php } ?>



                                <div class="you_may">All Category Range</div>
                                <div class="allListing">
                                    <?php
                                    $cat_final = mysqli_query($GLOBALS['dbconn'], "select * from category_tbl where parentID ='$parent' and status='Y' and catID!='$category_id' order by catOrder Asc");
                                    while ($sub_res = mysqli_fetch_array($cat_final)) {
                                        if ($sub_res['catImage'] != '') {
                                            $img_link = getImage($sub_res[catImage], 374, 374, $sub_res[catName], "/uploaded-files/category/images/");
                                            $img_link1 = getImage($sub_res[catImage], 435, 428, $sub_res[catName], "/uploaded-files/category/images/");
                                        } else {
                                            $img_link = NO_IMG_URL;
                                            $img_link1 = NO_IMG_URL;
                                        }
                                    ?>


                                        <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($sub_res['catName']); ?>.htm" title="<?= $sub_res['displayName']; ?> in <?= $admin_res['targetlocation']; ?>">
                                                            <div class="image1">
                                                                <img src="<?= $img_link; ?>" alt="<?= $sub_res['displayName']; ?> in <?= $admin_res['targetlocation']; ?>" title="<?= $sub_res['displayName']; ?> in <?= $admin_res['targetlocation']; ?>">
                                                            </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">
                                                        <h4><a href="<?= site_url; ?>/<?= getValidFileName($sub_res['catName']); ?>.htm" title="<?= $sub_res['displayName']; ?> in <?= $admin_res['targetlocation']; ?>"><?= $sub_res['displayName']; ?></a>
                                                            </h4>
                                                            <div class="blue-line1"></div>
                                                            <div class="more_info">
                                                                <p> <?= html_entity_decode($sub_res['catDesc']); ?></p>
                                                            </div>

                                                            <div class="clearfix"></div>
                                                            <a class="read_more_1 bg_btn_1" 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']; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $sub_res['displayName']; ?> in <?= $admin_res['targetlocation']; ?>');" 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" />
                                                                </svg> Get Best Quote
                                                                <span></span><span></span><span></span><span></span></a>
                                                            <a href="<?= site_url; ?>/<?= getValidFileName($sub_res['catName']); ?>.htm" class="read_more_1 bg_btn_1" title="Read More ">Read More
                                                                <span></span><span></span><span></span><span></span></a>

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

                                    <?php } ?>
                                </div>

                            </div>

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




        <?php include "app_clients.php"; ?>
        <?php include "app_footer.php"; ?>
        <?php include "app_bottom.php"; ?>

    </body>

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