<?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">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <?php include "app_top.php"; ?>
</head>

<body>
    <?php include "app_header.php"; ?>

    <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 class="cat_title2">We Are Available For You</div>
                </div>
            </div>
        </div>
    </section>

    <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">
            <?php
                $sql_loc = mysqli_query($GLOBALS['dbconn'], "select locationName, parentID, locationID,loc_url from location_tbl where parentID='0' and status='Y' and locationName!='india' order by locationName asc");
                if (mysqli_num_rows($sql_loc) > '1') {
                ?>
                <h2 class="title_h2">Countries</h2>
                <?php } else { ?>
                    <h2 class="title_h2">Market Area</h2>
                <ul class="market-list">
                <?php
                    while ($res_loc = mysqli_fetch_array($sql_loc)) {
                        $loc_url = $res_loc['loc_url'] ? $res_loc['loc_url'] : $res_loc['locationName']; ?>
                    <li><a href="<?= site_url; ?>/<?php echo getValidFileName($loc_url); ?>/" title="<?php echo $res_loc['locationName']; ?>"><?php echo $res_loc['locationName']; ?></a></li>
                    <?php } }?>
                    <!-- <li><a href="argentina">Argentina</a></li>
                    <li><a href="australia">Australia</a></li>
                    <li><a href="austria">Austria</a></li>
                    <li><a href="bangladesh">Bangladesh</a></li>
                    <li><a href="belgium">Belgium</a></li>
                    <li><a href="brazil">Brazil</a></li>
                    <li><a href="cameroon">Cameroon</a></li>
                    <li><a href="canada">Canada</a></li>
                    <li><a href="chile">Chile</a></li>
                    <li><a href="colombia">Colombia</a></li>
                    <li><a href="cuba">Cuba</a></li>
                    <li><a href="czech-republic">Czech Republic</a></li>
                    <li><a href="dominican-republic">Dominican Republic</a></li>
                    <li><a href="dr-congo">Dr Congo</a></li>
                    <li><a href="egypt">Egypt</a></li> -->
                    
                </ul>
                <!-- <h3 class="mt25">States of India</h3> -->
                <ul class="market-list">
                <?php
                    $sql_locsss = mysqli_query($GLOBALS['dbconn'], "select locationName, parentID, locationID,loc_url from location_tbl where parentID='0' and status='Y' order by locationName asc");
                    while ($res_locsss = mysqli_fetch_array($sql_locsss)) {
                        $loc_url1 = $res_locsss['loc_url'] ? $res_locsss['loc_url'] : $res_locsss['locationName'];
                    ?>
                    <li><a href="<?= site_url; ?>/<?php echo getValidFileName($loc_url1); ?>/" title="<?php echo $res_locsss['locationName']; ?>"><?php echo $res_locsss['locationName']; ?></a></li>
                    <?php } ?>
                    <!-- <li><a href="delhi">Delhi</a></li>

                    <li><a href="himachal-pradesh">Himachal Pradesh</a></li>

                    <li><a href="jharkhand">Jharkhand</a></li>

                    <li><a href="karnataka">Karnataka</a></li>

                    <li><a href="maharashtra">Maharashtra</a></li>
                    <li><a href="tamil-nadu">Tamil Nadu</a></li>

                    <li><a href="telangana">Telangana</a></li>

                    <li><a href="west-bengal">West Bengal</a></li> -->

                </ul>
                <?php
                $sql_loccc = mysqli_query($GLOBALS['dbconn'], "select locationName, parentID, locationID,loc_url from location_tbl where parentID ='0' 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,loc_url 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)) {
                       $loc_url2 = $res_locfinal['loc_url'] ? $res_locfinal['loc_url'] : $res_locfinal['locationName'];
                       ?>
                    <li><a href="<?= site_url; ?>/<?php echo getValidFileName($loc_url2); ?>/" title="<?php echo $res_locfinal['locationName']; ?>"><?php echo $res_locfinal['locationName']; ?></a></li>
                    <?php }  ?>
                </ul>
                <?php }
                } ?>
                <!-- <h3 class="mt25">Cities of Karnataka for example</h3>
                <ul class="market-list">
                    <li><a href="bengaluru">Bengaluru</a></li>
                </ul>
                <h3 class="mt25">Cities of Maharashtra for example</h3>
                <ul class="market-list">
                    <li><a href="mumbai">Mumbai</a></li>
                    <li><a href="pune">Pune</a></li>
                </ul>
                <h3 class="mt25">Cities of Punjab for example</h3>
                <ul class="market-list">
                    <li><a href="amritsar">Amritsar</a></li>
                    <li><a href="chandigarh">Chandigarh</a></li>
                    <li><a href="ludhiana">Ludhiana</a></li>
                </ul>
                <h3 class="mt25">Cities of Tamil Nadu for example</h3>
                <ul class="market-list">
                    <li><a href="chennai">Chennai</a></li>
                    <li><a href="coimbatore">Coimbatore</a></li>
                </ul>
                <h3 class="mt25">Cities of Telangana for example</h3>
                <ul class="market-list">
                    <li><a href="hyderabad">Hyderabad</a></li>
                </ul>
                <h3 class="mt25">Cities of West Bengal for example</h3>
                <ul class="market-list">
                    <li><a href="kolkata">Kolkata</a></li>
                </ul> -->
            </div>

        </div>
    </section>

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

</html>