<?php $this->load->view('top'); 
$top_category = $this->db->query("SELECT category_id, category_name, friendly_url FROM wps_categories WHERE status = '1' AND parent_id='0'")->result_array();
?>
<div 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="<?= base_url(); ?>" title="Home">Home</a></li>
                    <li><a href="about-us" title="About Us">About Us</a></li>
                    <?php
                    if (is_array($top_category) && !empty($top_category)) {
                        foreach ($top_category as $cat) {
                            $top_category_sub = $this->db->query("SELECT products_id, product_name, friendly_url FROM wps_products WHERE status = '1' AND category_id = '" . $cat['category_id'] . "' order by products_id asc")->result_array();
                            $num1 = count($top_category_sub);
                    ?>
                            <li><a href="<?php echo site_url($cat['friendly_url']); ?>" title="Ayurvedic Treatment For India"><?php echo $cat['category_name']; ?><?php if ($num1) { ?><?php } ?></a>
                              <ul>
                                    <?php
                                    foreach ($top_category_sub as $subcat) {
                                    ?>
                                        <li><a href="<?php echo site_url($subcat['friendly_url']); ?>" title="<?php echo $subcat['product_name']; ?>"><?php echo $subcat['product_name']; ?>
                                              </a>
                                        </li>
                                    <?php } ?>
                                </ul>
                            </li>
                    <?php }
                    } ?>
                 
                    <li><a href="" title="Services">Services</a>
                        <ul>
                            <li><a href="sexologist" title="Sexologist">Sexologist</a></li>
                            <li><a href="erectile-dysfunction" title="Erectile Dysfunction">Erectile Dysfunction</a></li>
                            <li><a href="premature-ejaculation" title="Premature Ejaculatio">Premature Ejaculation</a></li>
                            <li><a href="penis-enlargement" title="Penis Enlargement">Penis Enlargement</a></li>
                        </ul>

                    </li>

                    <li><a href="https://www.practo.com/delhi/clinic/hakim-hari-kishan-lal-shafakhana-dawakhana-patel-nagar-east/doctors?utm_source=google&utm_medium=reserve_with_google&utm_campaign=establishment_feed" title="Book an Appointment">Book an Appointment</a></li>
                    <li><a href="why-choose-us" title="Why Choose Us">Why Choose Us</a></li>
                    <li><a href="photo-gallery" title="Photo Gallery (Awards)">Photo Gallery (Awards)</a></li>
                    <li><a href="video-gallery" title="Video Gallery">Video Gallery</a></li>
                    <li><a href="contact-us" title="Contact Us">Contact Us</a></li>

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


<?php $this->load->view('bottom'); ?>