    <style type="text/css">
          #map{ width:100%; height: 500px; margin-bottom: 10px; }
        </style>
        
        <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD3cFZavM5DEExtIl_rSuMZGmuFAMIlEI8"></script>
     
<?php include('header.php');?>
<?php include('sidebar.php');?>
<?php
$maintitle="Property Details";
$page="property.php";
$table="tbl_property";
$field_id="propertyid";
$mode=$_REQUEST['mode'];
$search=$_REQUEST['search'];
$content_id=$_REQUEST['propertyid'];
if(isset($_REQUEST['start'])){
$start=$_REQUEST['start']-1;
}
else {
$start=0;
}
?>

<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1><?php echo $maintitle;?></h1>
      <ol class="breadcrumb">
        <li><a href="dashboard.php"><i class="fa fa-dashboard"></i> <?php echo AL_DASHBOARD;?></a></li>
        <li class="active"><?php echo $maintitle;?></li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
    
     <div class="row">
 <!-- Add / Edit / Delete --> 
          <div class="col-sm-12"> 
          <div class="box box-success">
         <div class="box-header">
              <i class="fa fa-building-o"></i>
              <h3 class="box-title"><?php echo $maintitle;?></h3>
              <div class="box-tools pull-right">
                <div class="btn-group">
                <a href="<?php echo $page;?>"><button class="btn btn-danger btn-flat">&nbsp; <?php echo AL_LISTALL;?> <?php echo $maintitle;?></button></a>
                   
                </div>
              </div>
            </div> 
            </div> 
            </div>
<style>
		 
		 p {
    margin: 6px 0 4px;
    font-weight: 500;
}
		 </style>

<?php
$contentid=$_GET['propertyid'];
$cc=mysqli_query($con,"select * from  tbl_property where propertyid='$contentid'");
$contentdetails=mysqli_fetch_array($cc);
	
?>

     <div class="col-md-12">
          <!-- Horizontal Form -->
          <div class="box box-info">
            <div class="box-header with-border">
              <h3 class="box-title"> <?php echo AL_ADD;?> <?php echo $maintitle;?></h3>
            </div>
            
            <?php
			if($message!=""){
			?>
            <button class="btn btn-block btn-success btn-flat" type="button"><?php echo $message;?></button>
			<?php	
			}
			?>
             <div class="nav-tabs-custom">
             <ul class="nav nav-tabs">
             <li class="active"><a href="#activity" data-toggle="tab">Property Details</a></li>
             </ul>
            <form class="form-horizontal" action="" method="post" enctype="multipart/form-data">
            <div class="tab-content">
            <div class="active tab-pane" id="activity">
            <input type="hidden" name="mode" value="<?php echo $_REQUEST['mode'];?>"/>
              <div class="box-body"> 
               <div class="form-group">
                  <label for="inputEmail3" class="col-sm-3 control-label">Property Title</label>
                  <div class="col-sm-8">
                  <p> <?php echo $contentdetails['title'];?></p>
                  </div>
                </div>                
                <div class="form-group">
                  <label for="inputEmail3" class="col-sm-3 control-label">Property Name</label>
                  <div class="col-sm-8">
                 <p><?php echo $contentdetails['name'];?></p>  
                  </div>
                </div>
                <div class="form-group">
                  <label for="inputEmail3" class="col-sm-3 control-label">Property For</label>
                  <div class="col-sm-2">
                  <p>
                  	<?php if($contentdetails['category']==1) { ?> Rent<?php }?>
                  	<?php if($contentdetails['category']==2) { ?> Sale<?php }?>
                  </p>
                
                  </div>
                  <label for="inputEmail3" class="col-sm-1 control-label" >Category</label>
                  <div class="col-sm-2" >
                  
                           <?php
					$cf=$contentdetails['category1']; 
		$sel_cat=mysqli_query($con,"select * from tbl_category1 where categoryid=$cf");
				$res_cat=mysqli_fetch_array($sel_cat);					  
			    ?>
<p><?php  echo $res_cat['title'];?> </p>
                             
                         
                       
                  </div>
                  <label for="inputEmail3" class="col-sm-1 control-label">Type</label>
                  <div class="col-sm-2">
                                            
                                    <?php
	
