<?php include("header.php");
//echo'<pre>';print_r($_POST);exit;
if(isset($_POST['find']))
{
	$cityid=$_POST['cityid'];
	$ads=str_replace(" ","-",$_POST['ads']);
	
	$ads=str_replace("&","and",$ads);
	
	if(isset($_POST['mcid']) && $_POST['mcid']==!"")
	{
		$mcatid=$_POST['mcid'];
	}
	else
	{
		$mcatid="all";
	}
	
	
	$city=$_POST['city'];
	
	?><script>
    window.location="<?php echo $actual_link;?>products/<?php echo $city."/".$cityid."/".$mcatid."/".$ads;?>";
    </script><?php
}


?>
 
<div class="intro">
<div class="dtable hw100">
<div class="dtable-cell hw100">
<div class="container text-center">
<h1 class="intro-title animated fadeInDown"> Find Classified Ads </h1>
<p class="sub animateme fittext3 animated fadeIn"> Find local classified ads on bootclassified in Minutes </p>
<div class="row search-row animated fadeInUp">
<div class="col-lg-4 col-sm-4 search-col relative locationicon">
<i class="icon-location-2 icon-append"></i>
<input type="text" name="country" id="autocomplete-ajax" class="form-control locinput input-rel searchtag-input has-icon" placeholder="City/Zipcode..." value="">
</div>
<div class="col-lg-4 col-sm-4 search-col relative"> <i class="icon-docs icon-append"></i>
<input type="text" name="ads" class="form-control has-icon" placeholder="I'm looking for a ..." value="">
</div>
<div class="col-lg-4 col-sm-4 search-col">
<button class="btn btn-primary btn-search btn-block"><i class="icon-search"></i><strong>Find</strong></button>
</div>
</div>
</div>
</div>
</div>
</div>
 
<div class="main-container">
<div class="container">
<div class="col-lg-12 content-box ">
<div class="row row-featured row-featured-category">
<div class="col-lg-12  box-title no-border">
<div class="inner"><h2><span>Browse by</span>
Category <a href="category.html" class="sell-your-item"> View more <i class="  icon-th-list"></i> </a></h2>
</div>
</div>
<form action="<?php echo $actual_link?>products" id="fromSec" method="post">
<input type="hidden" name="maincategory[]" id="mct">
<input type="hidden" name="submits">
</form>
<?php $sqlmaincatss=mysql_query("select * from tbl_maincategory");
	  while($resmaincatss=mysql_fetch_assoc($sqlmaincatss))
	  {
?>


<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a class="MainCatClick" value="<?php echo $resmaincatss['mcid'];?>"><img src="<?php echo $actual_link."admin/maincatimage/".$resmaincatss['maincategory_file'];?>" class="img-responsive" alt="img"> <h6> <?php echo $resmaincatss['name'];?> </h6> </a>
</div>

<?php } ?>


<!--<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/laptop-2.jpg" class="img-responsive" alt="img"> <h6> Laptops </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/mobile.jpg" class="img-responsive" alt="img"> <h6> Mobiles </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/tv.jpg" class="img-responsive" alt="img"> <h6> Electronics </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/hdd.jpg" class="img-responsive" alt="img"> <h6> Computer Accessories </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/house.jpg" class="img-responsive" alt="img"> <h6> Real Estate </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/Home-Electronics-Appliances-2.jpg" class="img-responsive" alt="img"> <h6> Home Appliances </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/camera.jpg" class="img-responsive" alt="img"> <h6> Cameras </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/fashion.jpg" class="img-responsive" alt="img"> <h6> Fashion & Beauty </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/toy.jpg" class="img-responsive" alt="img"> <h6> Kids & Baby Products </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/jobs.jpg" class="img-responsive" alt="img"> <h6> Jobs </h6> </a>
</div>
<div class="col-lg-2 col-md-3 col-sm-3 col-xs-4 f-category">
<a href="category.html"><img src="images/category/catalog.jpg" class="img-responsive" alt="img"> <h6> Home & Furniture </h6> </a>
</div>-->
</div>
</div>
<div style="clear: both"></div>
<div class="col-lg-12 content-box ">
<div class="row row-featured">
<div class="col-lg-12  box-title ">
<div class="inner"><h2><span>Most Favourite </span> Products <a href="category.html" class="sell-your-item"> View more <i class="  icon-th-list"></i> </a></h2>
</div>
</div>
<div style="clear: both"></div>
<div class=" relative  content featured-list-row clearfix">
<nav class="slider-nav has-white-bg nav-narrow-svg">
<a class="prev">
<span class="nav-icon-wrap"></span>
</a>
<a class="next">
<span class="nav-icon-wrap"></span>
</a>
</nav>
<div class="no-margin featured-list-slider ">

