Your IP : 3.17.175.191
<?php
session_start(); ob_start();
?>
<!doctype html>
<html lang="en" dir="ltr">
<head>
<!-- META DATA -->
<meta charset="UTF-8">
<meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=0'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Fination Global Services">
<meta name="author" content="Fination Global Services">
<meta name="keywords" content="">
<!-- FAVICON -->
<link rel="shortcut icon" type="image/x-icon" href="../assets/images/brand/favicon.ico" />
<!-- TITLE -->
<title>Group Properties</title>
<!-- BOOTSTRAP CSS -->
<link id="style" href="../assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<!-- STYLE CSS -->
<link href="../assets/css/style.css" rel="stylesheet" />
<link href="../assets/css/plugins.css" rel="stylesheet" />
<!--- FONT-ICONS CSS -->
<link href="../assets/css/icons.css" rel="stylesheet" />
</head>
<body class="app sidebar-mini ltr light-mode">
<!-- GLOBAL-LOADER
<div id="global-loader">
<img src="../assets/images/loader.svg" class="loader-img" alt="Loader">
</div>-->
<!-- /GLOBAL-LOADER -->
<!-- PAGE -->
<div class="page">
<div class="page-main">
<!-- app-Header -->
<?php include('header.php');
//$pro->DeductAutomated(); ?>
<!--/APP-SIDEBAR-->
<!--app-content open-->
<div class="main-content app-content mt-0">
<div class="side-app">
<!-- CONTAINER -->
<div class="main-container container-fluid">
<!-- PAGE-HEADER -->
<div class="page-header">
<div>
<h1 class="page-title">Group Investment Properties</h1>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Group Investment Properties</li>
</ol>
</div>
<?php include('pagebtn.php') ?>
</div>
<!-- PAGE-HEADER END -->
<div class="row">
<?php
$i=1;
$sql = $db->query("SELECT * FROM ginvest WHERE type=2 AND status=1 ORDER BY sn DESC LIMIT 200 ");
while($row = $sql->fetch_assoc()) { $e = $i++;
?>
<div class="col-lg-4">
<div class="card">
<div class="card-body p-0">
<img src="uploads/<?= $row['photo'] ?>" width="100%">
<div class="p-3">
<?php echo $row['title']; ?>
<p>
<span style="float:left; font-weight: bolder;"> <big>$<?php echo number_format($row['amount'],2) ?></big></span>
<span style="float:right"> <big>$<?php echo number_format($row['amount']/$row['slot'],2) ?> Per Slot</big></span></p>
<p style="float:left"><strong><?= $row['slot']-$row['sold'] ?>/<?= $row['slot'] ?> Slots Available</strong></p><br><br>
<p> <form method="post" >
<input type="hidden" name="ref" value="<?= $row['ref'] ?>">
<div id="buysl<?= $e ?>">
<!-- <button type="button" class="btn btn-primary btn-lg btn-block" onclick="buySlot('buysl'+<?= $e ?>)">Buy Slot</button> -->
<a href="propertyinfo?ref=<?= $row['ref'] ?>" class="btn btn-primary btn-lg btn-block" >More Information</a>
</div>
</form></p>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
<div class="card">
<div class="card-body">
<div class="card-title">
<h5 class="mb-0">My Group Investments</h5>
</div>
<hr/>
<div class="table-responsive mt-3">
<table id="example" class="table table-bordered table-striped">
<thead>
<tr>
<th>S/N</th>
<th>Date</th>
<th>Property</th>
<th>Cost Price</th>
<th>New Price</th>
<th>Slots</th>
<th>Listed</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
if(isset($_POST['ListPro'])){extract($_POST); $db->query("UPDATE wallet SET sell='$qty' WHERE sn='$ListPro' "); }
if(isset($_GET['unlist'])){extract($_GET); $db->query("UPDATE wallet SET sell=0 WHERE sn='$unlist' "); header('location: ?');}
$sql = $db->query("SELECT * FROM wallet WHERE id='$uid' AND type=9 AND stage>0 ORDER BY sn DESC LIMIT 200 ");
while($row = $sql->fetch_assoc()) { $e = $i++;
$list = $row['sell']==0 ? '<form method="post"><input type="number" name="qty" min="1" max="'.$row['stage'].'" value="'.$row['stage'].'" placeholder="Qty" class="form-control"><button class="btn btn-primary btn-sm" value="'.$row['sn'].'" name="ListPro">List</button></form>' : '<a class="btn btn-danger btn-sm" href="?unlist='.$row['sn'].'">Unlist</a>'
?>
<tr>
<td><?php echo $e; ?></td>
<td><?php echo date('d/m/y', strtotime($row['created'])); ?></td>
<td><?php echo sqLx('ginvest','ref',$row['opt'],'title'); ?></td>
<td>$<?php echo number_format(abs($row['cos']),2) ?></td>
<td>$<?php echo number_format($row['stage']*sqLx('ginvest','ref',$row['opt'],'amount')/sqLx('ginvest','ref',$row['opt'],'slot'),2) ?></td>
<td><?php echo $row['stage']; ?></td>
<td><?php echo $row['sell']; ?></td>
<td><?=$list?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div><!--end row-->
</div>
</div><!--end row-->
</div>
<!-- ROW -->
</div>
<!--app-content end-->
</div>
<!-- FOOTER -->
<?php include('footer.php'); ?>
<!-- FOOTER END -->
</div>
<!-- BACK-TO-TOP -->
<a href="#top" id="back-to-top"><i class="fa fa-angle-up"></i></a>
<!-- JQUERY JS -->
<script src="../assets/js/jquery.min.js"></script>
<!-- BOOTSTRAP JS -->
<script src="../assets/plugins/bootstrap/js/popper.min.js"></script>
<script src="../assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<!-- SPARKLINE JS-->
<script src="../assets/js/jquery.sparkline.min.js"></script>
<!-- CHART-CIRCLE JS-->
<script src="../assets/js/circle-progress.min.js"></script>
<!-- CHARTJS CHART JS-->
<script src="../assets/plugins/chart/Chart.bundle.js"></script>
<script src="../assets/plugins/chart/utils.js"></script>
<!-- PIETY CHART JS-->
<script src="../assets/plugins/peitychart/jquery.peity.min.js"></script>
<script src="../assets/plugins/peitychart/peitychart.init.js"></script>
<!-- INTERNAL SELECT2 JS -->
<script src="../assets/plugins/select2/select2.full.min.js"></script>
<!-- INTERNAL Data tables js-->
<script src="../assets/plugins/datatable/js/jquery.dataTables.min.js"></script>
<script src="../assets/plugins/datatable/js/dataTables.bootstrap5.js"></script>
<script src="../assets/plugins/datatable/dataTables.responsive.min.js"></script>
<!-- ECHART JS-->
<script src="../assets/plugins/echarts/echarts.js"></script>
<!-- SIDE-MENU JS-->
<script src="../assets/plugins/sidemenu/sidemenu.js"></script>
<!-- Sticky js -->
<script src="../assets/js/sticky.js"></script>
<!-- SIDEBAR JS -->
<script src="../assets/plugins/sidebar/sidebar.js"></script>
<!-- Perfect SCROLLBAR JS-->
<script src="../assets/plugins/p-scroll/perfect-scrollbar.js"></script>
<script src="../assets/plugins/p-scroll/pscroll.js"></script>
<script src="../assets/plugins/p-scroll/pscroll-1.js"></script>
<!-- APEXCHART JS -->
<script src="../assets/js/apexcharts.js"></script>
<!-- INDEX JS -->
<script src="../assets/js/index1.js"></script>
<!-- Color Theme js -->
<script src="../assets/js/themeColors.js"></script>
<!-- swither styles js -->
<script src="../assets/js/swither-styles.js"></script>
<!-- CUSTOM JS -->
<script src="../assets/js/custom.js"></script>
<script>
function buySlot(v){
var btn = '<input type="number" class="form-control" name="slot" placeholder="Number of Slots"><br><button type="submit" class="btn btn-danger btn-lg btn-block" name="BuyProperty2">Buy Slot </button>'
$('#'+v).html(btn);
}
function getSav(){
var v = document.getElementsByClassName('asav');
var a = v[1].value;
var b = v[2].value;
var c = v[3].value;
if(a=='' || b=='' || c==''){return; }
var d = b/c;
$('#savRes').html('USD'+com(d)+' Per Slots');
}
function getSav2(){
var v = document.getElementsByClassName('bsav');
var a = v[1].value;
var b = v[2].value;
var c = v[3].value;
if(a=='' || b=='' || c==''){return; }
var d = b/c;
$('#savRes2').html('USD'+com(d)+' Per Slots');
}
function com(v){
return (v).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
}
</script>
</body>
</html>