<?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 * FROM category_tbl WHERE catName LIKE '%" . $keyword . "%' or catName LIKE '%" . $chunk . "%' or displayName LIKE '%" . $chunk . "%'";

} else {



    $query = "SELECT * FROM category_tbl order by catID desc";

}
$sql_dds = mysqli_query($GLOBALS['dbconn'], $query);
$wnum = mysqli_num_rows($sql_dds);
$page_metatitle = "Search - " . $admin_res['companyName'];
$page_metakey = "Search - " . $admin_res['companyName'];
$page_metadesc = "Search - " . $admin_res['companyName'];
?>

<!DOCTYPE html>
<html lang="en">

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

<body>
    <?php include 'apps/app_header.php'; ?>

    <div class="heading_banner" style="background-image: url(<?=site_url;?>/assets/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 Results - <?= $admin_res['companyName']; ?></h1>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>

    <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 Results</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="about_page">
        <div class="container">
            <h2 class="title_1">Search Results <span> For "<?php echo "  " . $keyword . " (" . $wnum . ") "; ?>" </span></h2>
            <div class="maxWidth">
                <p>Find clarity through precise search results designed to guide your journey. Whether it's astrology, palmistry, numerology, or spiritual solutions, each result connects you to Acharya Vijay Shastriji’s wisdom. Navigate life’s questions with confidence, uncover deeper meanings, and move forward with insight, strength, and cosmic support tailored to your unique path.</p>
            </div>
            <div class="clearfix"></div>
            <div class="row">
            <?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], 305, 305, $row[catName], "/uploaded-files/category/images/");

            $img_link1 = getImage($row[catImage], 305, 305, $row[catName], "/uploaded-files/category/images/");

        } else {

            $img_link = site_url . "/uploaded-files/category/images/noimage.jpg";

            $img_link1 = site_url . "/uploaded-files/category/images/noimage.jpg";

        }

        $sub_desc = $row['catDesc'];



        $sub_desc = str_ireplace('{companyName}', $admin_res['companyName'], $sub_desc);

?>

                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                    <div class="singleProduct">
                        <a href="<?=site_url;?>/<?=getValidFileName($row['catName']);?>.htm" title="<?= $row['displayName']; ?> in <?= $admin_res['targetlocation']; ?>">
                            <div class="image">
                                <img src="<?= $img_link; ?>" alt="<?= $row['displayName']; ?> in <?= $admin_res['targetlocation']; ?>" title="<?= $row['displayName']; ?> in <?= $admin_res['targetlocation']; ?>">
                            </div>
                            <div class="singleProductTitle"><?php echo $row['catName']; ?></div>
                        </a>
                        <div class="mainBtn3" 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_link; ?>'); $('.catImg').attr('alt','<?= $row['displayName']; ?> in <?= $admin_res['targetlocation']; ?>'); $('.catImg').attr('title','<?= $row['displayName']; ?> in <?= $admin_res['targetlocation']; ?>');">
                            <span>
                                <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> Enquire Now
                            </span>
                        </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="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                    <div class="singleProduct">
                        <a href="">
                            <div class="image">
                                <img src="assets/images/Love-Marriage-Astrologer.jpg" alt="Love Marriage Astrologer">
                            </div>
                            <div class="singleProductTitle">Love Marriage Astrologer</div>
                        </a>
                        <div class="mainBtn3" data-bs-toggle="modal" data-bs-target="#productID">
                            <span>
                                <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> Enquire Now
                            </span>
                        </div>
                    </div>
                </div>


                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                    <div class="singleProduct">
                        <a href="">
                            <div class="image">
                                <img src="assets/images/Love-Problem-Solution-Astrologer.jpg" alt="">
                            </div>
                            <div class="singleProductTitle">Love Problem Solution Astrologer</div>
                        </a>
                        <div class="mainBtn3" data-bs-toggle="modal" data-bs-target="#productID">
                            <span>
                                <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> Enquire Now
                            </span>
                        </div>
                    </div>
                </div>


                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                    <div class="singleProduct">
                        <a href="">
                            <div class="image">
                                <img src="assets/images/Divorce-Problem-Solution-Astrologer.jpg" alt="">
                            </div>
                            <div class="singleProductTitle">Divorce Problem Solution Astrologer</div>
                        </a>
                        <div class="mainBtn3" data-bs-toggle="modal" data-bs-target="#productID">
                            <span>
                                <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> Enquire Now
                            </span>
                        </div>
                    </div>
                </div>


                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                    <a class="singleProduct" href="#productID" data-bs-toggle="modal">
                        <div class="image">
                            <img src="assets/images/Husband-Wife-Problems-Solution-Astrologer.jpg" alt="">
                        </div>
                        <div class="singleProductTitle">Husband Wife Problems Solution Astrologer</div>
                        <div class="mainBtn3" data-bs-toggle="modal" data-bs-target="#productID">
                            <span>
                                <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> Enquire Now
                            </span>
                        </div>
                    </a>
                </div>

                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                    <div class="singleProduct">
                        <a href="">
                            <div class="image">
                                <img src="assets/images/Love-Marriage-Astrologer.jpg" alt="Love Marriage Astrologer">
                            </div>
                            <div class="singleProductTitle">Love Marriage Astrologer</div>
                        </a>
                        <div class="mainBtn3" data-bs-toggle="modal" data-bs-target="#productID">
                            <span>
                                <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> Enquire Now
                            </span>
                        </div>
                    </div>
                </div>


                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                    <div class="singleProduct">
                        <a href="">
                            <div class="image">
                                <img src="assets/images/Love-Problem-Solution-Astrologer.jpg" alt="">
                            </div>
                            <div class="singleProductTitle">Love Problem Solution Astrologer</div>
                        </a>
                        <div class="mainBtn3" data-bs-toggle="modal" data-bs-target="#productID">
                            <span>
                                <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> Enquire Now
                            </span>
                        </div>
                    </div>
                </div>


                <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-sm-6 col-12">
                    <div class="singleProduct">
                        <a href="">
                            <div class="image">
                                <img src="assets/images/Divorce-Problem-Solution-Astrologer.jpg" alt="">
                            </div>
                            <div class="singleProductTitle">Divorce Problem Solution Astrologer</div>
                        </a>
                        <div class="mainBtn3" data-bs-toggle="modal" data-bs-target="#productID">
                            <span>
                                <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> Enquire Now
                            </span>
                        </div>
                    </div>
                </div> -->

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

    <?php include 'apps/app_footer.php'; ?>
    <?php include 'apps/app_bottom.php'; ?>
</body>

</html>