<?php $sqlmostlike=mysql_query("select * from tbl_favorite");
	  while($resmostlike=mysql_fetch_assoc($sqlmostlike))
	  {
		  $sqlads1=mysql_query("select * from tbl_ads where ads_id='".$resmostlike['ads_id']."' and admin_status!='Achieved'");
		  if(mysql_num_rows($sqlads1)>0)
		  {
		  	$resads1=mysql_fetch_assoc($sqlads1);
			
			
			?>
				<div class="item"> 
                	<a href="<?php echo $actual_link;?>ads_details/<?php echo $resads1['ads_id'];?>">
                        <span class="item-carousel-thumb">
                        	<img class="img-responsive" src="<?php echo $actual_link."postedfile/".$resads1['file1']; ?>" alt="img">
                        </span>
                        <span class="item-name"> <?php echo ucfirst($resads1['title']);?> </span>
                        <span class="price"> <i class="fa fa-inr"></i> <?php echo $resads1['price'];?> </span>
                    </a>
                </div>
			<?php
		  	
		  }
		  
		  
	  }
?>

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


</div>
</div>
 
<div class="page-info" style="background: url(images/bg.jpg); background-size:cover">
<div class="container text-center section-promo">
<div class="row">
<div class="col-sm-3 col-xs-6 col-xxs-12">
<div class="iconbox-wrap">
<div class="iconbox">
<div class="iconbox-wrap-icon">
<i class="icon  icon-group"></i>
</div>
<div class="iconbox-wrap-content">
<h5><span>2200</span> </h5>
<div class="iconbox-wrap-text">Trusted Seller</div>
</div>
</div>
 
</div> 
</div>
<div class="col-sm-3 col-xs-6 col-xxs-12">
<div class="iconbox-wrap">
<div class="iconbox">
<div class="iconbox-wrap-icon">
<i class="icon  icon-th-large-1"></i>
</div>
<div class="iconbox-wrap-content">
<h5><span>100</span> </h5>
<div class="iconbox-wrap-text">Categories</div>
</div>
</div>
 
</div> 
</div>
<div class="col-sm-3 col-xs-6  col-xxs-12">
<div class="iconbox-wrap">
<div class="iconbox">
<div class="iconbox-wrap-icon">
<i class="icon  icon-map"></i>
</div>
<div class="iconbox-wrap-content">
<h5><span>700</span> </h5>
<div class="iconbox-wrap-text">Location</div>
</div>
</div>
 
</div> 
</div>
<div class="col-sm-3 col-xs-6 col-xxs-12">
<div class="iconbox-wrap">
<div class="iconbox">
<div class="iconbox-wrap-icon">
<i class="icon icon-facebook"></i>
</div>
<div class="iconbox-wrap-content">
<h5><span>50,000</span> </h5>
<div class="iconbox-wrap-text"> Facebook Fans</div>
</div>
</div>
 
</div> 
</div>
</div>
</div>
</div>
 
<div class="page-bottom-info">
<div class="page-bottom-info-inner">
<div class="page-bottom-info-content text-center">
<h1>If you have any questions, comments or concerns, please call the Classified Advertising department at (000) 555-5555</h1>
<a class="btn  btn-lg btn-primary-dark" href="tel:+000000000">
<i class="icon-mobile"></i> <span class="hide-xs color50">Call Now:</span> (000) 555-5555 </a>
</div>
</div>
</div>


<?php include("footer.php");?>

<script>
$(".MainCatClick").click(function()
{
	
	$("#mct").val($(this).attr('value'));
	$("form#fromSec").submit();
});
</script>
