<?php
include_once("include/main.inc.php");

$page_metatitle="Market Area -Stainless Steel Pipes";
$page_metakey="Market Area -Stainless Steel Pipes";
$page_metadesc="Market Area -Stainless Steel Pipes";
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$ee=explode('/',$actual_link);
$afterChunk = $ee[3];
$eem=explode('?',$afterChunk);

$finalUrl = $eem[1];


if($finalUrl){
     $url=site_url."/".market-area.".htm"; 
   echo "<script>
           window.location = '".$url."';
         </script>";
 }
?>
<!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(<?=theme_url;?>/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>
            </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">
                <h2 class="title_h2">Countries</h2>
                <ul class="market-list">
                    <?php
   $sql_loc=mysqli_query($dbconn,"select * 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_loc=mysqli_query($dbconn,"select * from location_tbl where parentID='100' 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>

                <?php
   $sql_loccc=mysqli_query($dbconn,"select * from location_tbl where parentID ='100' order by locationName asc");
   
   while($res_loc=mysqli_fetch_array($sql_loccc))
   {
   $locationID=$res_loc['locationID'];
    $sql_loc1=mysqli_query($dbconn,"select * 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_loc['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 } } ?>

                


                <?php
   $sql_locss=mysqli_query($dbconn,"select * from location_tbl where parentID ='0' and locationID!='100' order by locationName asc");
   
   while($res_loc=mysqli_fetch_array($sql_locss))
   {
   $locationIDs=$res_loc['locationID'];
    $sql_loc1=mysqli_query($dbconn,"select * from location_tbl where parentID ='$locationIDs' and status='Y' order by locationName asc");
if (mysqli_num_rows($sql_loc1) > 0)
   {
   ?>
                <h3 class="mt25">Cities of <?php echo $res_loc['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>
    </section> 
    <?php include "app_footer.php";?> 
    <?php include "app_bottom.php";?>
</body>

</html>