<?php include_once("include/main.inc.php");
$keyword = $_GET['keyword'];
$cat_s="select * from category_tbl where parentID!='0' and catName LIKE '%$keyword%'";
$cat_q=mysqli_query($dbconn,$cat_s);
$num=mysqli_num_rows($cat_q);
$displayName = ucfirst($keyword);
?>
<!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>Search - <?=$keyword;?></title>
    <meta name="description" content="Search - <?=$displayName;?>" />
    <meta name="keywords" content="Search - <?=$displayName;?>" />
    <?php include 'components/top_header.php';?>
</head>

<body>
    <div class="webpulse-main-wrapper">
        <!-- Header -->
        <?php include 'components/header.php';?>


        <!-- Heading Banner -->
        <section class="heading_banner" style="background-image: url(<?=theme_url?>images/products/products.jpg)">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12 text-center">
                        <h1 class="cat_title">Search result for <strong><?=$displayName?></strong></h1>
                        <div class="clearfix"></div>

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

        <!-- Breadcrumb -->
        <section class="inner_breadcrumb hidden-xs">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <ul class="breadcrumb">
                            <li><a href="<?=site_url?>/" title="Home">Home</a></li>
                            <li><a href="<?=site_url?>/our-products.htm" title="Our Products">Our Products</a></li>
                            <li class="active">Search result for <?=$displayName?></li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>


        <!-- Home About -->
        <section class="about_page bg-grey ptb-50">
            <div class="container">
                <div class="row">
                    <div class="col-md-12 col-lg-12">
                        <div class="right_side">
                            <h2 class="bg-title">Search result for "<?=$displayName?>"</h2>


                            <div class="row">
                                <?php  
    if($num>0)  { 
while($related_res=mysqli_fetch_array($cat_q)) {
         $img = getImage($related_res[catImage], 546, 548, $related_res[catName],"/uploaded-files/category/images/");
             ?>
                                <div class="col-lg-4 col-md-4 col-sm-6">
                                    <div class="product_more">
                                        <a href="<?=site_url;?>/<?=getValidFileName($related_res['catName']);?>.htm" title="<?=$related_res[catName]?> in india">
                                            <div class="may_image">
                                                <div class="image">
                                                    <img src="<?=$img?>" alt="<?=$related_res[catName]?> in india" title="<?=$related_res[catName]?> in india">
                                                </div>
                                            </div>
                                            <div class="may_describe">
                                                <h4 class="product-title"><?=$related_res[catName]?></h4>
                                                <div class="clearfix"></div>
                                            </div>
                                        </a>
                                    </div>
                                </div>

                                <?php } } else { ?>
                                <h2 class="mt-5 mb-5 p-5">Sorry, No Result Found!</h2>
                                <?php } ?>
                            </div>

                        </div>
                    </div>


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




        <?php include 'components/app_testi_client.php';?>

        <!-- Footer -->
        <?php include 'components/footer.php';?>

    </div>

    <?php include 'components/bottom_footer.php';?>
    <?php include 'components/product_modal.php';?>

</body>

</html>
