Your IP : 3.137.175.83
<?php session_start(); ob_start();
require_once('includes/headerquery.php');
if(isset($_GET['property'])){
$sn = $_GET['property'];
$sql = $db->query("SELECT * FROM properties WHERE sn='$sn' ");
$row = mysqli_fetch_assoc($sql);
$add = $row['address']; $ci=$row['city'];
$name=$row['name'];
$slotcost = $row['currentprice']/$row['slot'];
$x = $row['slot']-$pro->orderedPid($sn);
}
// $report = 'The report';
// if(array_key_exists('BookIns', $_POST)) {
// //$pro->BookIns();
// $id = $pro->Uid();
// $pid = $_GET['property'];
// $date = $_POST['date'];
// $time = $_POST['time'];
// $sql = $db->query("INSERT into inspection (id,pid,date,time) VALUES ('$id', '$pid', '$date', '$time')") or die(mysqli_error($db));
// $report = "Request Submitted Successfully";
// }
?>
<!doctype html>
<html class="no-js" lang="zxx">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Property Detail</title>
<meta name="robots" content="noindex, follow" />
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Place favicon.png in the root directory -->
<link rel="shortcut icon" href="img/favicon.png" type="image/x-icon" />
<!-- Font Icons css -->
<link rel="stylesheet" href="css/font-icons.css">
<!-- plugins css -->
<link rel="stylesheet" href="css/plugins.css">
<!-- Main Stylesheet -->
<link rel="stylesheet" href="css/style.css">
<!-- Responsive css -->
<link rel="stylesheet" href="css/responsive.css">
<style type="text/css">
input,select {
background-color: var(--white);
border: 2px solid;
border-color: var(--border-color-9);
height: 65px;
-webkit-box-shadow: none;
box-shadow: none;
padding-left: 20px;
font-size: 16px;
color: var(--ltn__paragraph-color);
width: 100%;
margin-bottom: 30px;
border-radius: 0;
padding-right: 40px; }
</style>
</head>
<body>
<!-- Body main wrapper start -->
<div class="body-wrapper">
<?php include('head.php'); ?>
<!-- Utilize Mobile Menu End -->
<div class="ltn__utilize-overlay"></div>
<!-- BREADCRUMB AREA START -->
<div class="ltn__breadcrumb-area text-left bg-overlay-white-30 bg-image p-5 mb-0" data-bs-bg="img/bg/14.jpg">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="ltn__breadcrumb-inner">
<h1 class="page-title">Property Details</h1>
<div class="ltn__breadcrumb-list">
<ul>
<li><a href="index.html"><span class="ltn__secondary-color"><i class="fas fa-home"></i></span> Home</a></li>
<li>Property Details</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- BREADCRUMB AREA END -->
<!-- SHOP DETAILS AREA START -->
<div class="ltn__shop-details-area pb-10">
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-12">
<div class="ltn__shop-details-inner ltn__page-details-inner mb-60">
<h1><?= $row['name'] ?></h1>
<label class="title-2"><span class="ltn__secondary-color"><i class="flaticon-pin"></i></span> <?= $row['address'].', '.$row['city'].', '.$row['country'] ?></label><br>
<img src="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageA'); ?>" width="100%" alt="#">
<h4 class="title-2">Description</h4>
<p><?= $row['des'] ?></p>
<h4 class="title-2">Property Detail</h4>
<div class="property-detail-info-list section-bg-1 clearfix mb-60">
<?php $xpir = $row['expire']; if($row['type'] != 'Land'){ ?> <ul>
<li><label>Property ID:</label> <span><?= substr($row['type'],0,1).'102'.$row['sn'] ?></span></li>
<!-- <li><label>Size: </label> <span><?= $row['size'] ?> sqfm</span></li> -->
<li><label>Rooms:</label> <span><?= $row['room'] ?></span></li>
<li><label>Baths:</label> <span><?= $row['bathroom'] ?></span></li>
<li><label>Year built:</label> <span><?= $row['year'] ?></span></li>
</ul>
<?php } ?>
<ul>
<li><label>Property Size:</label> <span><?= $row['size'] ?> sqm</span></li>
<li><label>Price:</label> <span>NGN <?= number_format($row['currentprice'],2) ?></span></li>
<li><label>Price Per Block:</label> <span>NGN <?= number_format($slotcost,2) ?></span></li>
<li><label>Total Trading Blocks:</label> <span><?= $row['slot'] ?></span></li>
<li><label>Available Blocks: </label> <span><?= $x ?></span></li>
<li><label>Trading Window Closes: </label> <span><?= date('jS M, Y', strtotime($row['expire'])) ?></span></li>
</ul>
</div>
<h4 class="title-2">Property Gallery</h4>
<div class="ltn__property-details-gallery mb-30">
<div class="row">
<div class="col-md-6">
<a href="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageB'); ?>" data-rel="lightcase:myCollection">
<img class="mb-30" src="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageB'); ?>" alt="Image">
</a>
</div>
<div class="col-md-6">
<a href="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageC'); ?>" data-rel="lightcase:myCollection">
<img class="mb-30" src="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageC'); ?>" alt="Image">
</a>
</div>
<div class="col-md-6">
<a href="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageD'); ?>" data-rel="lightcase:myCollection">
<img class="mb-30" src="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageD'); ?>" alt="Image">
</a>
</div>
<div class="col-md-6">
<a href="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageE'); ?>" data-rel="lightcase:myCollection">
<img class="mb-30" src="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageE'); ?>" alt="Image">
</a>
</div>
</div>
</div>
<?php if($row['type'] != 'Land'){ ?>
<h4 class="title-2 mb-10">Amenities</h4>
<div class="property-details-amenities mb-60">
<div class="row">
<div class="ltn__menu-widget">
<?php $sq = $db->query("SELECT * FROM property_amenities WHERE property_sn = '$sn' ");
while ($ro = mysqli_fetch_assoc($sq)) {
?>
<div class="col-lg-4 col-md-6">
<label class="checkbox-item"><?= $ro['name'] ?>
<input type="checkbox" checked="checked">
<span class="checkmark"></span>
</label>
</div>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
<h4 class="title-2">Location</h4>
<div id="calll"></div>
<?php $sql = $db->query("SELECT * FROM prices WHERE pid='$sn' "); if(mysqli_num_rows($sql)>0){ ?>
<h6>Price Change History</h6>
<table class="table">
<tr>
<th>SN</th><th>Previous Price</th><th>New Price</th><th>Change (%)</th> <th>Date</th>
</tr>
<?php $i=1;
while($row = mysqli_fetch_assoc($sql)){ $e=$i++; if($e==1){ $opp = $row['oldprice']; } $op = $row['oldprice']; $np = $row['newprice'];
$p = 100*($np-$opp)/$opp; ?>
<tr>
<td><?= $e ?></td><td><?= number_format($op) ?></td><td><?= number_format($np) ?></td><td><?= number_format($p,2) ?>%</td><td><?= $row['created'] ?></td>
</tr>
<?php } ?>
</table>
<br><br>
<?php } ?>
<?php if(isset($_SESSION['user_id']) AND time()<strtotime($xpir)){ ?>
<a href="#" class="btn btn-effect-3 btn-secondary" data-bs-toggle="modal" data-bs-target="#inspection">Book Site Inspection</a>
<a href="#" class="btn btn-effect-3 btn-white" data-bs-toggle="modal" data-bs-target="#porder"> Purchase Property/Block</a>
<?php }else{ ?>
<a href="signin.php" class="btn btn-effect-3 btn-secondary" >Login/Signup to Book Inspection or Purchase Property</a>
<?php } ?>
</div>
</div>
<div class="col-lg-4">
<aside class="sidebar ltn__shop-sidebar ltn__right-sidebar--- pt-5">
<!-- Author Widget -->
<!-- Popular Product Widget -->
<div class="widget ltn__popular-product-widget p-3">
<h4 class="ltn__widget-title ltn__widget-title-border-2">Popular Properties</h4>
<div class="row ltn__popular-product-widget-active slick-arrow-1">
<?php $sql = $db->query("SELECT * FROM properties WHERE uri != 'cciproperties' ORDER BY sn DESC ");
while ($row = mysqli_fetch_assoc($sql)) { $sn = $row['sn'];
?>
<!-- ltn__product-item -->
<div class="col-12">
<div class="ltn__product-item ltn__product-item-4 ltn__product-item-5 text-center---">
<div class="product-img">
<a href="property-detail.php?property=<?= $row['sn'] ?>"><img src="assets/uploads/<?= sqLx('property_images','property_sn',$sn,'imageA'); ?>" alt=""></a>
</div>
<div class="product-info">
<div class="product-price">
<span>NGN<?= number_format($row['currentprice']/$row['slot'],2) ?>/Block</span>
</div>
<h2 class="product-title"><a href="property-detail.php?property=<?= $row['sn'] ?>"><?= $row['name'] ?></a></h2>
<div class="product-img-location">
<ul>
<li>
<a href="#"><i class="flaticon-pin"></i> <?= $row['address'].', '.$row['city'].', '.$row['country'] ?></a>
</li>
</ul>
</div>
<ul class="ltn__list-item-2--- ltn__list-item-2-before--- ltn__plot-brief">
<?php if($row['type'] != 'Land'){ ?>
<li><span><?= $row['room'] ?> </span>
Bedrooms
</li>
<li><span><?= $row['bathroom'] ?> </span>
Bathrooms
</li>
<?php } ?>
<li><span><?= $row['size'] ?> </span>
Square Meters
</li>
</ul>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</aside>
</div>
</div>
</div>
</div>
<!-- SHOP DETAILS AREA END -->
<?php include('foot.php');
include('modals.php'); ?>
</div>
<!-- Body main wrapper end -->
<input type="hidden" id="add" value="<?= $add ?>">
<input type="hidden" id="ci" value="<?= $ci ?>">
<!-- All JS Plugins -->
<script src="js/plugins.js"></script>
<!-- Main JS -->
<script src="js/main.js"></script>
<script type="text/javascript">
function thed(){
var a = document.getElementById('add').value;
var b = document.getElementById('ci').value;
var adrr = a+', '+b;
var embed='<div class="property-details-google-map mb-60"><iframe src="https://maps.google.com/maps?&q='+encodeURIComponent(adrr)+'&output=embed" width="100%" height="100%" frameborder="0" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe></div>';
$('#calll').html(embed);
}
// var a = document.getElementById('add').value;
//if(a != ''){
thed();
//}
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'NGN',
});
</script>
</body>
</html>