$sel_type=mysqli_query($con,"select * from tbl_property_type where propertytypeid = '".$contentdetails["type"]."'");
$res_type=mysqli_fetch_array($sel_type);						  
?>
<p> <?php  echo $res_type['title'];?></p>                              
  
                      
                  </div>
                </div>
              
                <div class="form-group">
                  
                   <label for="inputEmail3" class="col-sm-3 control-label">Price</label>
                  <div class="col-sm-2">
                  <p><?php echo $contentdetails['price'];?></p>
                  </div>
                    <label for="inputEmail3" class="col-sm-1 control-label">Area</label>
                  <div class="col-sm-2">
                   <p><?php echo $contentdetails['area'];?></p>
                  </div>
                  <label for="inputEmail3" class="col-sm-1 control-label" id="kitchen1">Bedrooms</label>
                  <div class="col-sm-2" id="kitchen2">
                   <p><?php echo $contentdetails['bedrooms'];?></p>
                  </div>
                </div>
              
               
                <div class="form-group" id="kitchen">
                  <label for="inputEmail3" class="col-sm-3 control-label">Bathrooms</label>
                  <div class="col-sm-2">
                   <p><?php echo $contentdetails['bathrooms'];?></p>
                  </div>
                  <label for="inputEmail3" class="col-sm-1 control-label">Kitchen</label>
                  <div class="col-sm-2">
                   <p><?php echo $contentdetails['kitchen'];?></p>
                  </div>
                  <label for="inputEmail3" class="col-sm-1 control-label">Garage</label>
                  <div class="col-sm-2">
                  <p><?php echo $contentdetails['garage'];?></p>
                  </div>
                </div>
             
               
                <div class="form-group">
                  <label for="inputEmail3" class="col-sm-3 control-label">City</label>
                  <div class="col-sm-2">
                    
                   
						<?php
					  $ccc=$contentdetails['city'];
         $sel_city=mysqli_query($con,"SELECT * FROM tbl_city where cityid='$ccc'");
         $res_city=mysqli_fetch_array($sel_city);
        ?>
        <p><?php echo $res_city['city']; ?></option>
      

                  </div>
                  <label for="inputPassword3" class="col-sm-1 control-label">Location</label>
                  <div class="col-sm-2">
                 <?php
$sel_location=mysqli_query($con,"SELECT * FROM tbl_location WHERE locationid = '".$contentdetails["location"]."'");

 $res_location=mysqli_fetch_array($sel_location);
