<?php 
include_once("include/main.inc.php"); 
if (strpos($_SERVER['REQUEST_URI'], ".php") !== false) {
  
 	header("Location: ".site_url);
   				exit;
}

$page_metatitle = "Market Area - ".$admin_res['companyName'];
$page_metakey = "Market Area - ".$admin_res['companyName'];
$page_metadesc = "Market Area - ".$admin_res['companyName'];
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">

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

    <link href="<?=site_url;?>/designer/css/jquery.fancybox.css" rel="stylesheet">
</head>

<body>

    <?php include "app_header.php"; ?>
    <div class="webpulse-main-wrapper">

        <div class="small-banner py-4 heading_banner position-relative">
            <div class="text-center position-relative z-index-9">
                <h1 class="cat_title">Market Area - <?=$admin_res['companyName'];?></h1>
                <div class="clearfix"></div>
                <!-- <div class="cat_title2">We Are Available For You</div> -->
            </div>
        </div>
        <nav aria-label="breadcrumb" class="py-0 position-relative z-index-9 bg-light-light border-bottom">
            <div class="container-fluid px-4 py-2">
                <ol class="breadcrumb mb-0">
                    <li class="breadcrumb-item"><a href="<?=site_url;?>" class="text-dark">Home</a></li>
                    <li class="breadcrumb-item active text-orange" aria-current="page">Market Area</li>
                </ol>
            </div>
        </nav>
        <!-- Home About-->
        <section class="sitemap_page bg-white py-5">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <div class="sitemap_right_side p-0 border-0">
                            <div class="title1 text-center fs-30">Market Area</div>

                            <div class="border-bottom border-3 w-100px border-primary mx-auto pt-1"></div>

                            <div class="separator separatorss text-start mt-0"><span><i></i></span></div>
                            <div class="wps_right market_area">
                                <?php 
                $sql_loc=mysqli_query($GLOBALS['dbconn'],"select locationName, parentID, locationID from location_tbl where parentID='0' and status='Y' order by locationName asc");
                if(mysqli_num_rows($sql_loc)>'1'){
                ?>
                                <!-- <h3 class="mt25">Country</h3> -->

                                <h2 class="mt25">Countries</h2>
                                <?php }else{ ?>
                                <div class="mt25"></div>
                                <?php } ?>



                                <ul class="market-list">
                                    <?php
                while($res_loc=mysqli_fetch_array($sql_loc)) {  ?>
                                    <li><a href="<?=site_url;?>/<?php echo getValidFileName(strtolower($res_loc['locationName'])); ?>/"
                                            title="<?php echo $res_loc['locationName'];?>"><?php echo $res_loc['locationName'];?></a>
                                    </li>
                                    <?php } ?>

                                </ul>
                                <h2 class="mt25">States of India</h2>
                                <ul class="market-list">
                                    <?php
            $sql_locsss=mysqli_query($GLOBALS['dbconn'],"select locationName, parentID, locationID from location_tbl where parentID='1' and status='Y' order by locationName asc");
            while($res_locsss=mysqli_fetch_array($sql_locsss)) {  ?>
                                    <li><a href="<?=site_url;?>/<?php echo getValidFileName(strtolower($res_locsss['locationName'])); ?>/"
                                            title="<?php echo $res_locsss['locationName'];?>"><?php echo $res_locsss['locationName'];?></a>
                                    </li>
                                    <?php } ?>



                                </ul>
                                <?php
            $sql_loccc=mysqli_query($GLOBALS['dbconn'],"select locationName, parentID, locationID from location_tbl where parentID ='1' order by locationName asc");
            while($res_loccc=mysqli_fetch_array($sql_loccc))
            {
            $locationID=$res_loccc['locationID'];
            $sql_loc1=mysqli_query($GLOBALS['dbconn'],"select locationName, parentID, locationID from location_tbl where parentID ='$locationID' and status='Y' order by locationName asc");
            if (mysqli_num_rows($sql_loc1) > 0)
            {
            ?>
                                <h3 class="mt25">Cities of <?php echo $res_loccc['locationName']; ?></h3>
                                <ul class="market-list">
                                    <?php while($res_locfinal=mysqli_fetch_array($sql_loc1))  { ?>

                                    <li><a href="<?=site_url;?>/<?php echo getValidFileName(strtolower($res_locfinal['locationName'])); ?>/"
                                            title="<?php echo $res_locfinal['locationName']; ?>"><?php echo $res_locfinal['locationName']; ?></a>
                                    </li>
                                    <?php } ?>
                                </ul>
                                <?php } } ?>


                            </div>

                        </div>
                    </div>


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




    </div>

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

</html>