<?php include('admin/connection.php');?>
<!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">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Rent Kerala</title>
<?php include('includes/head.php');?>
    
</head>
  <body>
  
<?php include('includes/header.php');?>
 <?php include('includes/search.php');?>
  
  
    <div class="container">
    
    <?php 
	$query='';
	$sql=mysql_query("select *,(select sname from state where sid=a.sid)sname,(select name from city where cid=a.cid)district,
	(select lname from location where lid=a.lid)lname,(select tname from type where tid=a.tid)tname,(select cname from catagory where aid=a.aid)cname from property a where active='Y'");
	if(isset($_POST['search']))
	{
		
		
		
		$category=$_POST['category'];
		$type=$_POST['type'];
		
		if($_POST['state']!='')
		{
		$state=$_POST['state'];
		$query.=" and sid=$state";
		}
		
		if($_POST['district']!='')
		{
		$district=$_POST['district'];
		$query.=" and cid=$district";
		}
		
		if($_POST['cor']!='')
		{
		$entry=$_POST['cor'];
		$query.=" and entry=$entry";
		}
		
		if($_POST['category']!='')
		{
		$category=$_POST['category'];
		$query.=" and aid=$category";
		}
		
		if($_POST['type']!='')
		{
		$type=$_POST['type'];
		$query.=" and tid=$type";
		}
		
		$sql=mysql_query("select *,(select sname from state where sid=a.sid)sname,(select name from city where cid=a.cid)district,
	(select lname from location where lid=a.lid)lname,(select tname from type where tid=a.tid)tname,(select cname from catagory where aid=a.aid)cname from property a where active='Y' ".$query."");
		}
		while($rows=mysql_fetch_array($sql))
		{
	 ?>
    
    
    
    <div class="rent_deatils">
    <div class="col-md-3 padd_not text-center">
    <?php if($rows['img']!=''){ ?>
    <img src="admin/images/<?=$rows['img']?>" class="pro_img" >
    <?php }else{ ?><img src="admin/images/<?=$rows['img']?>" class="pro_img" > <? }?> 
    </div>
    
    <div class="col-md-9 padd_not">
    
    <div class="col-md-10">
    <h2  class="mob_cetr" ><?=$rows['pname']?></h2>
    <p  class="mob_cetr" ><?=$rows['district']?>,<?=$rows['lname']?></p>
    </div>
    <div class="col-md-2 padd_not">
    <div class="rate"><i class="fa fa-inr"></i> <?=$rows['amount']?></div>
    </div>
     <div class="col-md-12">
     <p style="width:100%;">Property Category (<?=$rows['cname']?>),Property Type (<?=$rows['tname']?>)</p>
      
     <table class="table_onre" border="0" cellspacing="0" cellpadding="10" align="left">
  <tr>
    <td>Bed Room  <span class="divider">:</span></td>
    <td><?=$rows['bedroom']?></td>
  </tr>
  
    <tr>
    <td>Bath  Room <span class="divider">:</span></td>
    <td><?=$rows['bathroom']?></td>
  </tr>
  
    <tr>
    <td>Buili-Up Area <span class="divider">:</span></td>
    <td><?=$rows['buildup']?></td>
  </tr>
  
  
    <tr>
    <td>Plot Area <span class="divider">:</span></td>
    <td><?=$rows['plot']?></td>
  </tr>
  
   
</table>
     
     <!--<table class="table_onre" border="0" cellspacing="0" cellpadding="10" align="left"> 
  <tr>
    <td>Posting ID  <span class="divider">:</span></td>
    <td>4</td>
  </tr>
  
    <tr>
    <td>Posted By <span class="divider">:</span></td>
    <td>2</td>
  </tr>
  
    <tr>
    <td>Posted On <span class="divider">:</span></td>
    <td>1500 Sq. Ft.</td>
  </tr>
  
  
    <tr>
    <td>Contact No <span class="divider">:</span></td>
    <td>20000 Mtr.</td>
  </tr>
  
   
</table>-->
     
     
     </div>
     
      <div class="col-md-12 magic">
      <a href="moredetails.php?id=<?=$rows['pid']?>" class="btn gap">More Details</a>
      <a href="#" class="btn">Send Enquiry</a>
      </div>
     
    
    </div>
    
    </div>
    
    
    <?php } ?>
    
    <!--<div class="rent_deatils">
    <div class="col-md-3 padd_not text-center">
    <img src="images/d2.jpg" class="pro_img" >
    </div>
    
    <div class="col-md-9 padd_not">
    
    <div class="col-md-10">
    <h2 class="mob_cetr">2 BHK FURNISHED FLAT AVAILABLE IN THRISSUR TOWER</h2>
    <p  class="mob_cetr" >Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
    </div>
    <div class="col-md-2 padd_not">
    <div class="rate"><i class="fa fa-inr"></i> 1500/-</div>
    </div>
     <div class="col-md-12">
     <p style="width:100%;">Property Type (Flat/Villa/Agricultural Land)</p>
     <table class="table_onre" border="0" cellspacing="0" cellpadding="10" align="left">
  <tr>
    <td>Bed Room  <span class="divider">:</span></td>
    <td>4</td>
  </tr>
  
    <tr>
    <td>Bath  Room <span class="divider">:</span></td>
    <td>2</td>
  </tr>
  
    <tr>
    <td>Buili-Up Area <span class="divider">:</span></td>
    <td>1500 Sq. Ft.</td>
  </tr>
  
  
    <tr>
    <td>Plot Area <span class="divider">:</span></td>
    <td>20000 Mtr.</td>
  </tr>
  
   
</table>
     
     <table class="table_onre" border="0" cellspacing="0" cellpadding="10" align="left"> 
  <tr>
    <td>Posting ID  <span class="divider">:</span></td>
    <td>4</td>
  </tr>
  
    <tr>
    <td>Posted By <span class="divider">:</span></td>
    <td>2</td>
  </tr>
  
    <tr>
    <td>Posted On <span class="divider">:</span></td>
    <td>1500 Sq. Ft.</td>
  </tr>
  
  
    <tr>
    <td>Contact No <span class="divider">:</span></td>
    <td>20000 Mtr.</td>
  </tr>
  
   
</table>
     
     
     </div>
     
      <div class="col-md-12 magic">
      <a href="#" class="btn gap">More Details</a>
      <a href="#" class="btn">Send Enquiry</a>
      </div>
     
    
    </div>
    
    </div>-->
    
    
    <!--<div class="rent_deatils">
    <div class="col-md-3 padd_not text-center">
    <img src="images/d2.jpg" class="pro_img" >
    </div>
    
    <div class="col-md-9 padd_not">
    
    <div class="col-md-10">
    <h2  class="mob_cetr" >2 BHK FURNISHED FLAT AVAILABLE IN THRISSUR TOWER</h2>
    <p  class="mob_cetr" >Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
    </div>
    <div class="col-md-2 padd_not">
    <div class="rate"><i class="fa fa-inr"></i> 1500/-</div>
    </div>
     <div class="col-md-12">
     <p style="width:100%;">Property Type (Flat/Villa/Agricultural Land)</p>
     <table class="table_onre" border="0" cellspacing="0" cellpadding="10" align="left">
  <tr>
    <td>Bed Room  <span class="divider">:</span></td>
    <td>4</td>
  </tr>
  
    <tr>
    <td>Bath  Room <span class="divider">:</span></td>
    <td>2</td>
  </tr>
  
    <tr>
    <td>Buili-Up Area <span class="divider">:</span></td>
    <td>1500 Sq. Ft.</td>
  </tr>
  
  
    <tr>
    <td>Plot Area <span class="divider">:</span></td>
    <td>20000 Mtr.</td>
  </tr>
  
   
</table>
     
     <table class="table_onre" border="0" cellspacing="0" cellpadding="10" align="left"> 
  <tr>
    <td>Posting ID  <span class="divider">:</span></td>
    <td>4</td>
  </tr>
  
    <tr>
    <td>Posted By <span class="divider">:</span></td>
    <td>2</td>
  </tr>
  
    <tr>
    <td>Posted On <span class="divider">:</span></td>
    <td>1500 Sq. Ft.</td>
  </tr>
  
  
    <tr>
    <td>Contact No <span class="divider">:</span></td>
    <td>20000 Mtr.</td>
  </tr>
  
   
</table>
     
     
     </div>
     
      <div class="col-md-12 magic">
      <a href="#" class="btn gap">More Details</a>
      <a href="#" class="btn">Send Enquiry</a>
      </div>
     
    
    </div>
    
    </div>-->
    
    
<div class="view_all">
<a href="properties.php" class="all_btn">View Full Properties</a>
</div>
    
    
    </div>
  
  
  
  <?php include('includes/footer.php');?> 

  </body>
</html>