

<div class="clr"></div>

<div class="container padd_not" >

<div class="col-md-12  bg_measirs"  >





<div class="col-md-12 padd_not">
<div class="row">

<div class="col-md-4 padd_lt_not"  >	



<div class="page" >

	
<!--<div class="sp-loading"><img src="products_zoom/images/sp-loading.gif" alt=""><br>LOADING IMAGES</div>-->
<div class="sp-wrap" >
<?php if($product->img!='') { ?>
<a href="<?php echo base_url('assets/images/'.$product->img) ; ?>"><img src="<?php echo base_url('assets/images/'.$product->img) ; ?>" title="<?php echo $product->title; ?>" alt="<?php echo $product->title; ?>"></a>
<?php } else { ?>
<img src="<?php echo base_url('assets/website/images/pro.jpg') ; ?>" alt="">
<?php } ?>

<?php if($product->img2!='') { ?>
<a href="<?php echo base_url('assets/images/'.$product->img2) ; ?>"><img src="<?php echo base_url('assets/images/'.$product->img2) ; ?>" title="<?php echo $product->title; ?>" alt="<?php echo $product->title; ?>" ></a>
<?php } ?>

<?php if($product->img3!='') { ?>
<a href="<?php echo base_url('assets/images/'.$product->img3) ; ?>"><img src="<?php echo base_url('assets/images/'.$product->img3) ; ?>" title="<?php echo $product->title; ?>" alt="<?php echo $product->title; ?>" ></a>
<?php } ?>


<?php if($product->img4!='') { ?>
<a href="<?php echo base_url('assets/images/'.$product->img4) ; ?>"><img src="<?php echo base_url('assets/images/'.$product->img4) ; ?>" title="<?php echo $product->title; ?>" alt="<?php echo $product->title; ?>" ></a>
<?php } ?>

<?php if($product->img5!='') { ?>
<a href="<?php echo base_url('assets/images/'.$product->img5) ; ?>"><img src="<?php echo base_url('assets/images/'.$product->img5) ; ?>" title="<?php echo $product->title; ?>" alt="<?php echo $product->title; ?>" ></a>
<?php } ?>

<?php if($product->img6!='') { ?>
<a href="<?php echo base_url('assets/images/'.$product->img6) ; ?>"><img src="<?php echo base_url('assets/images/'.$product->img6) ; ?>" title="<?php echo $product->title; ?>" alt="<?php echo $product->title; ?>" ></a>
<?php } ?>

<?php if($product->img7!='') { ?>
<a href="<?php echo base_url('assets/images/'.$product->img7) ; ?>"><img src="<?php echo base_url('assets/images/'.$product->img7) ; ?>"title="<?php echo $product->title; ?>" alt="<?php echo $product->title; ?>" ></a>
<?php } ?>

<?php if($product->img8!='') { ?>
<a href="<?php echo base_url('assets/images/'.$product->img8) ; ?>"><img src="<?php echo base_url('assets/images/'.$product->img8) ; ?>" title="<?php echo $product->title; ?>" alt="<?php echo $product->title; ?>"></a>
<?php } ?>







</div>

	 
	
	</div>

<!--<img src="<?php echo base_url('assets/images/'.$product->img) ; ?>" class="wm-zoom-default-img" alt="alternative text" data-hight-src="<?php echo base_url('assets/images/'.$product->img) ; ?>" data-loader-src="assets/img/loader.gif"  id="zoominage">-->
              
	
</div>

<div class="col-md-8">
<h1><?php echo $product->title; ?></h1>


<div class="row clearfix brtop-10 property-type font-roboto regular"> 



<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 pro_saml_des"> <p>Property Type <br /><span>
<?php $subcategory_id=$product->subcategory_id;
if($subcategory_id!=''){
$sql5 ="SELECT * FROM shop_subcategory where `id`='$subcategory_id'";
$query5 = $this->db->query($sql5);
if ($query5->num_rows() > 0) {
foreach($query5->result() as $rows5) {  echo $title5=$rows5->title; 
}
}
}
?>
</span></p></div>


<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 pro_saml_des"> <p>Property <br /><span>
<?php $code=$product->code;
if($code==1) { echo "Buy";}
if($code==2) { echo "Rent";}
?>
</span></p></div>


<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 pro_saml_des"> <p>Property ID <br /><span><?=$product->reg_id?></span> </p> </div> 

<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 pro_saml_des"> <p>Posted On <br /><span>
<?php
$s = $product->reg_date;
$dt = new DateTime($s);
$date = $dt->format('m/d/Y');
$time = $dt->format('H:i:s');
echo $date;
?></span> </p> </div> 



 








</div> 


