
	
	<!-- Property Sinlge Page Start -->
	<div class="page-property-single">
		<div class="container">
			<div class="row">
				<div class="col-lg-8">
					<!-- Property Single Content Start -->
					<div class="property-single-content">
                    <h1 style="font-size:25px;"><?php echo $product->title; ?></h1>
						<!-- Property Photos Slider Start -->
						<div class="property-photos-slider wow fadeInUp" data-wow-delay="0.25s">
							<div class="swiper">
								<div class="swiper-wrapper">
									<!-- Property Photo Slide Start -->
                                    
                                    
                                    <?php if($product->img!='') { ?>
									<div class="swiper-slide">
										<div class="property-photo-item">
											<figure class="image-anime">
												<img src="<?php echo base_url('assets/images/'.$product->img) ; ?>" alt="">
											</figure>
										</div>
									</div>
                                    <?php } else { ?>
<img src="<?php echo base_url('assets/website/images/pro.jpg') ; ?>" alt="">
<?php } ?>
                                    
                                    
                                    
                             
                                    
                                     <?php if($product->img2!='') { ?>
									<div class="swiper-slide">
										<div class="property-photo-item">
											<figure class="image-anime">
												<img src="<?php echo base_url('assets/images/'.$product->img2) ; ?>" alt="">
											</figure>
										</div>
									</div>
                                    <?php } ?>
                                    
                                    
                                     <?php if($product->img3!='') { ?>
									<div class="swiper-slide">
										<div class="property-photo-item">
											<figure class="image-anime">
												<img src="<?php echo base_url('assets/images/'.$product->img3) ; ?>" alt="">
											</figure>
										</div>
									</div>
                                    <?php } ?>
                                    
                                    
                                    
                                     <?php if($product->img4!='') { ?>
									<div class="swiper-slide">
										<div class="property-photo-item">
											<figure class="image-anime">
												<img src="<?php echo base_url('assets/images/'.$product->img4) ; ?>" alt="">
											</figure>
										</div>
									</div>
                                    <?php } ?>
                                    
                                    
                                     <?php if($product->img5!='') { ?>
									<div class="swiper-slide">
										<div class="property-photo-item">
											<figure class="image-anime">
												<img src="<?php echo base_url('assets/images/'.$product->img5) ; ?>" alt="">
											</figure>
										</div>
									</div>
                                    <?php } ?>
                                    
                                    
                                     <?php if($product->img6!='') { ?>
									<div class="swiper-slide">
										<div class="property-photo-item">
											<figure class="image-anime">
												<img src="<?php echo base_url('assets/images/'.$product->img6) ; ?>" alt="">
											</figure>
										</div>
									</div>
                                    <?php } ?>
                                    
                                    
                                     <?php if($product->img7!='') { ?>
									<div class="swiper-slide">
										<div class="property-photo-item">
											<figure class="image-anime">
												<img src="<?php echo base_url('assets/images/'.$product->img7) ; ?>" alt="">
											</figure>
										</div>
									</div>
                                    <?php } ?>
                                    
                                    
                                    
                                     <?php if($product->img8!='') { ?>
									<div class="swiper-slide">
										<div class="property-photo-item">
											<figure class="image-anime">
												<img src="<?php echo base_url('assets/images/'.$product->img8) ; ?>" alt="">
											</figure>
										</div>
									</div>
                                    <?php } ?>
                                    
                                    
								</div>
								
								<!-- If we need navigation buttons -->
								<div class="swiper-arrow-prev"><i class="fa-solid fa-arrow-left"></i></div>
								<div class="swiper-arrow-next"><i class="fa-solid fa-arrow-right"></i></div>
							  </div>
						</div>
						<!-- Property Photos Slider End -->

						<!-- Property Overview Start -->
						<div class="property-overview wow fadeInUp" data-wow-delay="0.5s">
							<div class="property-single-subtitle">
								<h3>Overview</h3>
							</div>

							<div class="property-overview-box">
								<!-- Property Overview Item Start -->
								<div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-bedrooms.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Ownership</h3>
										<p><?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; 
}
}
}
?></p>
									</div>
								</div>
								<!-- Property Overview Item End -->

								<!-- Property Overview Item Start -->
								<div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-bathrooms.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Town</h3>
										<p>
<?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; 
}
}
}
?></p>
									</div>
								</div>
								<!-- Property Overview Item End -->

								<!-- Property Overview Item Start -->
								<div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-areas.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Locality</h3>
										<p><?=$product->pstreet2?></p>
									</div>
								</div>
								<!-- Property Overview Item End -->

								<!-- Property Overview Item Start -->
								<div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-garages.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Constructed Year</h3>
										<p><?=$product->c_year?></p>
									</div>
								</div>
								<!-- Property Overview Item End -->

								<!-- Property Overview Item Start -->
								<div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-built-year.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Ready to Move</h3>
										<p> <?php
$ready=$product->ready;
if($land_unit==0) { echo "Yes";}
if($land_unit==1) { echo "No";}
?></p>
									</div>
								</div>
								<!-- Property Overview Item End -->

								<!-- Property Overview Item Start -->
								<div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-plot-size.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Land Area</h3>
										<p><?=$product->land?>
 <?php
$land_unit=$product->land_unit;
if($land_unit==1) { echo "cent";}
if($land_unit==2) { echo "acre";}
?></p>
									</div>
								</div>
                                
                                
                                
                                
                                <div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-plot-size.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Building Are</h3>
										<p><?=$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";}
