<?php 
include_once("include/main.inc.php"); 
session_start();
$sesion=session_id();
@extract($_GET);
@extract($_POST);
@extract($_REQUEST);
$chunk = $_REQUEST['keyword'];
$chunk = substr($chunk, 0, 5);
if(!empty($keyword)){
	$query =" SELECT catImage, catName, displayName, catDesc, catID, catDesc1, parentID FROM category_tbl WHERE catName LIKE '%".$keyword."%' or catName LIKE '%".$chunk."%' or displayName LIKE '%".$chunk."%'";
}else{
   $query = "SELECT catImage, catName, displayName, catDesc, catID, catDesc1, parentID FROM category_tbl order by catID desc";
}

$sql_dds = mysqli_query($GLOBALS['dbconn'],$query);
$wnum=mysqli_num_rows($sql_dds);
$page_metatitle = "Search - ".COMPANY_NAME;
$page_metakey = "Search - ".COMPANY_NAME;
$page_metadesc = "Search - ".COMPANY_NAME;
?>
<!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">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="category_page">
        <div class="container">
            <h2 class="title_2 mb-5">Search Results for "<?=$keyword;?>" (<?=$wnum;?>) Items</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="allListing">
                        <?php
       $num=mysqli_num_rows($sql_dds);
       if($num > 0) { 
           while($row=mysqli_fetch_array($sql_dds)){ 
    if($row['catImage'] != ''){
        $img_link = getImage($row[catImage], 274, 274, $row[catName],"/uploaded-files/category/images/");
        $img_link1 = getImage($row[catImage], 435, 428, $row[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($row['catName']);?>.htm" title="<?= $row['displayName'];?> in <?=$admin_res['targetlocation'];?>">
                                                <div class="image1">
                                                    <img src="<?=$img_link;?>" alt="<?= $row['displayName'];?> in <?=$admin_res['targetlocation'];?>" title="<?= $row['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">
                                            <h3><a href="<?=site_url;?>/<?=getValidFileName($row['catName']);?>.htm" title=""><?= $row['displayName'];?></a></h3>
                                            <div class="blue-line1"></div>
                                            <div class="more_info">
                                                <p><?php echo html_entity_decode($row['catDesc']);?></p>

                                            </div>

                                            <div class="clearfix"></div>
                                            <a class="read_more" href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID" onclick="$('.catID').val('<?php echo $row['catID'];?>');
            $('.catName').html('<?php echo $row['catName'];?>');
            $('.catImg').attr('src','<?= $img_link1;?>'); $('.catImg').attr('alt','<?= $row['displayName'];?> in <?=$admin_res['targetlocation'];?>'); $('.catImg').attr('title','<?= $row['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($row['catName']);?>.htm" class="read_more">Read More <span></span><span></span><span></span><span></span></a>

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php } } else {?>
                                <div style="text-align:center;">
<div class="alert alert-danger" style="display: inline-block;width: 600px;">
<strong>You Search for "<u><?=$keyword;?></u>" Not Matched, Please Try with Another Keywords</strong>
</div>
    </div>
    <?php } ?>

<!-- 
                            <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="details.php" title="">
                                                <div class="image1">
                                                    <img src="designer/images/image4.jpg" alt="" title="">
                                                </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">
                                            <h3><a href="details.php" title="">Category Heading Two</a></h3>
                                            <div class="blue-line1"></div>
                                            <div class="more_info">
                                                <p>WPS Group is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident ipsa quod vero officiis quibusdam, eligendi hic illum amet animi, impedit reiciendis autem mollitia, sit quas veritatis. Fugit, inventore ex eius.</p>

                                            </div>

                                            <div class="clearfix"></div>
                                            <a class="read_more" href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID" 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="details.php" class="read_more">Read More <span></span><span></span><span></span><span></span></a>

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

                            <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="details.php" title="">
                                                <div class="image1">
                                                    <img src="designer/images/image5.jpg" alt="" title="">
                                                </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">
                                            <h3><a href="details.php" title="">Category Heading Three</a></h3>
                                            <div class="blue-line1"></div>
                                            <div class="more_info">
                                                <p>WPS Group is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident ipsa quod vero officiis quibusdam, eligendi hic illum amet animi, impedit reiciendis autem mollitia, sit quas veritatis. Fugit, inventore ex eius.</p>

                                            </div>

                                            <div class="clearfix"></div>
                                            <a class="read_more" href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID" 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="details.php" class="read_more">Read More <span></span><span></span><span></span><span></span></a>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <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="details.php" title="">
                                                <div class="image1">
                                                    <img src="designer/images/image6.jpg" alt="" title="">
                                                </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">
                                            <h3><a href="details.php" title="">Category Heading Four</a></h3>
                                            <div class="blue-line1"></div>
                                            <div class="more_info">
                                                <p>WPS Group is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
                                                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident ipsa quod vero officiis quibusdam, eligendi hic illum amet animi, impedit reiciendis autem mollitia, sit quas veritatis. Fugit, inventore ex eius.</p>

                                            </div>

                                            <div class="clearfix"></div>
                                            <a class="read_more" href="javascript:void(0);" data-bs-toggle="modal" data-bs-target="#productID" 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="details.php" class="read_more">Read More <span></span><span></span><span></span><span></span></a>

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


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

</body>

</html>