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

if($cat_res['catImage']!=''){
    $imglink= getImage($cat_res[catImage], 498, 498, $cat_res[catName],"/uploaded-files/category/images/");
    } else {
        $imglink= getImage("noimage (6).jpg", 498, 498, "noimages","/uploaded-files/category/images/");
    } 
    $loc_Name = ucfirst(str_replace("-", " ", $ca_nam1));
    $loc_sql=mysqli_query($GLOBALS['dbconn'], "select locationID,locationName,loc_url from location_tbl where loc_url='$ca_nam1' or  locationName='$loc_Name' and status='Y'");
    $location = mysqli_fetch_array($loc_sql);
    $location_id = $location['locationID']; 
    $locationName = $location['locationName'];
    $category_sub_general=mysqli_query($dbconn,"select location_ids,meta_title,meta_keyword,meta_description,description,short_description,subheadingtwo from location_content_tbl where category_id='$category_id' AND location_id='0'");
    $content_count = mysqli_num_rows($category_sub_general);
    if($content_count > 0){
        while($categorysubdomain=mysqli_fetch_array($category_sub_general)){
            $locati = explode(",", $categorysubdomain['location_ids']);
            if(in_array($location_id, $locati)){
                if($categorysubdomain['meta_title'] != ''){
                    $page_metatitle1=$categorysubdomain['meta_title'];
                }
                if($categorysubdomain['meta_keyword'] != ''){
                    $page_metakey1=$categorysubdomain['meta_keyword'];
                }
                if($categorysubdomain['meta_description']){
                    $page_metadesc1=$categorysubdomain['meta_description'];
                }
                $page_desc=$categorysubdomain['description'];
            }
        }
    //    specific location content
    }
    if($cat_res['keyword1']!='' && $cat_res['keyword2']!='' && $cat_res['keyword3']!=''){
        $m_title = "hotkeyword1 Manufacturers in location, hotkeyword2 Exporters Retailers location"; 
       $page_metatitle = str_replace('hotkeyword1',$cat_res['keyword1'],str_replace('hotkeyword2', $cat_res['keyword2'], str_replace('location', $locationName,$m_title)));
       $m_keyword = "hotkeyword1 Manufacturers in location, hotkeyword2 Manufacturers in location, hotkeyword1 Exporters in location, hotkeyword2 Exporters in location, hotkeyword1 Retailers in location, hotkeyword2 Retailers in location, hotkeyword1 in location, hotkeyword2 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 = "Looking for Premium Quality hotkeyword1 Manufacturers in location? companyName - Leading Exporters Retailers of hotkeyword2 Since 2018, Supplying at ✓Factory Price. Call phone.";    
       $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 Exporters Retailers location";  
           $page_metatitle = str_replace('hotkeyword1',$cat_res['keyword1'],str_replace('hotkeyword2', $cat_res['keyword2'], str_replace('location', $locationName,$m_title)));
           $m_keyword = "hotkeyword1 Manufacturers in location, hotkeyword2 Manufacturers in location, hotkeyword1 Exporters in location, hotkeyword2 Exporters in location, hotkeyword1 Retailers in location, hotkeyword2 Retailers in location, hotkeyword1 in location, hotkeyword2 in location";
           $page_metakey = str_replace('hotkeyword1',$cat_res['keyword1'],str_replace('hotkeyword2', $cat_res['keyword2'], str_replace('location', $locationName,$m_keyword)));
           $meta_des = "Looking for Premium Quality hotkeyword1 Manufacturers in location? companyName - Leading Exporters Retailers of hotkeyword2 Since 2018, Supplying at ✓Factory Price. Call phone.";    
           $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 Exporters Retailers location";  
           $page_metatitle = str_replace('hotkeyword1',$cat_res['keyword1'], str_replace('location', $locationName,$m_title));
           $m_keyword = "hotkeyword1 Manufacturers in location, hotkeyword1 Exporters in location, hotkeyword1 Retailers in location, hotkeyword1 in location";
           $page_metakey = str_replace('hotkeyword1',$cat_res['keyword1'], str_replace('location', $locationName,$m_keyword));
           $meta_des = "Looking for Premium Quality hotkeyword1 Manufacturers in location? companyName - Leading Exporters Retailers of hotkeyword1 Since 2018, Supplying at ✓Factory Price. Call phone.";    
           $page_metadesc = str_replace('hotkeyword1',$cat_res['keyword1'], str_replace('companyName', $admin_res['companyName'], str_replace('phone',$admin_res['mobile_meta'], str_replace('location', $locationName,$meta_des))));
       } else{
           $page_metatitle=$page_metatitle1;
           $page_metakey=$page_metakey1;
           $page_metadesc=$page_metadesc1;
       }
    $page_desc = str_replace('countryname',$locationName, $page_desc);
    $page_desc = str_replace('catname',$pid, $page_desc);
    $page_desc = str_replace('{location}',$locationName, $page_desc);
    $page_desc=str_ireplace('{companyName}',$admin_res['companyName'],$page_desc);
    $page_metatitle = str_replace('countryname',$locationName, $page_metatitle);
    $page_metatitle = str_replace('catname',$pid, $page_metatitle);
    $page_metatitle = str_replace('{location}',$locationName, $page_metatitle);
    $page_metakey = str_replace('countryname',$locationName, $page_metakey);
    $page_metakey = str_replace('catname',$pid, $page_metakey);
    $page_metakey = str_replace('{location}',$locationName, $page_metakey);
    $page_metadesc = str_replace('countryname',$locationName, $page_metadesc);
    $page_metadesc = str_replace('catname',$pid, $page_metadesc);
    $page_metadesc = str_replace('{location}',$locationName, $page_metadesc);
    $page_short_desc = str_replace('countryname',$locationName, $page_short_desc);
    $page_short_desc = str_replace('catname',$pid, $page_short_desc);
    $page_short_desc = str_replace('{location}',$locationName, $page_short_desc);
    $category_sub_uncheck_loc=mysqli_query($GLOBALS['dbconn'],"select description,subheadingtwo,short_description from location_content_tbl where category_id='$category_id' AND location_id='0'");
    $category_sub_uncheck_res=mysqli_fetch_array($category_sub_uncheck_loc);
    $page_desc1=$category_sub_uncheck_res['description'];
    $page_desc1 = str_replace('{location}',$locationName,  $page_desc1);
    $page_desc1=str_ireplace('{companyName}',$admin_res['companyName'],$page_desc1);