?>
 <p><?php echo $res_location['location']; ?></p>


                  </div>
                  
                  <label for="inputPassword3" class="col-sm-1 control-label">View</label>
                  <div class="col-sm-2">
                  <p><?php echo $contentdetails['view'];?></p>
                  </div>
                </div>
                
                
                <div class="form-group">
                  
                   <label for="inputEmail3" class="col-sm-3 control-label">Status</label>
                  <div class="col-sm-2">
                  <p><?php echo $contentdetails['status'];?></p>
                  </div>
                    <label for="inputEmail3" class="col-sm-1 control-label">Property Id</label>
                  <div class="col-sm-2">
                    <p><?php echo $contentdetails['property_id'];?></p>
                  </div>
                  <label for="inputEmail3" class="col-sm-1 control-label" >RERA PERMIT</label>
                  <div class="col-sm-2" >
                    <p><?php echo $contentdetails['rerapermit'];?></p>
                  </div>
                </div>
                
                 <div class="form-group">
                  <label for="inputEmail3" class="col-sm-3 control-label">Description</label>
                  <div class="col-sm-8">
                   <p><?php echo $contentdetails['description'];?></p>
                 </div>
                </div>
                
              <hr>
              
              <div class="form-group" id="amenity">
              <label for="inputEmail3" class="col-sm-3 control-label">Amenities</label>
              <div class="col-sm-8">  <p>
              <?php
				  $sel_am_ppty=mysqli_query($con,"select * from  tbl_property_amenities where property= '".$_GET['propertyid']."'");
				  while($res_am=mysqli_fetch_array($sel_am_ppty) ){
				  $amid=$res_am['amenities'];
			  $sel_amenities=mysqli_query($con,"select * from tbl_amenities where amenitiesid=$amid");
				$res_amenities=mysqli_fetch_array($sel_amenities);						  
			    ?>
              <?php  echo $res_amenities['title']. ", ";?>   
                 <?php } ?>      
                  </p>  </div>
                </div>
                <hr>
                 <div class="form-group">
                  <label for="inputEmail3" class="col-sm-3 control-label">Gallery First Image </label>
                 
                  <?php
					 $sel_img_gal=mysqli_query($con,"select * from  tbl_property_imagegallery where status='2' and property= '".$_GET['propertyid']."'");
					$res_img_gal=mysqli_fetch_array($sel_img_gal);
					 ?>
                  
                    <img src="../images/propertygallery/<?php echo $res_img_gal['image'];?>" style="width:98px;height:80px;">
                    
                </div>
                <hr>
               <div class="form-group">
                  <label for="inputEmail3" class="col-sm-3 control-label">Gallery images (750 x 384)</label>
                  
                   <?php  
					 $sel_img_gal=mysqli_query($con,"select * from  tbl_property_imagegallery where status!='2' and property= '".$_GET['propertyid']."'");
					while($res_img_gal=mysqli_fetch_array($sel_img_gal)) {
					 ?>
                 
                    
                    <div class="col-sm-2" style="text-align: center; margin-bottom: 15px;">
                       <img src="../images/propertygallery/<?php echo $res_img_gal['image'];?>" style="width:98px;height:80px;">
                   
                     </div>
                    <?php } ?>
                  
				  </div>
                 <hr>
                  <div class="form-group" style="display:none;">
                  <label for="inputEmail3" class="col-sm-3 control-label">Layouts (500 x 335)</label>
                 
                  
                   <?php   
					 $sel_layout=mysqli_query($con,"select * from  tbl_property_layout where  property= '".$_GET['propertyid']."'");
					while($res_layout=mysqli_fetch_array($sel_layout)) {
					 ?>
                 
                    
                    <div class="col-sm-2" style="text-align: center; margin-bottom: 15px;">
                     <img src="<?php echo $admin_url;?>thumb.php?src=<?php echo $admin_url;?>../images/propertylayout/<?php echo $res_layout['image'];?>&h=80&w=98">
                   
                     </div>
                    <?php }  ?>
                    
                  </div>
                  <hr>
                  <div class="form-group" style="display:none;">
                  <label for="inputEmail3" class="col-sm-3 control-label">Location (500 x 335)</label>
                  
                  <?php   
					 $sel_loc=mysqli_query($con,"select * from  tbl_property_location where  property= '".$_GET['propertyid']."'");
					while($res_loc=mysqli_fetch_array($sel_loc)) {
					 ?>
                 
                    
                    <div class="col-sm-2" style="text-align: center; margin-bottom: 15px;">
                   <img src="<?php echo $admin_url;?>thumb.php?src=<?php echo $admin_url;?>../images/propertylocation/<?php echo $res_loc['image'];?>&h=80&w=98">
                   
                     </div>
                    <?php } ?>
                  
                </div>
           <!--   <iframe width="100%" height="350" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?q=<?php echo $contentdetails['latitude'];?>,<?php echo $contentdetails['longitude'];?> &amp;key=AIzaSyD3cFZavM5DEExtIl_rSuMZGmuFAMIlEI8"></iframe>-->
               
               
               <!-- <label for="inputEmail3" class="col-sm-2 control-label">Latitude</label>
                  <div class="col-sm-3">
					  <p><?php echo $contentdetails['latitude'];?></p>
           <label for="inputEmail3" class="col-sm-2 control-label">Longitude</label>
                  <div class="col-sm-3">
					 <p><?php echo $contentdetails['longitude'];?></p></div>
              </div>-->
              </div>
             
              
              <!-- /.box-footer -->
              </div>
            </form>
              <script type="text/javascript" src="map.js"></script>
             
          </div>
         
        </div>
        </div>
       

    </section>
    <!-- /.content -->
  </div>
  <script>
CKEDITOR.replace( 'editor1' );
</script>
<?php include('footer.php');  ?>