<h2 class="font-nunito regular"><?php // echo $product->price; ?>
<?php
//$example = $product->price;
//$subtotal =  number_format($example, 2, '.', ',');
//echo $subtotal;



$amount = $product->price;
$amount = moneyFormatIndia( $amount );
echo $amount;

function moneyFormatIndia($num) {
    $explrestunits = "" ;
    if(strlen($num)>3) {
        $lastthree = substr($num, strlen($num)-3, strlen($num));
        $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits
        $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
        $expunit = str_split($restunits, 2);
        for($i=0; $i<sizeof($expunit); $i++) {
            // creates each of the 2's group and adds a comma to the end
            if($i==0) {
                $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer
            } else {
                $explrestunits .= $expunit[$i].",";
            }
        }
        $thecash = $explrestunits.$lastthree;
    } else {
        $thecash = $num;
    }
    return $thecash; // writes the final format where $currency is the currency symbol.
}


?>

</h2> 



<?php if($contacts==0) { ?>
<a href="#" class="read_more_2"  data-toggle="modal" data-target="#myModal" > View Contact Details </a>  
<?php } else { ?>

<?php echo $product->cperson; ?>
<?php } ?>




<!-- Button to Open the Modal -->

<!-- The Modal -->
<div class="modal" id="myModal">
  <div class="modal-dialog">
    <div class="modal-content">

      <!-- Modal Header -->
      <div class="modal-header">
        <h4 style="text-transform:lowercase; text-transform:capitalize;">Contact form</h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>

      <!-- Modal body -->
      <div class="modal-body">
<p>&nbsp;</p>
<form name="formr" method="post" >
<input type="hidden" name="postid" class="form-control" placeholder="Name" value="<?=$product->reg_id?>" required="required" />
<input type="hidden" name="en_reg_id" class="form-control" placeholder="Name" value="<?=$product->en_reg_id?>" required="required" />
<input type="text" name="name" class="form-control" placeholder="Name" required="required" /> <br />
<input type="text"  name="phone" class="form-control"  placeholder="Phone Numer" required="required" />  <br />
<input type="text"  name="email" class="form-control"  placeholder="Email" required="required" /> <br />

<input type="submit"  class="btn btn-danger" value="Submit" name="submits" style="max-width:150px;"  />

 
 </form>
 
      </div>


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




</div>

</div>
</div>

<div class="clr"></div>



<div class="row">

<div class="col-md-9 padd_not">
<div class="row">



<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 basic-info"> <h3 class="font-nunito semi-bold">Property Description</h3> <p class="font-roboto regular">
<?=$product->text?> </p> </div>

<div class="col-md-6">

<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Ownership</div>
<div class="col-md-8 text-left">: <b>
<?php $brand_id=$product->brand_id;
if($brand_id!=''){
$sql ="SELECT * FROM shop_brand where `id`='$brand_id'";
$query = $this->db->query($sql);
if ($query->num_rows() > 0) {
foreach($query->result() as $rows) {  echo $title=$rows->title; 
}
}
}
?>



</b></div>
</div>
</div>
<div class="clr"></div>

<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">State</div>
<div class="col-md-8 text-left">: <b>

<?php $state_id=$product->state_id;
if($state_id!=''){
$sql2 ="SELECT * FROM states where `id`='$state_id'";
$query2 = $this->db->query($sql2);
if ($query2->num_rows() > 0) {
foreach($query2->result() as $rows2) {  echo $title2=$rows2->name; 
}
}
}
?>

</b></div>
</div>
</div>
<div class="clr"></div>



<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">District</div>
<div class="col-md-8 text-left">: <b>

<?php $dist_id=$product->dist_id;
if($dist_id!=''){
$sql4 ="SELECT * FROM districts where `id`='$dist_id'";
$query4 = $this->db->query($sql4);
if ($query4->num_rows() > 0) {
foreach($query4->result() as $rows4) {  echo $title4=$rows4->name; 
}
}
}
?>


</b></div>
</div>
</div>
<div class="clr"></div>

<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Town</div>
<div class="col-md-8 text-left">: <b>

<?php $city_id=$product->city_mainid;
if($city_id!=''){
$sql3 ="SELECT * FROM city where `id`='$city_id'";
$query3 = $this->db->query($sql3);
if ($query3->num_rows() > 0) {
foreach($query3->result() as $rows3) {  echo $title3=$rows3->title; 
}
}
}
?>

</b></div>
</div>
</div>
<div class="clr"></div>



<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Post Office</div>
<div class="col-md-8 text-left">: <b>

<?php $post_id=$product->post_id;
if($post_id!=''){
$sql6 ="SELECT * FROM pincodes where `id`='$post_id'";
$query6 = $this->db->query($sql6);
if ($query6->num_rows() > 0) {
foreach($query6->result() as $rows6) {  echo $title6=$rows6->officename; 
}
}
}
?>

