<?php 

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

$cat_res=mysqli_fetch_array($cat_s);
$category_id=$cat_res['catID'];
$catn=$cat_res['displayName'];

$cat_sql="select * from category_tbl where parentID='$category_id' AND status='Y' order by catOrder";
$cat_qry=mysqli_query($GLOBALS['dbcon'],$cat_sql);
$cccnum=mysqli_num_rows($cat_qry);


$cat_sql1="select * from category_tbl where catID='$category_id' AND status='Y' order by catOrder ";
$cat_qry1=mysqli_query($GLOBALS['dbcon'],$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['dbcon'],$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['dbcon'],$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['dbcon'],$cat_sql4);

$num4=mysqli_num_rows($cat_qry4);

$cat_res4=mysqli_fetch_array($cat_qry4);
$page_metatitle = $cat_res['pageTitle'];
$page_metakey = $cat_res['pageKeywords'];
$page_metadesc =$cat_res['pageDescription'];
$alt= explode(',',$page_metatitle);

     $current_page="category";
$catimg_link = getImage($cat_res[catImage], 600, 600, $cat_res[catName],"/uploaded-files/category/images/");
if(mysqli_num_rows($cat_s) > 0)
{
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title><?= $page_metatitle; ?></title>
    <meta name="description" content="<?php echo $page_metadesc; ?>">
    <meta name="keywords" content="<?php echo $page_metakey; ?>">
   
    
    <?php include 'components/top_header.php';?>
    <link href="<?=SITE_URL_PATH;?>/designer/css/magiczoomplus.css" rel="stylesheet" type="text/css" >
</head>

<body>
    <div class="webpulse-main-wrapper">
        <!-- Header -->
        <?php include 'components/header.php';?>
 <!-- Heading Banner -->
        <div class="heading_banner" style="background-image: url(<?=SITE_URL_PATH;?>/uploaded-files/category/banners/<?=$cat_res['catBanner'];?>)">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12 text-center">
                        <h1 class="cat_title"> <?php $pro_title =  $cat_res['catID'] == 17 ? 'Paper Cup Machine' :  $pageTitles; ?>
                        <?=$pro_title ;?> </h1>
                    </div>
                       
                        <div class="clearfix"></div>
                        
                    </div>
                </div>
            </div>
        </div>
<!-- Breadcrumb -->
        <div class="inner_breadcrumb hidden-xs">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <ul class="breadcrumb">
                           
                            <li><a href="<?=SITE_URL_PATH;?>" title="Home">Home</a></li>
                         <?php if($num4 > 0) {?>
                            <li><a href="<?=SITE_URL_PATH;?>/<?=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="<?=SITE_URL_PATH;?>/<?=getValidFileName($cat_res3['catName']);?>.htm" title="<?php echo $cat_res3['catName']; ?>"><?php echo $cat_res3['catName']; ?></a></li>
                            <?php } ?>
                            <?php if($num2 > 0) {?>
                            <li><a href="<?=SITE_URL_PATH;?>/<?=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>
 <!-- Home About -->
        <section class="about_page">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12 col-md-12 col-md-push-3">
                        <div class="right_side">
                            <h2 class="bg-title"> <?php $pro_title =  $cat_res['catID'] == 17 ? 'Paper  Cup Machine Manufacturers' :  $pageTitles. ' Manufacturers'; ?>
                        <?=$pro_title ;?>  in Lucknow</h2>
                            <div class="wps_right">
                                <div class="product_right_image">
                                    <div class="zoom-gallery">
                                        <div data-slide-id="zoom" class="zoom-gallery-slide active">
                                            <a href="<?=$catimg_link;?>" title="<?=$alt[0];?>" class="MagicZoom" id="zoom-v">
                                           <img src="<?=$catimg_link;?>?scale.width=400" alt="<?=$alt[0];?>" title="<?=$alt[0];?>">
                                            </a>
                                        </div>
                                        <div data-slide-id="video-1" class="zoom-gallery-slide video-slide">
                                            <iframe src="https://www.youtube.com/embed/aeDe4D5KqxE" 
                                                allowfullscreen></iframe>
                                        </div>
                                      
                                    </div>
                                </div>

                                <?=html_entity_decode($pdes1);?>

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

                                <!-- Products Range -->
                                <?php  
                                $product_s="select * from product_tbl where prodcut_subcat='$cat_res[catID]'";
                                $product_q=mysqli_query($GLOBALS['dbcon'],$product_s);
                                $num=mysqli_num_rows($product_q);
                                if($num > 0)
                                {  
                                    ?>
                                
                                <div class="you_may">View our product range</div>

<?php } ?>
                                  <div class="row">
                                  <?php
                                    while($product_r=mysqli_fetch_array($product_q))
                                    {

                                   $pro_image =  explode(',',$product_r['product_image']);
                                   $pro_image_big =  array_shift($pro_image);
                                   $proimglink=getImage( $pro_image_big,310,270, $product_r[product_title],"/uploaded-files/product/images/");
                                 ?>
                                    <div class="col-md-12">
                                     <div class="product_listing">
                                      <div class="row">
                                        
                                        <div class="col-sm-5 col-xs-12">
                                         <div class="product-specification-listing">
                 
                                          <div class="spec_thumb">
                                                 <img src="<?=$proimglink;?>" alt="<?=$product_r['product_title'];?> Manufacturers, Suppliers in Lucknow" title="<?=$product_r['product_title'];?> Manufacturers, Suppliers in Lucknow">
                                           </div>
                                        
                                           <div class="clearfix"></div>
                                          <div class="product-gallery">
                                            <div class="row">

                                            <?php foreach($pro_image as $pro_imag_val){?>

                                                      <div class="gallerypadding col-md-4 col-sm-4 col-xs-4 wow fadeInDown animated" data-wow-delay=".1s">
                                        <a class="fancybox" data-fancybox="gallery"
                                            href="<?=SITE_URL_PATH;?>/uploaded-files/product/images/<?=$pro_imag_val;?>" title="<?=$product_r['product_title'];?> Manufacturers, Suppliers in Lucknow" alt="<?=$product_r['product_title'];?> Manufacturers, Suppliers in Lucknow">
                                            <div class="gallery_details">
                                                <div class="gdetails_image">
                                                    <img src="<?=SITE_URL_PATH;?>/uploaded-files/product/images/<?=$pro_imag_val;?>"
                                                        alt="<?=$product_r['product_title'];?> Manufacturers, Suppliers in Lucknow" title="<?=$product_r['product_title'];?> Manufacturers, Suppliers in Lucknow">
                                                </div>
                                                <div class="link-wrap">
                                                    <i class="fa fa-search"></i>
                                                </div>
                                            </div>
                                        </a>
                                    </div>
                                    <?php } ?>
                                    <?php if($product_r['product_video']!=''){

                                    ?>
                                    <div class="gallerypadding col-md-4 col-sm-4 col-xs-4 col-xs-4 wow fadeInDown animated animated" data-wow-delay=".1s" style="visibility: visible; animation-delay: 0.1s; animation-name: fadeInDown;">
                                        
                                            
                                           <a data-fancybox="" data-small-btn="true" href="https://www.youtube.com/embed/<?=$product_r['product_video'];?>" title="PLay Video" class="mfp-iframe vedio-play">
                                                <div class="gallery_details">
                                                    <div class="gdetails_image">
                                                        <img src="http://img.youtube.com/vi/<?=$product_r['product_video'];?>/hqdefault.jpg" alt="<?=$product_r['product_title'];?> in Lucknow" title="<?=$product_r['product_title'];?> in Lucknow">
                                                    </div>
                                                   <div class="link-wrap">
                                                        <i class="fa fa-play"></i>
                                                    </div> 

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

        <div class="col-sm-7 col-xs-12">
            <div class="right-content">
                <div class="right-contentt"><?=$product_r['product_title'];?></div>
                <div class="right-content-box">
                 <p></p>
                 <?=html_entity_decode($product_r['product_desc']);?>


                </div>
                <a class="read_more_product" href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID" onclick="$('#catID').val('<?php echo $related_res['catID']; ?>');
                                 $('#catName').val('<?php echo $product_r['product_title']; ?>');
                                 $('.catName').html('<?php echo $product_r['product_title']; ?>');  $('.catImg').attr('src','<?=SITE_URL_PATH;?>/uploaded-files/product/images/<?=$pro_image_big;?>');">  Get Best Quote</a>

            </div>
        </div>
                                        </div>
    </div>
</div><!--col-md-12-->
<?php }  ?>
                                    
                                  
                               
                                                     
       
                                  </div>
                                  <div class="clearfix"></div>

                                <!-- You May Also Like -->
                                <div class="you_may">You may also like:</div>
                                <div class="clearfix"></div>
                                <?php 
                        
                        $related_s = "select * from category_tbl where  catID!='$cat_res[catID]' and parentID!='0' and status='Y'";
                        $related_q = mysqli_query($GLOBALS['dbcon'],$related_s);
                        while($related_res=mysqli_fetch_array($related_q)) {
                            
                            if($related_res['catImage'] != ''){
                                
                                $img_link = getImage($related_res[catImage], 500, 500, $related_res[catName],"/uploaded-files/category/images/");
                            }else{
                                $img_link = NO_IMG_URL;
                                
                            }
            
                            ?>
                                <div class="product_listing">
                                    <div class="row">
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="product">
                                                <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($related_res['catName']);?>.htm"
                                                    title=" <?=$related_res['displayName'];?> Manufacturers in Lucknow">
                                                    <div class="image1">
                                                        <img src="<?=$img_link;?>"
                                                            alt="<?=$related_res['displayName'];?> Manufacturers in Lucknow"
                                                            class="img-responsive" title="<?=$related_res['displayName'];?> Manufacturers in Lucknow">
                                                    </div>
                                                </a>
                                            </div>
                                        </div>

                                        <div class="col-sm-8 col-xs-12">
                                            <div class="right-content pl-content">
                                                <h4 class="product-title-list"><a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($related_res['catName']);?>.htm"
                                                        title="<?=$related_res['displayName'];?> Manufacturers in Lucknow"> <?=$related_res['displayName'];?></a></h4>
                                                <div class="blue-line1"></div>
                                                <p><?=$related_res['catDesc'];?></p>
                                                <a href="<?=SITE_URL_PATH;?>/<?=getValidFileName($related_res['catName']);?>.htm" class="read_more_product" title="Read More">Read
                                                    More
                                                    <i class="fa fa-long-arrow-right fa-1x"></i></a>
                                                <a class="read_more_product" href="javascript:void()"
                                                    data-bs-toggle="modal" data-bs-target="#productID"
                                                    title="Send Enquiry" onclick="$('#catID').val('<?php echo $related_res['catID']; ?>');
                                 $('#catName').val('<?php echo $related_res['catName']; ?>');
                                 $('.catName').html('<?php echo $related_res['catName']; ?>');  $('.catImg').attr('src','<?=$img_link;?>');">Send Enquiry</a>

                                            </div>

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


                            </div>
                        
                        
                    </div><!-- right_side -->
                    </div><!-- col-lg-9 col-md-12 col-md-push-3 -->
                     <!--<div class="col-lg-3 col-md-12 col-md-pull-9">
                        <div class="left_sidebar">
                            <?php //include 'components/quick_contact.php';?>
                        </div>
                        <div class="left_sidebar">
                            <?php //include 'components/product_list.php';?>
                        </div>
                    </div>-->

                </div>
                                                    

            </div>
       
        </section>

        <!-- Home Testimonials -->
       

        <!-- Home Clients -->
        <?php include 'components/youtube_videoo.php';?>

        <!-- Footer -->
        <?php include 'components/footer.php';?>
    
    <?php include 'components/product_modal.php';?>
    <?php include 'components/bottom_footer.php';?>
    <script src="<?=SITE_URL_PATH;?>/designer/js/magiczoomplus.js"></script>
    <script>
    jQuery('.zoom-gallery .selectors a').on('click touch', function(e) {
        var iframe = jQuery('.active iframe[src*="youtube"],.active iframe[src*="vimeo"]');
        if (iframe.length) {
            iframe.attr('src', iframe.attr('src'));
        }
        jQuery('.zoom-gallery .zoom-gallery-slide').removeClass('active');
        jQuery('.zoom-gallery .selectors a').removeClass('active');
        jQuery('.zoom-gallery .zoom-gallery-slide[data-slide-id="' + jQuery(this).attr('data-slide-id') + '"]')
            .addClass('active');
        jQuery(this).addClass('active');
        e.preventDefault();
    });
    </script>
	
    <script>
    function stickyDiv() {
        if ($('#product_header').length) {
            var strickyScrollPos = 855;
            if ($(window).scrollTop() > strickyScrollPos) {
                $('#product_header').addClass('stricky');
            } else if ($(this).scrollTop() <= strickyScrollPos) {
                $('#product_header').removeClass('stricky');
            }
        };
    }
    /*mobile*/
    if (document.documentElement.clientWidth < 650) {
        function stickyDiv() {
            if ($('#product_header').length) {
                var strickyScrollPos = 1400;
                if ($(window).scrollTop() > strickyScrollPos) {
                    $('#product_header').addClass('stricky');
                } else if ($(this).scrollTop() <= strickyScrollPos) {
                    $('#product_header').removeClass('stricky');
                }
            };
        }
    }
    /*mobile*/

    jQuery(window).on('scroll', function() {
        (function($) {
            stickyDiv();
        })(jQuery);
    });
    </script>

</body>

</html>
 <?php
}
else
{
echo "<script>window.location='https://www.papercupmachines.co.in'</script>";
    exit;
}
?>