<?php include 'admin/includes/db_config.php';?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Top Notch Real Estate</title>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/revolution-slider.css" rel="stylesheet">
<link href="css/jquery-ui.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link rel="shortcut icon" href="images/favicon.png" type="image/x-icon">
<link rel="icon" href="images/favicon.png" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="css/responsive.css" rel="stylesheet">
<link href="css/home.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap" rel="stylesheet">
</head>

<body>
<div class="page-wrapper">
 	
  <?php include 'header.php';?>
    
   <section class="page-title" style="background-image:url(images/background/image-6.jpg);">
<!--        <div class="overlay-layer"></div>-->
        <div class="auto-container">
            <div class="content-box">
                <h2>Our <span class="theme_color">Properties</span></h2>
            </div>
        </div>
    </section>
     
     <section class="page-info">
        <div class="auto-container">
        	<!--Breadcrumb-->
            <div class="breadcrumb-outer">
                <ul class="bread-crumb clearfix">
                    <li><a href="index.php">Home</a></li>
                    <li class="active">Properties</li>
                </ul>
            </div>
        </div>
    </section>
     
       <section class="property-to-sell">
    	<div class="auto-container">
        	
        	<div class="row clearfix">
                <div class="left-column col-md-12 col-sm-12 col-xs-12">
                    <div class="inner">
                        
                        <div class="filter-list row clearfix" id="MixItUp2898AF">
                <!--Property Block-->
               
                  
                                       <?php 

	
$category=$_REQUEST['category'];
$category1=$_REQUEST['category1'];
$type=$_REQUEST['type'];
$city=$_REQUEST['city'];
$location=$_REQUEST['location'];
$bedroom=$_REQUEST['bedroom'];
$minarea=$_REQUEST['minarea'];
$maxarea=$_REQUEST['maxarea'];
$minprice=$_REQUEST['amount'];
$maxprice=$_REQUEST['amount1'];
	
	

//   if (isset($_GET['page_no']) && $_GET['page_no']!="") {
// 	$page_no = $_GET['page_no'];
// 	} else {
// 		$page_no = 1;
//         }

// 	$total_records_per_page = 15;
//     $offset = ($page_no-1) * $total_records_per_page;
// 	$previous_page = $page_no - 1;
// 	$next_page = $page_no + 1;
// 	$adjacents = "2"; 
	
$sell="select * from tbl_property where ";
$where=" statuss=0 order by bedrooms";