</b></div>
</div>
</div>
<div class="clr"></div>



<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Locality</div>
<div class="col-md-8 text-left">: <b><?=$product->pstreet2?></b></div>
</div>
</div>
<div class="clr"></div>

</div>

<div class="col-md-6">


<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left"><span style="font-size:14px;">Constructed Year</span></div>
<div class="col-md-8 text-left">: <b><?=$product->c_year?></b></div>
</div>
</div>
<div class="clr"></div>



<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Ready to Move</div>
<div class="col-md-8 text-left">: <b>
 <?php
$ready=$product->ready;
if($land_unit==0) { echo "Yes";}
if($land_unit==1) { echo "No";}
?>


</b></div>
</div>
</div>
<div class="clr"></div>


<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Land Area</div>
<div class="col-md-8 text-left">: <b> <?=$product->land?>
 <?php
$land_unit=$product->land_unit;
if($land_unit==1) { echo "cent";}
if($land_unit==2) { echo "acre";}
?>


</b></div>
</div>
</div>
<div class="clr"></div>


<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Building Are</div>
<div class="col-md-8 text-left">: <b> <?=$product->stock2?>
 <?php
$unit_id=$product->unit_id;
if($unit_id==1) { echo "Sq-Ft";}
if($unit_id==2) { echo "Sq-M";}
if($unit_id==3) { echo "Sq-Yrd";}
?>
</b>
</div>
</div>
</div>
<div class="clr"></div>


<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Bed Rooms</div>
<div class="col-md-8 text-left">: <b> <?=$product->bed?></b>
</div>
</div>
</div>
<div class="clr"></div>


<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-4 text-left">Bath rooms</div>
<div class="col-md-8 text-left">: <b> <?=$product->bath?></b>
</div>
</div>
</div>
<div class="clr"></div>





</div>

<div class="col-md-12">
<div class="col-md-12 bord_btm_2">
<div class="row">
<div class="col-md-2 text-left">Street</div>
<div class="col-md-10 text-left">: <b><?=$product->pstreet1?></b></div>
</div>
</div>
</div>





<?php if($product->offer_det!='') {

/*$offer_det=$product->offer_det;
$video_id = explode("?v=", $offer_det);
$video_id = $video_id[1];
*/
?>
<div class="col-md-12 text-center">
<p>&nbsp;</p>
<iframe width="90%" height="450"  src="https://www.youtube.com/embed/<?=$product->offer_det?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen style="margin:0px auto;" ></iframe>
</div>
<?php } ?>










</div>
</div>


<div class="col-md-3 bord_ds">
<!--
<div class="post_box" style="margin-bottom:15px;" >
<?=$product->code?>
</div>-->




<style>

