<?php 

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

$hover="about";

if(!isset($_GET['keyword'])){
    header('location:'.site_url);
}

$search = $_GET['keyword'];
$se_query = "select * from category_tbl where catName Like '%".$search."%'";
$res_search = $dbconn->query($se_query);
$page_metatitle= COMPANY_NAME." - Search";
$page_metakey= COMPANY_NAME." - Search";
$page_metadesc= COMPANY_NAME." - Search";

?>

<!DOCTYPE html>

<html lang="en">



<head>

    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?=$page_metatitle;?></title>
    <meta name="description" content="<?=$page_metadesc;?>" >
    <meta name="keywords" content="<?=$page_metakey;?>" >

    <?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">Search Result For "<?= $search; ?>"</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>

                        <li class="active">Search</li>

                    </ul>

                </div>

            </div>

        </div>

    </div>



    <section class="about_page">

        <div class="container">

            <h2 class="title_1">Search result for "<?= $search; ?>(<?= $res_search->num_rows; ?>)"</h2>

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

            <div class="row">
                    <?php if($res_search->num_rows > 0){ 
                    while($searches = $res_search->fetch_assoc()) { ?>
                <div class="col-lg-4 col-md-4 col-sm-6">

                    <div class="product_more">

                        <a href="<?=site_url;?>/<?=getValidFileName($searches['catName']);?>.htm" title="<?= $searches['displayName']; ?>">

                            <div class="may_image">

                                <div class="image">

                                    <img src="<?= getImage($searches[catImage], 500, 500, $searches[catName],"/uploaded-files/category/images/"); ?>" alt="<?= $searches['displayName']; ?>" title="<?= $searches['displayName']; ?>">

                                </div>

                            </div>

                            <div class="may_describe">

                                <h4><?= $searches['displayName']; ?></h4>

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

                                <button class="read_more" title="Read More">Read More</button>

                            </div>

                        </a>

                    </div>

                </div>
                <?php } } else{ ?>
                <div class="col-md-12">
                    <span>No Result Found!!!</span>
                </div>
                <?php } ?>
            </div>

        </div>

    </section>


    <?php include "app_faq.php"; ?>

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

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



</body>



</html>

<script>
    $('#small1 .item').click(function() {

        $('#bigImage1 img').attr('src', $(this).attr('src').replace('thumb', 'large'));

        if ($(this).hasClass("active")) {

            $("#small1 .item").removeClass("active");

        } else {

            $("#small1 .item").removeClass("active");

            $(this).addClass("active");

        }

    });

    $('#small2 .item').click(function() {

        $('#bigImage2 img').attr('src', $(this).attr('src').replace('thumb', 'large'));

        if ($(this).hasClass("active")) {

            $("#small2 .item").removeClass("active");

        } else {

            $("#small2 .item").removeClass("active");

            $(this).addClass("active");

        }

    });



    $('#small3 .item').click(function() {

        $('#bigImage3 img').attr('src', $(this).attr('src').replace('thumb', 'large'));

        if ($(this).hasClass("active")) {

            $("#small3 .item").removeClass("active");

        } else {

            $("#small3 .item").removeClass("active");

            $(this).addClass("active");

        }

    });



    $('#small4 .item').click(function() {

        $('#bigImage4 img').attr('src', $(this).attr('src').replace('thumb', 'large'));

        if ($(this).hasClass("active")) {

            $("#small4 .item").removeClass("active");

        } else {

            $("#small4 .item").removeClass("active");

            $(this).addClass("active");

        }

    });



    $('#small5 .item').click(function() {

        $('#bigImage5 img').attr('src', $(this).attr('src').replace('thumb', 'large'));

        if ($(this).hasClass("active")) {

            $("#small5 .item").removeClass("active");

        } else {

            $("#small5 .item").removeClass("active");

            $(this).addClass("active");

        }

    });



    $('#small6 .item').click(function() {

        $('#bigImage6 img').attr('src', $(this).attr('src').replace('thumb', 'large'));

        if ($(this).hasClass("active")) {

            $("#small1 .item").removeClass("active");

        } else {

            $("#small6 .item").removeClass("active");

            $(this).addClass("active");

        }

    });

</script>
