<?php 
include_once("include/main.inc.php"); 
$page_metatitle = "Market Area - ".COMPANY_NAME;
$page_metakey = "Market Area - ".COMPANY_NAME;
$page_metadesc = "Market Area - ".COMPANY_NAME;
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <?php include "top_header.php"; ?>
</head>

<body>
    <!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5K6SGBCR"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
    <?php include "header.php"; ?>


    <!-- Heading Banner-->
    <section class="heading_banner" style="background-image: url(<?=site_url;?>/designer/images/market-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">Market Area</h1>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </section>

    <!-- Breadcrumb-->
    <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">Market Area</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <section class="sitemap_page">
        <div class="container">
            <div class="wps_right market_area">
                <h2 class="mt25">Market Area</h2>
                <ul class="market-list">
                <?php
   $sql_loc=mysqli_query($GLOBALS['dbconn'],"select locationName from location_tbl where parentID='0' and status='Y' order by locationName asc");
     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>
                <h3 class="mt25">States of India</h3>
                <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' ");
   
   while($res_loccc=mysqli_fetch_array($sql_loccc))
   {
   $locationID=$res_loccc['locationID'];
    $sql_loc1=mysqli_query($GLOBALS['dbconn'],"select locationName from location_tbl where parentID ='$locationID' and status='Y'");
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 } } ?>
              <!-- Code for localities  -->


              <?php
   $sql_loccc=mysqli_query($GLOBALS['dbconn'],"select locationName, parentID, locationID from location_tbl where parentID ='1' ");
   
   while($res_loccc=mysqli_fetch_array($sql_loccc))
   {
   $locationID=$res_loccc['locationID'];
    $sql_loc1=mysqli_query($GLOBALS['dbconn'],"select * from location_tbl where parentID ='$locationID' ");
    while($res_loc12=mysqli_fetch_array($sql_loc1))
    {
    $locationID2=$res_loc12['locationID'];
     $sql_loc133=mysqli_query($GLOBALS['dbconn'],"select * from location_tbl where parentID ='$locationID2' and status='Y'");
  
if (mysqli_num_rows($sql_loc133) > 0)
   {
   ?>
                <h3 class="mt25">Localities of <?php echo $res_loc12['locationName']; ?></h3>
                <ul class="market-list">
                <?php while($res_locfinal1=mysqli_fetch_array($sql_loc133))  { ?>
                    <li><a href="<?=site_url;?>/<?php echo getValidFileName(strtolower($res_locfinal1['locationName'])); ?>/" title="<?php echo $res_locfinal1['locationName']; ?>"><?php echo $res_locfinal1['locationName']; ?></a></li>
                    <?php } ?>
                </ul>
                <?php } } } ?>
            </div>

        </div>
    </section>

    <?php include "footer.php";?>
    <?php include "bottom_footer.php";?>
</body>

</html>