<?php
include('include/main.inc.php');
$web_det_query = "Select * from admin_details where slno = '1'";
$res_web = $dbconn->query($web_det_query);
$web_details = $res_web->fetch_assoc();
$page_metatitle = $web_details['companyName'].' - Sitemap';
$page_metadesc = $web_details['companyName'].' - Sitemap';
$page_metakey = $web_details['companyName'].' - Sitemap';

?>
<!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/sitemap-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">Sitemap</h1>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </section>

    <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; ?>" title="Home">Home</a></li>
                        <li class="active">Sitemap</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>


    <section class="sitemap_page">
        <div class="container">
            <h2 class="title_2">Sitemap</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="sitemap_right_side">
                        <ul class="sitemap">
                            <li><a href="<?= site_url; ?>" title="Home">Home</a></li>
                            <li><a href="<?= site_url; ?>/about.htm" title="About Us">About Us</a></li>
                            <?php
                                $category_query = "Select * from category_tbl where parentID = '0' and status ='Y'";
                                $res_cate = $dbconn->query($category_query);
                                if($res_cate->num_rows >0){
                                    while($categories = $res_cate->fetch_assoc()){
                                        $cat_href = str_ireplace(" ", "-", $categories['catName']);
                            ?>
                            <li><a href="<?= site_url.'/'.strtolower($cat_href).'.htm'; ?>" title="<?= $categories['displayName']; ?>"> <?= $categories['displayName']; ?></a>
                            <?php 
                                $sub_cat_query = "Select * from category_tbl where parentID = '".$categories['catID']."' and status ='Y'";
                                $res_sub_cate = $dbconn->query($sub_cat_query);
                                if($res_sub_cate->num_rows > 0){
                            ?>
                                <ul>
                                    <?php while($sub_categories = $res_sub_cate->fetch_assoc()){
                                        $sub_cat_href = str_ireplace(" ", "-", $sub_categories['catName']); 
                                    ?>
                                    <li><a href="<?= site_url.'/'.strtolower($sub_cat_href).'.htm'; ?>" title="<?= $sub_categories['displayName']; ?>"><?= $sub_categories['displayName']; ?></a></li>
                                    <?php } ?>
                                </ul>
                                <?php } ?>
                            </li>
                            <?php } } ?>
                            <li><a href="<?= site_url; ?>/testimonials.htm" title="Testimonials">Testimonials</a></li>
                            <!-- <li><a href="<?= site_url; ?>/faq.htm" title="FAQ">FAQ</a></li> -->
                            <li><a href="<?= site_url; ?>/gallery.htm" title="Gallery">Gallery</a></li>
                            <li><a href="<?= site_url; ?>/blog.htm" title="Blogs">Blogs</a></li>
                            <li><a href="<?= site_url; ?>/contact.htm" title="Contact Us">Contact Us</a></li>

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


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

    <?php include "app_footer.php"; ?>
    <?php include "app_bottom.php"; ?>
</body>

</html>