Your IP : 3.15.26.184
<?php
session_start();
include("lib/connect.inc.php");
$uid = $covis->Uid();
if($uidx != 1){
header("Location:../login.php");
}
function orderedPid($pid)
{
global $db3;
$sql = $db3->query("SELECT SUM(slot) AS value_sum FROM neworder WHERE pid = '$pid' ");
$row = mysqli_fetch_assoc($sql);
$amt = $row['value_sum'];
return $amt;
}
function sq3Lx($table,$col,$val,$item){
global $db3;
$sql=$db3->query("SELECT * FROM $table WHERE $col='$val' ");
$row = mysqli_fetch_assoc($sql);
return $row[$item];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="treant/examples/tree/basic-example2.css">
<!-- Neptune CSS -->
<link rel="stylesheet" href="css/core.css">
<title>Relox Properties</title>
<link rel="shortcut icon" href="img/fav.png" />
<link rel="stylesheet" href="treant/Treant.css">
<link rel="stylesheet" href="treant/examples/tree/basic-example2.css">
<!-- Neptune CSS -->
<link rel="stylesheet" href="css/core.css">
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Vendor CSS -->
<link rel="stylesheet" href="../vendor/bootstrap4/css/bootstrap.min.css">
<link rel="stylesheet" href="../vendor/themify-icons/themify-icons.css">
<link rel="stylesheet" href="../vendor/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../vendor/animate.css/animate.min.css">
<link rel="stylesheet" href="../vendor/jscrollpane/jquery.jscrollpane.css">
<link rel="stylesheet" href="../vendor/waves/waves.min.css">
<link rel="stylesheet" href="../vendor/switchery/dist/switchery.min.css">
<link rel="stylesheet" href="../vendor/morris/morris.css">
<link rel="stylesheet" href="../vendor/jvectormap/jquery-jvectormap-2.0.3.css">
<!-- Font Awesome -->
<?php include('head.php'); ?>
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
<?php include('nav.php'); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>RELOX PROPERTIES</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item active">Relox Property Trading</li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Content Header (Page header) -->
<div id="refresh"><?php if(isset($report)){$covis->Alert(); } ?></div>
<div class="content">
<div class="container-fluid">
<div class="row">
<?php $i=0;
$sql = $db3->query("SELECT * FROM properties WHERE uri='cciproperties' ORDER BY sn DESC ");
while ($row = mysqli_fetch_assoc($sql)) { $sn = $row['sn'];
$sq = $db3->query("SELECT * FROM property_images WHERE property_sn='$sn' ");
$r = mysqli_fetch_assoc($sq);
$im = $r['imageA']??'';
$co = $row['currentprice']/$row['slot'];
$x = $row['slot']-orderedPid($sn);
?>
<div class="col-md-3 mb-2">
<img width="100%" src="https://reloxpropertiesltd.com/assets/uploads/<?= $im ?>">
<div class="p-2">
<?php echo ucwords(strtolower($row['name'])); ?><br>
<b> <span>$<?= number_format($co,2) ?> per Block</span></b><br>
Available Blocks: <?= $x.'/'.$row['slot'] ?><br>
<b>Total Sales: $<?= number_format($co*($row['slot']-$x),2) ?></b><br><br>
</div>
</div>
<?php } ?>
</div>
</div>
<?php function propertyNewPrice($pid){
global $db3;
$sql = $db3->query("SELECT * FROM properties WHERE sn='$pid'");
$row = mysqli_fetch_assoc($sql);
$op = $row['currentprice'];
$slot = $row['slot'];
$cps = $op/$slot;
return $cps;
}
$sql = $db3->query("SELECT * FROM neworder WHERE platform=1 ");
if(mysqli_num_rows($sql)>0){ ?>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<!-- PRODUCT TAB AREA START -->
<h4>Properties Block Sales</h4>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>SN</th>
<th>User</th>
<th>Property</th>
<th>Blocks</th>
<th>Cost</th>
<th>Current Value</th>
<th>Change</th>
<th>Maturity</th>
<th>Purchase Date</th>
</tr>
</thead>
<tbody>
<?php $e=0;
while($row = $sql->fetch_assoc()){ $e += 1; $pid = $row['pid'];
$cps = propertyNewPrice($pid);
$np = $cps*$row['slot'];
?>
<tr>
<td><?= $e ?></td>
<td><?= userName($row['id']) ?> (<?= userName($row['id'],'user') ?>)</td>
<td><?= sq3Lx('properties','sn',$pid,'name') ?></td>
<td><?= $row['slot'] ?>/<?= sq3Lx('properties','sn',$pid,'slot') ?></td>
<td>$<?= number_format($row['cost'],2) ?></td>
<td>$<?= number_format($np,2) ?></td>
<td><?= number_format(100*($np-$row['cost'])/$row['cost'],2) ?>%</td>
<td><?= round((time()-strtotime($row['created']))/86400) ?> Days</td>
<td><?= date('jS M Y',strtotime($row['created'])) ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
<!-- /.card-body -->
</div>
<!-- /.row (main row) -->
</div><!-- /.container-fluid -->
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php include('foot.php'); ?>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="../plugins/jquery-ui/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
$.widget.bridge('uibutton', $.ui.button)
</script>
<!-- Bootstrap 4 -->
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- ChartJS -->
<script src="../plugins/chart.js/Chart.min.js"></script>
<!-- Sparkline -->
<script src="../plugins/sparklines/sparkline.js"></script>
<!-- JQVMap -->
<script src="../plugins/jqvmap/jquery.vmap.min.js"></script>
<script src="../plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
<!-- jQuery Knob Chart -->
<script src="../plugins/jquery-knob/jquery.knob.min.js"></script>
<!-- daterangepicker -->
<script src="../plugins/moment/moment.min.js"></script>
<script src="../plugins/daterangepicker/daterangepicker.js"></script>
<!-- Tempusdominus Bootstrap 4 -->
<script src="../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Summernote -->
<script src="../plugins/summernote/summernote-bs4.min.js"></script>
<!-- overlayScrollbars -->
<script src="../plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/adminlte.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="../dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- DataTables -->
<script src="../plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script type="text/javascript" src="../vendor/chartist/chartist.min.js"></script>
<!-- Vendor JS -->
<script type="text/javascript" src="../vendor/jquery/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="../vendor/tether/js/tether.min.js"></script>
<script type="text/javascript" src="../vendor/bootstrap4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../vendor/detectmobilebrowser/detectmobilebrowser.js"></script>
<script type="text/javascript" src="../vendor/jscrollpane/jquery.mousewheel.js"></script>
<script type="text/javascript" src="../vendor/jscrollpane/mwheelIntent.js"></script>
<script type="text/javascript" src="../vendor/jscrollpane/jquery.jscrollpane.min.js"></script>
<script type="text/javascript" src="../vendor/jquery-fullscreen-plugin/jquery.fullscreen-min.js"></script>
<script type="text/javascript" src="../vendor/waves/waves.min.js"></script>
<script type="text/javascript" src="../vendor/switchery/dist/switchery.min.js"></script>
<script type="text/javascript" src="../vendor/flot/jquery.flot.min.js"></script>
<script type="text/javascript" src="../vendor/flot/jquery.flot.resize.min.js"></script>
<script type="text/javascript" src="../vendor/flot.tooltip/js/jquery.flot.tooltip.min.js"></script>
<script type="text/javascript" src="../vendor/CurvedLines/curvedLines.js"></script>
<script type="text/javascript" src="../vendor/TinyColor/tinycolor.js"></script>
<script type="text/javascript" src="../vendor/sparkline/jquery.sparkline.min.js"></script>
<script type="text/javascript" src="../vendor/raphael/raphael.min.js"></script>
<script type="text/javascript" src="../vendor/morris/morris.min.js"></script>
<script type="text/javascript" src="../vendor/jvectormap/jquery-jvectormap-2.0.3.min.js"></script>
<script type="text/javascript" src="../vendor/jvectormap/jquery-jvectormap-world-mill.js"></script>
<script type="text/javascript" src="../vendor/peity/jquery.peity.js"></script>
<script type="text/javascript" src="../vendor/chartist/chartist.min.js"></script>
<!-- Neptune JS -->
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/demo.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<!-- page script -->
<script type="text/javascript">
$(function(){
$("#username").keyup(function(){
var v = $(this).val();
$.ajax({
type: 'get',
url : 'js/username.php?val='+v
}).done(function(data){
if(data == 0){
$("#output").html('');
}
else if(data == 1){
$("#output").html('Username Does Not Exist');
}
else {
$("#output").html(data);
}
})
})
})
function next(v,u,w) {
// alert(v)
$('#nextlevel'+v).html('ACCOUNT BALANCE: $<?= number_format($covis->totalEarnings($uidx),2) ?> <hr><input type="number" min="1" max="'+w+'" name="slot" required id="sl" class="form-control" placeholder="Number of Blocks" onkeyup="npay('+u+','+w+')"> <br><button class="btn btn-danger btn-lg btn-block" type="submit" value="'+v+'" name="PlaceOrder" value="'+v+'">Proceed <span id="pp"></span></button><a href="javascript:;" onclick="back('+v+','+u+')">Cancel</a>')
}
function npay(u,w){
var m = document.getElementById('sl').value;
if(m > w){ var m = w; document.getElementById('sl').value = w; }
$('#pp').html(' to Pay $'+m*u);
}
function back(v,u){
$('#nextlevel'+v).html('<button class="btn btn-primary btn-block" type="button" onclick="next('+v+','+u+')" >Buy Property Block</button>')
}
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'NGN',
});
</script>
<input type="" onkeyup="" name="">
<script src="treant/vendor/raphael.js"></script>
<script src="treant/Treant.js"></script>
<script>
new Treant( chart_config );
</script>
</body>
</html>