<?php include_once 'header.php';?>

<?php 
$page = mysqli_fetch_array(db_query("select * from tbl_site_pages where site_pages_id='95'"));
?>

<section class="page-title" style="background-image: url('static_files/<?=$page['site_pages_inner_banner']?>');">
<div class="auto-container">
<div class="title-outer">
<h1 class="title">
<?=$page['site_pages_name']?>
</h1>
<ul class="page-breadcrumb">
<li><a href="">Home</a></li>
<li>
<?=$page['site_pages_name']?>
</li>
</ul>
</div>
</div>
</section>

<!-- About Section -->
<section class="about-section">
<div class="auto-container">
<div class="row">
<div class="col-lg-12">
<div class="market-area-heading">
<h1>Market Area</h1>

</div>
<div class="market-area">
<?php 
$marketplace_state_data=db_query("select * from tbl_marketplace where category_status='Active' and category_parent_id='0' order by category_order_by");
while($marketplace_state=mysqli_fetch_array($marketplace_state_data)){
$check_subcat=db_scalar("select COUNT(category_id) from tbl_marketplace where category_parent_id='$marketplace_state[category_id]'");
?>  
<h4><a href="<?=$site_url?>/<?=$marketplace_state['category_url']?>/"><?=$marketplace_state['category_name']?></a></h4>
<?php 
if($check_subcat>0){
 $marketplace_district_data=db_query("select * from tbl_marketplace where category_status='Active' and category_parent_id='$marketplace_state[category_id]'"); 
?>
<ul>
<?php 
while($marketplace_district=mysqli_fetch_array($marketplace_district_data)){?>  
<li><a href="<?=$site_url?>/<?=$marketplace_district['category_url']?>/"><?=$marketplace_district['category_name']?></a></li>
<?php } ?>      
</ul>

<?php }} ?>

</div>  
</div> 
</div>
</div>
</section>
<!--End About Section -->

<?php include_once 'footer.php';?>