$page_desc=$page_desc!=''?$page_desc:$page_desc1;
if($cat_res['headingh1']!=''){
    $heading1=$cat_res['headingh1'].' Manufacturers in '.$locationName;
}else{
    $heading1=$disTitles.' Manufacturers in '.$locationName;
}



if($category_sub_uncheck_res['subheadingtwo']!=''){
    $heading2=$category_sub_uncheck_res['subheadingtwo'].'';
}else{
    $heading2=$disTitles.' in '.$locationName;
}
$heading2 = str_replace('{location}', $locationName, $heading2);
$heading2 = str_ireplace('{companyName}', $admin_res['companyName'], $heading2);

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

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

if(mysqli_num_rows($cat_q) > 0)
{ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <?php include "app_top.php"; ?>
</head>

<body>
    <?php include "app_header_sub.php"; ?>
    <section class="heading_banner" style="background-image: url(<?=site_url;?>/designer/images/about-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>
    </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($ca_nam1);?>/<?=getValidFileName($cat_res4['catName']);?>.htm"
                                title="<?php echo $cat_res4['catName']; ?> "><?php echo $cat_res4['catName']; ?></a>
                        </li>
                        <?php } ?>
                        <?php if($num3 > 0) {?>
                        <li>
                            <?php if ($cat_res3['catID'] == '1') { ?>
                            <a href="javascript:void(0);"
                                title="<?php echo $cat_res3['catName']; ?>"><?php echo $cat_res3['catName']; ?></a>
                            <?php } else {  ?>
                            <a href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($cat_res3['catName']);?>.htm"
                                title="<?php echo $cat_res3['catName']; ?>"><?php echo $cat_res3['catName']; ?></a>
                            <?php } ?>
                        </li>
                        <?php } ?>
                        <?php if($num2 > 0) {
                            ?>
                        <li>
                            <?php  if($cat_res2['catID']=='1'){ ?>
                            <a href="javascript:void()"
                                title="<?php echo $cat_res2['catName']; ?>"><?php echo $cat_res2['catName']; ?></a>
                            <?php }else{  ?>
                            <a href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($cat_res2['catName']);?>.htm"
                                title="<?php echo $cat_res2['catName']; ?>"><?php echo $cat_res2['catName']; ?></a>
                            <?php } ?>
                        </li>
                        <?php  } ?>
                        <li class="active"><?php echo $cat_res['catName'];?></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <section class="category_page">
        <div class="container">
            <h2 class="title_1"><?=$heading2;?></h2>
            <div class="clearfix"></div>
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <div class="wps_right">
                        <div class="product_right_image">
                            <a href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID"
                                onclick="$('.catID').val('<?php echo $cat_res['catID'];?>');
                                        $('.catName').html('<?php echo $cat_res['catName'];?>');
                                        $('.catImg').attr('src','<?=$imglink;?>');  $('.catImg').attr('alt','<?=$alttag;?>'); $('.catImg').attr('title','<?=$alttag;?>');" title="<?=$alttag;?>">
                                <div class="detail_image">
                                    <img class="img-responsive" src="<?=$imglink;?>" alt="<?=$alttag;?>"
                                        title="<?=$alttag;?>">
                                </div>
                                <span class="readMore mt-3"><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>
                        </div>
                        <?php echo html_entity_decode($page_desc);?>
                     
                    </div>
                </div>
            </div>
        </div>
    </section>
      <div class="gallery_page bg-white">

        <div class="container">

            <div class="title_1">How To Attach A Toupee</div>

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

            <div class="row g-3">
                <?php $catgallery = mysqli_query($GLOBALS['dbconn'], "select gallery_image,gallery_title,image_name,id from attach_toupee_tbl  ");
                    
                    while ($catgallery_res1 = mysqli_fetch_assoc($catgallery)) {
                        $galImg = getImage($catgallery_res1['gallery_image'], 600, 600, $catgallery_res1['gallery_title'] . $catgallery_res1['id'], "/uploaded-files/catgallery-images/");
                        $galImg1 = getImage($catgallery_res1['gallery_image'], 600, 600, $catgallery_res1['gallery_title'] . $catgallery_res1['id'], "/uploaded-files/catgallery-images/");
                        
                    ?>

                <div class="col-6 col-md-6 col-lg-4">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= $galImg; ?>"
                            title="<?= $catgallery_res1['gallery_title']; ?>">

                            <img loading="lazy" src="<?= $galImg; ?>" alt="<?= $catgallery_res1['gallery_title']; ?>"
                                title="<?= $catgallery_res1['gallery_title']; ?>">

                        </a>
                        <div class="gallery-item1 text-center">
                            <?= $catgallery_res1['gallery_title']; ?>
                        </div>


                    </div>


                </div>


                <?php } ?>


                <!-- <div class="col-6 col-md-6 col-lg-4">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= site_url; ?>/designer/images/Wash-the-scalp.jpg">

                            <img loading="lazy" src="<?= site_url; ?>/designer/images/Wash-the-scalp.jpg"
                                alt="Shave The Area Clean" title="Shave The Area Clean">

                        </a>
                        <div class="gallery-item1 text-center">
                            Wash the Scalp
                        </div>
                    </div>

                </div>

                <div class="col-6 col-md-6 col-lg-4">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery"
                            href="<?= site_url; ?>/designer/images/Attach-the-toupee-with-toupee-tape.jpg">

                            <img loading="lazy"
                                src="<?= site_url; ?>/designer/images/Attach-the-toupee-with-toupee-tape.jpg"
                                alt="Attach the Toupee with Toupee Tape" title="Attach the Toupee with Toupee Tape">

                        </a>
                        <div class="gallery-item1 text-center">
                            Attach the Toupee with Toupee Tape
                        </div>
                    </div>

                </div>

                <div class="col-6 col-md-6 col-lg-4">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery"
                            href="<?= site_url; ?>/designer/images/install-the-hair-system.jpg">

                            <img loading="lazy" src="<?= site_url; ?>/designer/images/install-the-hair-system.jpg"
                                alt="install-the-hair-system" title="install-the-hair-system">

                        </a>
                        <div class="gallery-item1 text-center">
                            Install The Hair System
                        </div>
                    </div>

                </div>

                <div class="col-6 col-md-6 col-lg-4">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= site_url; ?>/designer/images/cut-and-style-hair.jpg">

                            <img loading="lazy" src="<?= site_url; ?>/designer/images/cut-and-style-hair.jpg"
                                alt="cut-and-style-hair" title="cut-and-style-hair">

                        </a>
                        <div class="gallery-item1 text-center">
                            Cut & Style Hair
                        </div>
                    </div>

                </div> -->



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

    <div class="gallery_page">

        <div class="container">

            <div class="title_1">Can be used in all formats</div>

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

            <div class="row g-3">

                <?php $used_all_formats_gallery = mysqli_query($GLOBALS['dbconn'], "select gallery_image,gallery_title,image_name,id from used_all_formats_tbl ");
                     
                    while ($used_all_formats_gallery_res1 = mysqli_fetch_assoc($used_all_formats_gallery)) {
                        $galImg = getImage($used_all_formats_gallery_res1['gallery_image'], 600, 600, $used_all_formats_gallery_res1['gallery_title'] . $catgallery_res1['id'], "/uploaded-files/used-all-formats-images/");
                        $galImg1 = getImage($used_all_formats_gallery_res1['gallery_image'], 600, 600, $used_all_formats_gallery_res1['gallery_title'] . $catgallery_res1['id'], "/uploaded-files/used-all-formats-images/");
                       
                    ?>

                <div class="col-6 col-md-6 col-lg-3">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= $galImg1; ?>"
                            title="<?= $used_all_formats_gallery_res1['gallery_title']; ?>">

                            <img loading="lazy" src="<?= $galImg; ?>"
                                alt="<?= $used_all_formats_gallery_res1['gallery_title']; ?>"
                                title="<?= $used_all_formats_gallery_res1['gallery_title']; ?>">

                        </a>
                        <div class="gallery-item1 text-center">
                            <?= $used_all_formats_gallery_res1['gallery_title']; ?>
                        </div>


                    </div>

                </div>

                <?php } ?>

                <!-- <div class="col-6 col-md-6 col-lg-3">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= site_url; ?>/designer/images/bathing.jpg">

                            <img loading="lazy" src="<?= site_url; ?>/designer/images/bathing.jpg" alt="bathing"
                                title="bathing">

                        </a>
                        <div class="gallery-item1 text-center">
                            Bathing
                        </div>
                    </div>

                </div>

                <div class="col-6 col-md-6 col-lg-3">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= site_url; ?>/designer/images/sleep.jpg">

                            <img loading="lazy" src="<?= site_url; ?>/designer/images/sleep.jpg" alt="sleep"
                                title="sleep">

                        </a>
                        <div class="gallery-item1 text-center">
                            Sleep
                        </div>
                    </div>

                </div>

                <div class="col-6 col-md-6 col-lg-3">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= site_url; ?>/designer/images/sports.jpg">

                            <img loading="lazy" src="<?= site_url; ?>/designer/images/sports.jpg" alt="sports"
                                title="sports">

                        </a>
                        <div class="gallery-item1 text-center">
                            Sports
                        </div>
                    </div>

                </div> -->






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

    <div class="gallery_page bg-white">

        <div class="container">

            <div class="title_1"> Before After</div>

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

            <div class="row g-3">

                <?php $before_after_gallery = mysqli_query($GLOBALS['dbconn'], "select gallery_image,gallery_title,image_name,id from before_after_tbl");
                     
                    while ($before_after_gallery_res1 = mysqli_fetch_assoc($before_after_gallery)) {
                        $galImg = getImage($before_after_gallery_res1['gallery_image'], 600, 600, $before_after_gallery_res1['gallery_title'] . $catgallery_res1['id'], "/uploaded-files/before-after-images/");
                        $galImg1 = getImage($before_after_gallery_res1['gallery_image'], 600, 600, $before_after_gallery_res1['gallery_title'] . $catgallery_res1['id'], "/uploaded-files/before-after-images/");
                       
                    ?>


                <div class="col-6 col-md-6 col-lg-4">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= $galImg1; ?>"
                            title="<?= $before_after_gallery_res1['gallery_title']; ?>">

                            <img loading="lazy" src="<?= $galImg; ?>"
                                alt="<?= $before_after_gallery_res1['gallery_title']; ?>"
                                title="<?= $before_after_gallery_res1['gallery_title']; ?>">

                        </a>



                    </div>

                </div>

                <?php } ?>


                <!-- <div class="col-6 col-md-6 col-lg-4">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= site_url; ?>/designer/images/image2.jpg">

                            <img loading="lazy" src="<?= site_url; ?>/designer/images/image2.jpg" alt="image2"
                                title="bathing">

                        </a>
                    
                    </div>

                </div>

                <div class="col-6 col-md-6 col-lg-4">

                    <div class="gallery-bx m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= site_url; ?>/designer/images/image3.jpg">

                            <img loading="lazy" src="<?= site_url; ?>/designer/images/image3.jpg" alt="image3"
                                title="image3">

                        </a>
                 
                    </div>

                </div> -->








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


    <div class="gallery_page">

        <div class="container">

            <div class="title_1"> Customer Review</div>

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

            <div class="row g-3">

                <?php 
                  $i = 1;
                $customer_review_gallery = mysqli_query($GLOBALS['dbconn'], "select gallery_image,gallery_title,image_name,id from customer_review_tbl");
                     
                    while ($customer_review_gallery_res1 = mysqli_fetch_assoc($customer_review_gallery)) {
                        $galImg = getImage($customer_review_gallery_res1['gallery_image'], 1000, 1000, $customer_review_gallery_res1['gallery_title'] . $catgallery_res1['id'], "/uploaded-files/customer-review-images/");
                        $galImg1 = getImage($customer_review_gallery_res1['gallery_image'], 1000, 1000, $customer_review_gallery_res1['gallery_title'] . $catgallery_res1['id'], "/uploaded-files/customer-review-images/");
                       
                    ?>

                <div class="col-12 mb-3 col-md-12  <?= $i == '1' ? 'col-lg-8' : 'col-lg-4'; ?>">

                    <div class="gallery-bx1 h-100 bg-white m-0 wow fadeInUp" data-wow-delay=".1s">

                        <a data-fancybox="photo-gallery" href="<?= $galImg1; ?>"
                            title="<?= $customer_review_gallery_res1['gallery_title']; ?>">

                            <img loading="lazy" src="<?= $galImg; ?>"
                                alt="<?= $customer_review_gallery_res1['gallery_title']; ?>"
                                title="<?= $customer_review_gallery_res1['gallery_title']; ?>">

                        </a>



                    </div>

                </div>

                <?php $i++; } ?>

         










            </div>
        </div>
    </div>
    <div class="category_page pt-0">
        <div class="container">
               <?php 
                        $product_s= mysqli_query($GLOBALS['dbconn'],"select product_image,product_title,catalog,product_id,product_video,product_specfi from product_tbl where   FIND_IN_SET('" . $cat_res['catID'] . "',product_cat) ");
                       $num=mysqli_num_rows($product_s);
                       if($num > 0)
                       {    ?>
                        <div class="you_may">Product Related to <?=$disTitles;?></div>
                        <div class="row g-3">
                            <?php $i=1;

                                while($product_r=mysqli_fetch_array($product_s)){
                                        $pro_image =  explode(',',$product_r['product_image']);
                                        $probig_img=$pro_image[0];
                                        $prod_img=getImage($probig_img, 415, 415, $product_r['product_title'],"/uploaded-files/product-images/");
                                        $prod_imgsmall=getImage($probig_img, 175, 177, $product_r['product_title'],"/uploaded-files/product-images/");
                                        ?>
                                                            <div class="col-12 pr_view">
                                <div class="pr-li">
                                    <div class="row g-0">
                                        <div class="col-lg-4 col-md-5 col-12 g_col">
                                            <div class="img_bx">
                                                <a class="main-img" href="javascript:void(0);" data-bs-toggle="modal"
                                                    data-bs-target="#productID"
                                                    onclick="

                        var src = $(this).find('img.clickable-image').attr('src');
                        $('.catID').val('<?php echo $product_r['product_id'];?>');
                        $('.catName').html('<?php echo $product_r['product_title'];?>');  $('.catImg').attr('src', src); $('.catImg').attr('alt','<?=$product_r['product_title'];?> in <?=$locationName;?>'); $('.catImg').attr('title','<?=$product_r['product_title'];?> in <?=$locationName;?>');"
                                                    title="<?=$product_r['product_title'];?> in <?=$locationName;?>">
                                                    <img id="myImage<?=$product_r['product_id'];?>"
                                                        class="clickable-image" src="<?=$prod_img;?>"
                                                        alt="<?=$product_r['product_title'];?> Manufacturers, Exporters in <?=$locationName;?>"
                                                        title="<?=$product_r['product_title'];?> Manufacturers, Exporters in <?=$locationName;?>">
                                                </a>
                                                <div class="multi-imgs">
                                                    <?php

                                    if(!empty($pro_image[1])){
                                        $snn=1;
                                    foreach($pro_image as $pro_imag_vals){?>
                                                                                        <div class="imgs <?= $snn==1?'active':'';?>"
                                                        onclick="imgMulti(<?=$product_r['product_id'];?>, '<?=getImage($pro_imag_vals, 400, 400, $product_r['product_title'].$product_r['product_id'].$snn,'/uploaded-files/product-images/');?>', this)">
                                                        <img src="<?=getImage($pro_imag_vals, 60, 60, $product_r['product_title'].$product_r['product_id'].$snn,'/uploaded-files/product-images/');?>"
                                                            alt="<?=$product_r['product_title'];?> Manufacturers, Exporters in <?=$locationName;?>"
                                                            title="<?=$product_r['product_title'];?> Manufacturers, Exporters in <?=$locationName;?>">
                                                    </div>
                                                    <?php $snn++; } } ?>
                                                    <!-- <div class="imgs" onclick="imgMulti(1, 'designer/images/product/Lace-Closure.jpg', this)">
                                <img src="designer/images/product/Lace-Closure.jpg" alt="">
                            </div> -->
                                                    <!-- <div class="imgs" onclick="imgMulti(1, 'designer/images/product/Lace-Frontal.jpg', this)">
                                <img src="designer/images/product/Lace-Frontal.jpg" alt="">
                            </div> -->
                                                    <?php if($product_r['product_video']!=''){ ?>
                                                    <div class="imgs 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 } ?>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-lg-8 col-md-7 col-12 g_col">
                                            <div class="tx-bx">
                                                <h4 class="title"><?=$product_r['product_title'];?> in
                                                    <?=$locationName;?>
                                                </h4>
                                                <div class="info">
                                                    <?=html_entity_decode($product_r['product_specfi']);?>
                                                </div>
                                                <div class="bt_bx mt-3">
                                                    <a class="readMore mb-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','<?=$prod_img;?>'); $('.catImg').attr('alt','<?=$product_r['product_title'];?> Manufacturers, Exporters in <?=$locationName;?>'); $('.catImg').attr('title','<?=$product_r['product_title'];?> Manufacturers, Exporters in <?=$locationName;?>');"
                                                        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</a>
                                                    <a href="javascript:void(0);" data-bs-toggle="modal"
                                                        data-bs-target="#callback"
                                                        onclick="$('.catID').val('<?php echo $product_r['product_id'];?>');
                            $('.catName').html('<?php echo $product_r['product_title'];?>');  $('.catImg').attr('src','<?=$prod_imgsmall;?>'); $('.catImg').attr('alt','<?=$product_r['product_title'];?> Manufacturers, Exporters in <?=$locationName;?>'); $('.catImg').attr('title','<?=$product_r['product_title'];?> Manufacturers, Exporters in <?=$locationName;?>');"
                                                        class="readMore callback">
                                                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
                                                            fill="currentColor" class="bi bi-telephone"
                                                            viewBox="0 0 16 16">
                                                            <path
                                                                d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.6 17.6 0 0 0 4.168 6.608 17.6 17.6 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.68.68 0 0 0-.58-.122l-2.19.547a1.75 1.75 0 0 1-1.657-.459L5.482 8.062a1.75 1.75 0 0 1-.46-1.657l.548-2.19a.68.68 0 0 0-.122-.58zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.68.68 0 0 0 .178.643l2.457 2.457a.68.68 0 0 0 .644.178l2.189-.547a1.75 1.75 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.6 18.6 0 0 1-7.01-4.42 18.6 18.6 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877z" />
                                                        </svg> Request A Callback</a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php $i++; } ?>
                        </div>
                        <?php } ?>
                        <div class="you_may mb-0 mt-4">All Category Range</div>
                        <div class="row g-3">
                            <?php

                                            if(mysqli_num_rows($cat_qry)>1){
                                            $subcat_sql=$cat_qry;
                                            }else{
                                            $subcat_sql=mysqli_query($GLOBALS['dbconn'],"select catImage, catName, displayName, catDesc, catID, catDesc1, parentID from category_tbl where parentID ='$parent' and status='Y' and catID!='$category_id' order by catOrder Asc");
                                            }
                                            if(mysqli_num_rows($subcat_sql)<2){
                                                $subcat_sql=mysqli_query($GLOBALS['dbconn'],"select catImage, catName, displayName, catDesc, catID, catDesc1, parentID from category_tbl where parentID ='1' 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], 415, 415, $sub_res[catName],"/uploaded-files/category/images/");
                                                    $img_link1 = getImage($sub_res[catImage], 415, 415, $sub_res[catName],"/uploaded-files/category/images/");
                                                }else{
                                                    $img_link = getImage("noimage (6).jpg",  415, 415, "noimages","/uploaded-files/category/images/");
                                                    $img_link1 = getImage("noimage (6).jpg", 415, 415, "noimages","/uploaded-files/category/images/");
                                                }
                                                $catIdss=$sub_res['catID'];
                                                $sql_content=mysqli_query($GLOBALS['dbconn'],"select subheadingtwo,short_description from location_content_tbl where category_id ='$catIdss'");
                                                $res_content=mysqli_fetch_array($sql_content);
                                                $subcontent_descc=html_entity_decode($res_content['short_description']);
                                                $subcontent_desccc=str_replace('{location}', $locationName, $subcontent_descc );
                                                $subcontent_descccc=str_replace('catname', $res_cat['catName'], $subcontent_desccc );
                                                $subcontent_descccc=str_ireplace('{companyName}',$admin_res['companyName'], $subcontent_descccc);
                                            ?>
                            <div class="col-12 pr_view">
                                <div class="pr-li">
                                    <div class="row g-0">
                                        <div class="col-lg-4 col-md-5 col-12 g_col">
                                            <div class="img_bx">
                                                <a class="main-img"
                                                    href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($sub_res['catName']);?>.htm"
                                                    title="<?= $sub_res['displayName'];?> Manufacturers in <?=$locationName;?>">
                                                    <img src="<?=$img_link;?>"
                                                        alt="<?= $sub_res['displayName'];?> Manufacturers in <?=$locationName;?>"
                                                        title="<?= $sub_res['displayName'];?> Manufacturers in <?=$locationName;?>">
                                                </a>
                                            </div>
                                        </div>
                                        <div class="col-lg-8 col-md-7 col-12 g_col">
                                            <div class="tx-bx">
                                                <h4 class="title"><a
                                                        href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($sub_res['catName']);?>.htm"
                                                        title="<?= $sub_res['displayName'];?> Manufacturers in <?=$locationName;?>"><?= $sub_res['displayName'];?></a>
                                                </h4>
                                                <div class="info">
                                                    <p><?=$subcontent_descccc;?></p>
                                                </div>
                                                <div class="bt_bx mt-3">
                                                    <a href="<?=site_url;?>/<?=getValidFileName($ca_nam1);?>/<?=getValidFileName($sub_res['catName']);?>.htm"
                                                        class="readMore mb-1">Read More</a>
                                                    <a class="readMore" 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 <?=$locationName;?>'); $('.catImg').attr('title','<?= $sub_res['displayName'];?> in <?=$locationName;?>');"
                                                                                                    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</a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php }?>
                        </div>
                                            </div>
                                            </div>

    <?php if ($cat_res['catID'] == '14') { ?>
  



    <?php } ?>


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

</html>
<?php
}

else
{
    header("Location: ".site_url);
    exit;
}
?>