?></p>
									</div>
								</div>
                                
                                
                                
                                
                                <div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-plot-size.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Bed Rooms</h3>
										<p><?=$product->bed?></p>
									</div>
								</div>
                                
                                
                                
                                <div class="property-overview-item">
									<div class="icon-box">
										<img src="<?php echo base_url('') ; ?>/assets/theme/images/icon-plot-size.svg" alt="">
									</div>

									<div class="property-overview-content">
										<h3>Bath rooms</h3>
										<p><?=$product->bath?></p>
									</div>
								</div>
                                
                                
                               
                                
                                
								<!-- Property Overview Item End -->
							</div>
						</div>
						<!-- Property Overview End -->
                        
                        
                        
                        <?php if($product->offer_det!='') {
						//echo $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="100%" height="450"  src="https://www.youtube.com/embed/<?=$video_id?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen style="margin:0px auto;" ></iframe>
</div>
<?php } ?>

						<!-- About Property Start -->
						<div class="about-property wow fadeInUp" data-wow-delay="0.75s">
							<div class="property-single-subtitle">
								<h3>About This Property</h3>
							</div>

							<div class="about-property-content">
								<p><?=$product->text?> </p>

								<div class="about-property-cta">
									<a href="#" class="btn-default btn-border">Contact us</a>
									<a href="#" class="btn-default"><i class="fa-solid fa-phone-volume"></i> +123 456 789</a>
								</div>
							</div>
						</div>
						<!-- About Property End -->

			

					</div>
					<!-- Property Single Content End -->
				</div>

				<div class="col-lg-4">
					<!-- Property Single Sidebar Start -->
					<div class="porperty-single-sidebar">
						<!-- Property Information Box Start -->
						<div class="property-info-box wow fadeInUp" data-wow-delay="0.25s">
							<h3>Other Details</h3>

							<div class="property-info-lists">
								<!-- Property Info item Start-->
								<div class="property-info-item">
									<div class="icon-box">
										<img src="images/icon-property-location.svg" alt="">
									</div>

									<p><p>Property Type :<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; 
}
}
}
?></p>
								</div>
								<!-- Property Info item End-->

								<!-- Property Info item Start-->
								<div class="property-info-item">
									<div class="icon-box">
										<img src="images/icon-property-phone.svg" alt="">
									</div>

									<p>Property :<span>
<?php $code=$product->code;
if($code==1) { echo "Buy";}
if($code==2) { echo "Rent";}
?></p>
								</div>
                                
                                
                                
                                <div class="property-info-item">
									<div class="icon-box">
										<img src="images/icon-property-phone.svg" alt="">
									</div>

									<p>Property ID :<span><?=$product->reg_id?></span> </p>
								</div>
                                
                                
                                
                                
                                
                                  <div class="property-info-item">
									<div class="icon-box">
										<img src="images/icon-property-phone.svg" alt="">
									</div>

									<p>Posted On :<span>
<?php
$s = $product->reg_date;
$dt = new DateTime($s);
$date = $dt->format('m/d/Y');
$time = $dt->format('H:i:s');
echo $date;
?> </p>
								</div>
                                
                                
                                
                                
								<!-- Property Info item End-->

								<!-- Property Info item Start-->
								<div class="property-info-item">
									<div class="icon-box">
										<img src="images/icon-property-price.svg" alt="">
									</div>

									<p><?php
//$example = $product->price;
//$subtotal =  number_format($example, 2, '.', ',');
//echo $subtotal;



$amount = $product->price;
$amount = moneyFormatIndia( $amount );
echo "Rs."; 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.
}


?></p>
								</div>
								<!-- Property Info item End-->
							</div>
                            
                            

                            
                            
						</div>
						<!-- Property Information Box End -->

						<!-- Property Inquiry Form Start -->
						<div class="property-inquiry-box wow fadeInUp" data-wow-delay="0.5s">
							<h3>Send Inquiry</h3>
							
							<div class="property-inquiry-form">
								<form id="contactForm" action="#" method="POST" data-toggle="validator">
									<div class="row">
										<div class="form-group col-md-12 mb-3">
											<input type="text" name="name" class="form-control" id="name" placeholder="Name" required >
											<div class="help-block with-errors"></div>
										</div>
		
										<div class="form-group col-md-12 mb-3">
											<input type="email" name ="email" class="form-control" id="email" placeholder="Email" required >
											<div class="help-block with-errors"></div>
										</div>
		
										<div class="form-group col-md-12 mb-3">
											<input type="text" name="phone" class="form-control" id="phone" placeholder="Phone" required >
											<div class="help-block with-errors"></div>
										</div>
		
										<div class="form-group col-md-12 mb-3">
											<textarea name="msg" class="form-control" id="msg" rows="4" placeholder="Write a Message" required></textarea>
											<div class="help-block with-errors"></div>
										</div>
		
										<div class="col-md-12 text-center">
											<button type="submit" class="btn-default">Send Message</button>
											<div id="msgSubmit" class="h3 text-left hidden"></div>
										</div>
									</div>
								</form>
							</div>
						</div>
						<!-- Property Inquiry Form End -->
					</div>
					<!-- Property Single Sidebar End -->
				</div>
			</div>
		</div>
	</div>
	<!-- Property Sinlge Page End -->