.image_over {border:1px solid #ffffff;}
.image_over:hover { opacity:0.8; border:1px solid #dddddd;box-shadow: 0px 0px 5px #dddddd;}

</style>

<?php if(!empty($advertisement)){ foreach($advertisement as $advertisement_row){ if($advertisement_row['side']=='1'){ ?>
<a href="<?=$advertisement_row['title']?>" target="_blank">
<img src="<?php echo base_url('assets/images/'.$advertisement_row['image']) ; ?>" class="img-responsive image_over" style="margin-bottom:20px;" >
</a>
<?php  }}} ?>


</div>



</div>

</div>


<div class="clr"></div>
</div>



<section class="featured portfolio">
<div class="container padd_not" >
<div class="row portfolio-items">
<h3 style="width:100%; padding-left:15px; margin-bottom:20px;">Related Property </h3>
<?php if($related2): foreach($related2 as $property):	?>

<div class="item col-lg-4 col-md-6 col-xs-12 landscapes sale">
					<div class="project-single">
						<div class="project-inner project-head">
							
                            
                            <div class="project-bottom">
								<h4>
<a href="<?php echo site_url( 'Pro/view/'.$property['aid'].'/'.$property['category_id'].'/1/'.url_title($property['title'], '-', TRUE) ) ; ?>">
<?=$property['title']?>
<span class="category read_more3" >Read More</span></a></h4>
							</div>
						
							<div class="homes">
								<!-- homes img -->
								
<?php if($property['featured']==1){ ?>
<div class="homes-tag button alt featured">Featured</div>
<?php  }?>
<?php if($property['code']==1){ ?>
<div class="homes-tag button alt sale">For Sale</div>
<?php } ?>
<?php if($property['code']==2){ ?>
<div class="homes-tag button alt sale rent" >For Rent</div>
<?php } ?>



									
									<div class="homes-price">
<?php
$subcat=$property['subcategory_id'];
$sql1 ="SELECT * FROM shop_subcategory where id=$subcat";
$query1 = $this->db->query($sql1);
if ($query1->num_rows() > 0) {
foreach($query1->result() as $row1) {
echo $sub_title=$row1->title;
}
}
									
									
									
									?>
                                    
                                    
                                    
                                    </div>
									
                                    
                                    
                                    <div class="image_bd_d" style="background-image: url(<?php echo base_url('assets/images/'.$property['img']) ; ?>); background-size:cover;"  > 
<!--<?php if($property['img']) { ?><img src="<?php echo base_url('assets/images/'.$property['img']) ; ?>" alt="home-1" class="img-responsive"><?php } else { ?>
<img src="<?php echo base_url('assets/website/images/pro.jpg') ; ?>" alt="home-1"  >
<?php } ?>-->
</div>
                                    
                                    
                                    
							
							</div>
						</div>
						<!-- homes content -->
						<div class="homes-content">
							<!-- homes address -->
						<a href="<?php echo site_url( 'Pro/view/'.$property['aid'].'/'.$property['category_id'].'/1/'.url_title($property['title'], '-', TRUE) ) ; ?>">
                            <div class="titless"><h3><?=$property['title']?></h3></div>
                            </a>
                            
                            
							<p class="homes-address mb-3">
								
									<i class="fa fa-map-marker"></i><span><?=$property['locations']?></span>
							
							</p>
							<!-- homes List -->
							<ul class="homes-list clearfix">
								<li>
									<i class="fa fa-bed" aria-hidden="true"></i>
									<span><?=$property['bed']?> Bedrooms</span>
								</li>
								<li>

                             <i class="fas fa-shower"></i>

									<span><?=$property['bath']?> Bathrooms</span>
								</li>
								
							<li>
									<i class="fas fa-warehouse" aria-hidden="true"></i>
									<span><?php echo $property['stock2']; ?>
									<?php 
									if ($property['unit_id']==1) { echo "Sq-Ft";}
									if ($property['unit_id']==2) { echo "Sq-M";}
									if ($property['unit_id']==3) { echo "Sq-Yrd";}
									?></span>
								</li>
								<li>
									<i class="fa fa-object-group" aria-hidden="true"></i>
									<span><?php echo $property['land']; ?> 	<?php 
									if ($property['land_unit']==1) { echo "cent";}
									if ($property['land_unit']==2) { echo "acre";}
									?></span>
								</li>
							</ul>
							<!-- Price -->
							<div class="price-properties">
								<h3 class="title mt-3">
                           <i class="fa fa-inr" aria-hidden="true"></i> 
<?php
//echo $amount = $property['price'];
/*setlocale(LC_MONETARY, 'en_IN');
$amount = money_format('%!i', $amount);
echo $amount;*/

?> 
  <?php
$num = $property['price'];
$explrestunits = "" ;
    if(strlen($num)>3) {
        $lastthree = substr($num, strlen($num)-3, strlen($num));
        $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits
        $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
        $expunit = str_split($restunits, 2);
        for($i=0; $i<sizeof($expunit); $i++) {
            // creates each of the 2's group and adds a comma to the end
            if($i==0) {
                $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer
            } else {
                $explrestunits .= $expunit[$i].",";
            }
        }
        $thecash = $explrestunits.$lastthree;
    } else {
         $thecash = $num;
    }
    echo $thecash; // writes the final format where $currency is the currency symbol.

?>                               
                                
                        
                                </h3>
								<!--<div class="compare">
									<a href="#" title="Compare">
										<i class="fas fa-exchange-alt"></i>
									</a>
									<a href="#" title="Share">
										<i class="fas fa-share-alt"></i>
									</a>
									<a href="#" title="Favorites">
										<i class="fa fa-heart-o"></i>
									</a>
								</div>-->
							</div>
							<div class="footer">
								<!--<a href="agent-details.html" >
									<i class="fa fa-user"></i> 
                                    
                                    <?=$property['reg_user']?> 
                                    
                                    
								</a>-->
							
                                <i class="fa fa-calendar"></i> 
                                
                                
                                 <?php
$s =$property['reg_date'];
$dt = new DateTime($s);
$date = $dt->format('m/d/Y');
$time = $dt->format('H:i:s');
echo $date;
?>
                                
                                
                        
							</div>
						</div>
					</div>
				</div>

<?php endforeach; endif; ?>   



<div class="col-md-12">
<p style="text-align:center;" >



<a class="read_more_2" href="<?php echo site_url( 'Search/rn/1/0/0/'.$dist_id.'/0/0/'.$title4.'') ; ?>" class="read_more_2"  style="margin:0px auto;"  > View More Related Property </a>  
</p>
<p>&nbsp;</p>
</div>

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


<div class="clr"></div>