if($category!='')
{
	$where1.="category='$category' and ";
}
if($category1!='')
{
	$where1.="category1='$category1' and ";
}
if($type!='')
{
	$where1.="type='$type' and ";
}
if($city!='')
{
	$where1.="city='$city' and ";
}
if($location!='')
{
	$where1.="location='$location' and ";
}	
if($bedroom!='')
{
	$where1.="bedrooms='$bedroom' and ";
}	
if($minarea!='' && $maxarea=='')
{
	$where1.="area>='$minarea' and ";
} 
if($maxarea!='' && $minarea=='')
{
	$where1.="area<='$maxarea' and ";
}
if($minarea!='' && $maxarea!='')
{
	$where1.="area between '$minarea' and $maxarea and ";
}
if($minprice!='' && $maxprice=='')
{
	$where1.="price>='$minprice' and ";
}
if($maxprice!='' && $minprice=='')
{
	$where1.="price<='$maxprice' and ";
}
if($maxprice!='' && $minprice!='')
{
	$where1.="price between '$minprice' and $maxprice and ";
}
$sel=$sell.$where1.$where;

	


	echo $sel;
	
 $sql=mysqli_query($con,$sel);

	
 while ($result = mysqli_fetch_array($sql)) {
			
				$proid=$res_prop['propertyid'];
?>
                   <div class="property-block-grid col-lg-4 col-md-6 col-xs-12 mix mix_all" style="display: inline-block;">
                    <div class="inner-box">
                        <div class="image-box">
                            <?php 
						$sel_prop_gallery=mysqli_query($con,"select * from  tbl_property_imagegallery where property='$proid' order by galleryid");
					$res_prop_gallery=mysqli_fetch_array($sel_prop_gallery);
						?>
                            <figure class="image">
                              <img src="<?php echo $site_url;?>images/propertygallery/<?php echo $res_prop_gallery['image'];?>" alt="" style="width:372px;height:240px;">
                              
<!--                                <img src="images/propertygallery/<?php echo $res_prop_gallery['image'];?>&h=240&w=372" alt="">-->
                            
                            </figure>
                            <div class="ribbon"><?php $cat=$res_prop['category'];
					$sel_prop_category=mysqli_query($con,"select * from  tbl_category where categoryid=$cat");
					$res_prop_category=mysqli_fetch_array($sel_prop_category); echo $res_prop_category['title'];
						?></div>
                            <a href="property-details.php?pid=<?php echo $proid;?>" class="read-more-link">Read More</a>
                        </div>
                        <div class="lower-content">
<!--                            <h3><a href=""><?php echo $res_prop['title'];?></a></h3>-->
                            <h3><a href=""><?php echo $res_prop['name'];?></a></h3>
                            <div class="price">AED  <?php 
						echo number_format($res_prop['price']);?></div>
                            <div class="desc-text"><i class="fa fa-map-marker"></i> <?php $loc=$res_prop['location'];
						$sel_prop_location=mysqli_query($con,"select * from  tbl_location where locationid=$loc");
					$res_prop_location=mysqli_fetch_array($sel_prop_location); echo $res_prop_location['location'];
						?> / <?php $city=$res_prop['city'];
						$sel_prop_city=mysqli_query($con,"select * from  tbl_city where cityid=$city");
					$res_prop_city=mysqli_fetch_array($sel_prop_city); echo $res_prop_city['city'];?> </div>
                            <!--Specs List-->
                            <ul class="specs-list clearfix">
                               <?php if($res_prop['category1']==1) {?>
                                <li><div class="outer"><div class="icon"><span class="fa fa-expand"></span></div><div class="info"><?php echo $res_prop['area'];?> sq ft</div></div></li>
                                 <li><div class="outer"><div class="icon"><span class="fa fa-car"></span></div><div class="info"> Parking</div></div></li>
                                 <?php } if($res_prop['category1']==2) {?>
                                  <li><div class="outer"><div class="icon"><span class="fa fa-expand"></span></div><div class="info"><?php echo $res_prop['area'];?> sq ft</div></div></li>
                                  <li><div class="outer"><div class="icon"><span class="fa fa-car"></span></div><div class="info"><?php if($res_prop['garage']==0){ echo "No"; } else { echo $res_prop['garage'];}?> Parking</div></div></li>
                                <li><div class="outer"><div class="icon"><span class="fa fa-bed"></span></div><div class="info"><?php if($res_prop['bedrooms']==0){ echo "Studio"; } else { echo $res_prop['bedrooms']. " Bedroom";}?></div></div></li>
                                <li><div class="outer"><div class="icon"><span class="flaticon-shape"></span></div><div class="info"><?php echo $res_prop['bathrooms'];?> Bathrooms</div></div></li>
                                
                                <?php } ?>
                            </ul>
                           
                        </div>
                    </div>
                    </div>
                    <?php } 
		?>
           

	
       
                                   
                                   
                                   
                                
            </div>
                    </div>
                </div>
        	</div>
        </div>
    </section>
     
     <?php include 'footer.php';?>
      
</div>
<!--End pagewrapper-->

<!--Scroll to top-->
<div class="scroll-to-top scroll-to-target" data-target="html"><span class="icon fa fa-long-arrow-up"></span></div>

<script src="js/jquery-1.12.0.min.js"></script>
<!--<script src="js/jquery.js"></script> -->
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.js"></script>
<script src="js/bxslider.js"></script>
<script src="js/jquery.fancybox.pack.js"></script>
<script src="js/jquery.fancybox-media.js"></script>
<script src="js/validate.js"></script>
<script src="js/owl.js"></script>
<script src="js/wow.js"></script>
<script src="js/script.js"></script>
</body>

<!-- Mirrored from themexriver.com/shelter/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Dec 2019 04:49:10 GMT -->
</html>
