Your IP : 52.15.35.129
<?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>Find Users</title>
<link href="treestyle.css" rel="stylesheet">
<!-- 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->adminAccess(); ?>
<!--/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">Search User</h1>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Dashboard</li>
</ol>
</div>
<div class="ms-auto pageheader-btn">
<div class="main-header-center2">
<form method="post">
<input class="form-control" name="search" placeholder="Search for user" type="search"> <button type="submit" class="btn"></button>
</form>
</div>
</div>
</div>
<!-- PAGE-HEADER END -->
<?php
$s = $_POST['search']??''; ?>
<div class="row">
<div class="col-12 col-sm-12">
<div class="card ">
<div class="card-header">
<h3 class="card-title mb-0">Search Results</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<form method="post"> <table class="table table-bordered text-nowrap">
<tr>
<th>Name</th>
<th>Username</th>
<th>Email</th>
<th>Phone</th>
<th>Action</th>
</tr>
<?php $sql = $db->query("SELECT * FROM user WHERE lastname LIKE '%$s%' OR firstname LIKE '%$s%' OR user LIKE '%$s%' OR email LIKE '%$s%' OR phone LIKE '%$s%' LIMIT 100");
while($row = mysqli_fetch_assoc($sql) AND isset($_POST['search'])){ $id=$row['id'] ?>
<tr>
<td><?= userName($id) ?></td>
<td><?= userName($id,'user') ?></td>
<td><?= userName($id,'email') ?></td>
<td><?= userName($id,'phone') ?></td>
<td><button type="submit" class="btn btn-primary btn-sm" name="Fid" value="<?= $id ?>">Details</button></td>
</tr>
<?php } ?>
</table></form>
</div>
</div>
</div>
</div>
</div>
<?php
if(isset($_POST['Fid']) OR isset($_SESSION['Fid'])){$_SESSION['Fid'] = $_POST['Fid']??$_SESSION['Fid'];
$uid = $_SESSION['Fid'];
$uidx = userName($uid,'sn');
$user = userName($uid,'user');
$stage = userName($uid,'stage');
$pack = userName($uid,'pack');
?>
<div class="row"> <h3><?= userName($uid) ?> [<?= userName($uid,'user') ?>]</h3>
<div class="col-lg-12 mb-2">
<a href="javascript:void(0);" class="btn btn-success btn-icon text-white activation">
<span>
<i class="fe fe-log-in"></i>
</span> Update User Data
</a>
<form method="post">
<button type="submit" class="btn btn-primary" name="userDashboard" value="<?=$uid?>">User Dashboard</button>
</form>
</div>
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-3">
<div class="card">
<div class="card-body">
<div class="card-order">
<h6 class="mb-2">Account Balance</h6>
<h2 class="text-end ">
<i class="fa fa-dollar icon-size float-start text-primary text-primary-shadow"></i><span class="text-primary">$<?= number_format($pro->wallett($uid),2) ?></span></h2>
<p class="mb-0">
Prev Balance<span class="float-end">$<?= number_format($pro->userName($uid,'balance'),2) ?></span><br>
NGN Balance<span class="float-end">NGN<?= number_format($pro->walletnaira($uid),2) ?></span><br>Fund Received<span class="float-end">$<?= number_format(abs($pro->wallett($uid,1)),2) ?></span></p>
</div>
</div>
</div>
</div><!-- COL END -->
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-3">
<div class="card ">
<div class="card-body">
<div class="card-widget">
<h6 class="mb-2">Total Withdrawal</h6>
<h2 class="text-end"><i class="mdi mdi-cube icon-size float-start text-success text-success-shadow"></i><span class="text-success">$<?= number_format(abs($pro->wallett($uid,1)),2) ?></span></h2>
<p class="mb-0">Fund Transfered<span class="float-end">$<?= number_format(abs($pro->wallett($uid,2)),2) ?></span></p>
</div>
</div>
</div>
</div><!-- COL END -->
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-3">
<div class="card">
<div class="card-body">
<div class="card-widget">
<h6 class="mb-2">Total Earned</h6>
<h2 class="text-end"><i class="icon-size mdi mdi-poll-box float-start text-warning text-warning-shadow"></i><span class="text-warning">$<?= number_format($pro->walletRange($uid,11,17)+$pro->wallett($uid,22),2) ?></span></h2>
<p class="mb-0">Matrix Bonus<span class="float-end">$<?= number_format($pro->wallett($uid,12),2) ?></span></p>
</div>
</div>
</div>
</div><!-- COL END -->
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-3">
<div class="card ">
<div class="card-body">
<div class="card-widget">
<h6 class="mb-2">Referral Bonus</h6>
<h2 class="text-end"><i class="fa fa-cart-plus icon-size float-start text-danger text-danger-shadow"></i><span class="text-danger">$<?= number_format(abs($pro->wallett($uid,11)),2) ?></span></h2>
<p class="mb-0">Automated Savings<span class="float-end">$<?= number_format(abs($pro->wallett($uid,6)),2) ?></span></p>
</div>
</div>
</div>
</div><!-- COL END -->
<!-- <div class="col-sm-12 col-md-6 col-lg-6 col-xl-3">
<div class="card ">
<div class="card-body">
<div class="card-widget">
<h6 class="mb-2">Referral Bonus</h6>
<h2 class="text-end"><i class="fa fa-cart-plus icon-size float-start text-danger text-danger-shadow"></i><span class="text-danger">$<?= number_format(abs($pro->wallet($uid,11)),2) ?></span></h2>
<p class="mb-0">Automated Savings<span class="float-end">$<?= number_format(abs($pro->wallet($uid,6)),2) ?></span></p>
</div>
</div>
</div>
</div> COL END -->
</div>
<!-- ROW END -->
<!-- ROW -->
<?php $sql = $db->query("SELECT * FROM news ORDER BY sn DESC LIMIT 1 ");
$row = mysqli_fetch_assoc($sql); ?>
<div class="row">
<!-- COL END -->
<div class="col-lg-3">
<div class="card custom-card ">
<div class="card-header">
<h3 class="card-title">Property Sales Earnings</h3>
</div>
<div class="card-body pt-0 ps-0 pe-0">
<div class="row sales-product-infomation pb-0 mb-0 mx-auto wd-100p mt-3">
<div class="col-md-6 col justify-content-center text-center">
<h3 class="mb-1 fw-bold">$<?= number_format($pro->wallett($uid,16),2) ?></h3>
<div class="d-flex justify-content-center ">
<p class="text-muted mb-0">₦<?= number_format($pro->walletNaira($uid,16)) ?><br>Commissions</p>
</div>
</div>
<div class="col-md-6 col text-center float-end">
<h3 class="mb-1 fw-bold"><?= number_format($pro->walletPointAll($uid),2) ?></h3>
<div class="d-flex justify-content-center ">
<p class="text-muted mb-0">Incentive <br>Points</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card custom-card ">
<div class="card-header">
<h3 class="card-title">Team Strength</h3>
</div>
<div class="card-body pt-0 ps-0 pe-0">
<div class="row sales-product-infomation pb-0 mb-0 mx-auto wd-100p mt-3">
<div class="col-md-6 col justify-content-center text-center">
<h3 class="mb-1 fw-bold"><?= sqL1('user','sponsor',$user) ?></h3>
<div class="d-flex justify-content-center ">
<p class="text-muted mb-0">Referrals</p>
</div>
</div>
<div class="col-md-6 col text-center float-end">
<h3 class="mb-1 fw-bold"><?= $pro->allTeam($uidx) ?></h3>
<div class="d-flex justify-content-center ">
<p class="text-muted mb-0">Total Team</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card custom-card ">
<div class="card-header">
<h3 class="card-title">Referral Link</h3>
</div>
<div class="card-body table-responsive">
<table><tr><td>finationglobal.com/r/<?= $user ?></td></tr></table>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card custom-card ">
<div class="card-header">
<h3 class="card-title">Leadership Position</h3>
</div>
<div class="card-body text-muted">
<?php if($pack==0){ ?>
<a href="javascript:void(0);" class="btn btn-success btn-icon text-white">
<span>
<i class="fe fe-log-in"></i>
</span> Activate Account
</a>
<?php }else{ ?>
<h3><img class="pr-3" src="uploads/<?= $pro->stageHead1($stage) ?>" width="30"> <?= strtoupper($pro->stageTitle($stage)) ?></h3>
<?php } ?>
</div>
</div>
</div>
<!-- COL END -->
</div>
<!-- ROW-1 END -->
<!-- ROW-5 -->
<div class="row">
<div class="col-12 col-sm-12">
<div class="card p-3">
<h4>Total Structure Team </h4>
<?php $legs = $pro->userLegs($uidx); $l = $legs[0]??0; $r= $legs[1]??0; ?>
<hr>
<table class="table table-striped">
<tr><th>Team Plan</th><th>Left</th><th>Right</th><th>Total</th></tr>
<tr><th>Regular</th><th><?php $a = $pro->totalPackTeamLeg($l,5); echo $a; ?></th><th><?php $b = $pro->totalPackTeamLeg($r,5); echo $b ?></th><th><?=($a+$b)?></th></tr>
<tr><th>Pro</th><th><?php $a = $pro->totalPackTeamLeg($l,25); echo $a; ?></th><th><?php $b = $pro->totalPackTeamLeg($r,25); echo $b; ?></th><th><?=($a+$b)?></th></tr>
<tr><th>VIP</th><th><?php $a = $pro->totalPackTeamLeg($l,50); echo $a; ?></th><th><?php $b = $pro->totalPackTeamLeg($r,50); echo $b; ?></th><th><?=($a+$b)?></th></tr>
</table>
</div>
</div>
<div class="col-12 col-sm-12">
<div class="card">
<div class="card-title">
<h5 class="m-4">Regular Matrix Geneology
</h5>
<hr/></div>
<?php
if(isset($_POST['getStage'])){
$_SESSION['stage'] = $_POST['getStage'];
}
if(isset($_GET['user']) AND $_GET['user']!=0){
if(userName2($user,'sn')<userName2($_GET['user'],'sn')){
$user=$_GET['user'];
$uid = sqLx('user','user',$user,'id');
$uidx = userName($uid,'sn');
}
}
$stage = userName($uid,'stage');
$yy = userName($uid,'a1');
$y = userNameSn($yy,'user');
?>
<div class="card-body mt-0 pt-0">
<form method="post">
<?php $stag = $_SESSION['stage']??$stage;
$i=1; while($i<=$stage){ $e=$i++; $col = $stag==$e ? 'primary' : 'white'; ?><button class="btn btn-<?= $col ?>" name="getStage" value="<?= $e ?>">Stage <?= $e ?></button> <?php } ?>
</form><div class="table-responsive mt-3">
<center>
<figure>
<?php $stage = $_SESSION['stage']??$stage;
if($stage==1){ ?>
<ul class="tree">
<li><span class="btn"><a href="?user=<?=$y?>"><img src="uploads/<?= $pro->stageHead1($stage) ?>"><br><?= $user ?></a></span>
<ul>
<?php $emp = [];
$sql = $db->query("SELECT * FROM user WHERE a1='$uidx' ");
$n = mysqli_num_rows($sql);
while($row=mysqli_fetch_assoc($sql)){ $key = $row['sn'];
$legs = $pro->stageTeamHeadsGen1($key,$stage,5); ?>
<li><?= $pro->stageHead($legs,0,1) ?>
<ul>
<li><?= $pro->stageHead($legs,1,1) ?></li>
<li><?= $pro->stageHead($legs,2,1) ?></li>
</ul>
</li>
<?php } ?>
<?php if($n==0){ ?>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<?php } ?>
<?php if($n==1){ ?>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<?php } ?>
</ul>
</li>
</ul>
<?php }else{
?>
<ul class="tree">
<li><span class="btn"><a href="?user=<?=$y?>"><img src="uploads/<?= $pro->stageHead1($stage) ?>"><br><?= $user ?></a></span>
<ul>
<?php $sql = $db->query("SELECT * FROM user WHERE a1='$uidx' ");
while($row=mysqli_fetch_assoc($sql)){ $key = $row['sn'];
$legs = $pro->stageTeamHeadsGen($key,$stage,5); $n = count($legs);
?>
<li><?= $pro->stageHead($legs,0,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,1,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,3,$stage) ?></li>
<li><?= $pro->stageHead($legs,4,$stage) ?></li>
</ul>
</li>
<li><?= $pro->stageHead($legs,2,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,5,$stage) ?></li>
<li><?= $pro->stageHead($legs,6,$stage) ?></li>
</ul>
</li>
</ul>
</li>
<?php } ?>
</ul>
</li>
</ul>
<?php } ?>
</figure>
</center>
</div>
</div><!--end row-->
</div>
</div>
<?php
if(isset($_POST['getStage'])){
$_SESSION['stage'] = $_POST['getStage'];
}
if(isset($_GET['user']) AND $_GET['user']!=0){
if(userName2($user,'sn')<userName2($_GET['user'],'sn')){
$user=$_GET['user'];
$uid = sqLx('user','user',$user,'id');
$uidx = userName($uid,'sn');
}
}
$stage = userName($uid,'stage25');
$yy = userName($uid,'a1');
$y = userNameSn($yy,'user');
$st = $_SESSION['stage']??$stage;
if($stage>=$st){
?>
<div class="card">
<div class="card-title">
<h5 class="m-4">PRO Matrix Geneology
<!--<div style="float:right;">
<form method="get">Search User Structure:
<input type="text" name="user" placeholder="Username" >
</form>
</div>-->
</h5>
<hr/> </div>
<div class="card-body mt-0 pt-0">
<form method="post">
<?php $stag = $_SESSION['stage']??$stage;
$i=1; while($i<=$stage){ $e=$i++; $col = $stag==$e ? 'primary' : 'white'; ?><button class="btn btn-<?= $col ?>" name="getStage" value="<?= $e ?>">Stage <?= $e ?></button> <?php } ?>
</form><div class="table-responsive mt-3">
<center>
<figure>
<?php $stage = $_SESSION['stage']??$stage;
if($stage==1){ ?>
<ul class="tree">
<li><span class="btn"><a href="?user=<?=$y?>"><img src="uploads/<?= $pro->stageHead1($stage) ?>"><br><?= $user ?></a></span>
<ul>
<?php $emp = [];
$sql = $db->query("SELECT * FROM user WHERE a1='$uidx' ");
$n = mysqli_num_rows($sql);
while($row=mysqli_fetch_assoc($sql)){ $key = $row['sn'];
$legs = $pro->stageTeamHeadsGen1($key,$stage,25); ?>
<li><?= $pro->stageHead($legs,0,1) ?>
<ul>
<li><?= $pro->stageHead($legs,1,1) ?></li>
<li><?= $pro->stageHead($legs,2,1) ?></li>
</ul>
</li>
<?php } ?>
<?php if($n==0){ ?>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<?php } ?>
<?php if($n==1){ ?>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<?php } ?>
</ul>
</li>
</ul>
<?php }else{
?>
<ul class="tree">
<li><span class="btn"><a href="?user=<?=$y?>"><img src="uploads/<?= $pro->stageHead1($stage) ?>"><br><?= $user ?></a></span>
<ul>
<?php $sql = $db->query("SELECT * FROM user WHERE a1='$uidx' ");
while($row=mysqli_fetch_assoc($sql)){ $key = $row['sn'];
$legs = $pro->stageTeamHeadsGen($key,$stage,25); $n = count($legs);
?>
<li><?= $pro->stageHead($legs,0,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,1,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,3,$stage) ?></li>
<li><?= $pro->stageHead($legs,4,$stage) ?></li>
</ul>
</li>
<li><?= $pro->stageHead($legs,2,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,5,$stage) ?></li>
<li><?= $pro->stageHead($legs,6,$stage) ?></li>
</ul>
</li>
</ul>
</li>
<?php } ?>
</ul>
</li>
</ul>
<?php } ?>
</figure>
</center>
</div>
</div>
</div><!--end row-->
<?php
}
?>
<?php
if(isset($_POST['getStage'])){
$_SESSION['stage'] = $_POST['getStage'];
}
if(isset($_GET['user']) AND $_GET['user']!=0){
if(userName2($user,'sn')<userName2($_GET['user'],'sn')){
$user=$_GET['user'];
$uid = sqLx('user','user',$user,'id');
$uidx = userName($uid,'sn');
}
}
$stage = userName($uid,'stage50');
$yy = userName($uid,'a1');
$y = userNameSn($yy,'user');
$st = $_SESSION['stage']??$stage;
if($stage>=$st){
?>
<div class="card">
<div class="card-title">
<h5 class="m-4">VIP Matrix Geneology
<!--<div style="float:right;">
<form method="get">Search User Structure:
<input type="text" name="user" placeholder="Username" >
</form>
</div>-->
</h5>
<hr/> </div>
<div class="card-body mt-0 pt-0">
<form method="post">
<?php $stag = $_SESSION['stage']??$stage;
$i=1; while($i<=$stage){ $e=$i++; $col = $stag==$e ? 'primary' : 'white'; ?><button class="btn btn-<?= $col ?>" name="getStage" value="<?= $e ?>">Stage <?= $e ?></button> <?php } ?>
</form><div class="table-responsive mt-3">
<center>
<figure>
<?php $stage = $_SESSION['stage']??$stage;
if($stage==1){ ?>
<ul class="tree">
<li><span class="btn"><a href="?user=<?=$y?>"><img src="uploads/<?= $pro->stageHead1($stage) ?>"><br><?= $user ?></a></span>
<ul>
<?php $emp = [];
$sql = $db->query("SELECT * FROM user WHERE a1='$uidx' ");
$n = mysqli_num_rows($sql);
while($row=mysqli_fetch_assoc($sql)){ $key = $row['sn'];
$legs = $pro->stageTeamHeadsGen1($key,$stage,50); ?>
<li><?= $pro->stageHead($legs,0,1) ?>
<ul>
<li><?= $pro->stageHead($legs,1,1) ?></li>
<li><?= $pro->stageHead($legs,2,1) ?></li>
</ul>
</li>
<?php } ?>
<?php if($n==0){ ?>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<?php } ?>
<?php if($n==1){ ?>
<li><?= $pro->stageHead($emp,0,1) ?>
<ul>
<li><?= $pro->stageHead($emp,1,1) ?></li>
<li><?= $pro->stageHead($emp,2,1) ?></li>
</ul>
</li>
<?php } ?>
</ul>
</li>
</ul>
<?php }else{
?>
<ul class="tree">
<li><span class="btn"><a href="?user=<?=$y?>"><img src="uploads/<?= $pro->stageHead1($stage) ?>"><br><?= $user ?></a></span>
<ul>
<?php $sql = $db->query("SELECT * FROM user WHERE a1='$uidx' ");
while($row=mysqli_fetch_assoc($sql)){ $key = $row['sn'];
$legs = $pro->stageTeamHeadsGen($key,$stage,50); $n = count($legs);
?>
<li><?= $pro->stageHead($legs,0,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,1,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,3,$stage) ?></li>
<li><?= $pro->stageHead($legs,4,$stage) ?></li>
</ul>
</li>
<li><?= $pro->stageHead($legs,2,$stage) ?>
<ul>
<li><?= $pro->stageHead($legs,5,$stage) ?></li>
<li><?= $pro->stageHead($legs,6,$stage) ?></li>
</ul>
</li>
</ul>
</li>
<?php } ?>
</ul>
</li>
</ul>
<?php } ?>
</figure>
</center>
</div>
</div><!--end row-->
<?php
}
?>
</div>
<div class="card">
<div class="card-header">
<h5>Vertical Geneology</h5></div>
<div class="card-body">
<table><tr class="text-center">
<?php
$i=1;
while($i<10 && $yy>0){ $e=$i++;
$uidm = sqLx('user','user',$user,'id');
$stage = userName($uidm,'stage');
$yy = userName($uidm,'a1');
?>
<td><a href="?user=<?=$user?>"><img src="uploads/<?= $pro->stageHead1($stage) ?>"><br><?= $user ?></a></td><td>---</td>
<?php
$a = sqLx('user','user',$user,'a1');
$user = userNameSn($a,'user');
}
?>
</tr></table>
</center>
</div>
</div><!--end row-->
<div class="card ">
<div class="card-header">
<h3 class="card-title mb-0">Recent Transactions (USD): <?=userName($uid)?> [<?=userName($uid,'user')?>]</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="data-table" class="table table-bordered text-nowrap mb-0">
<thead class="border-top">
<tr>
<th class="bg-transparent border-bottom-0 w-5">S/n</th>
<th class="bg-transparent border-bottom-0">Amount</th>
<th class="bg-transparent border-bottom-0">Date</th>
<th class="bg-transparent border-bottom-0">Remark</th>
<th class="bg-transparent border-bottom-0">Status</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$sql = $db->query("SELECT * FROM wallet WHERE id='$uid' ORDER BY sn DESC LIMIT 200 ");
while($row = $sql->fetch_assoc()) { $e = $i++;
?>
<tr class="border-bottom">
<td class="text-muted fs-15 fw-semibold text-center"><?= $e ?>.</td>
<td class="text-muted fs-15 fw-semibold">$<?= number_format(abs($row['cos']),2) ?>
</td>
<td><?= substr($row['created'], 0,10) ?> </td>
<td><?= $row['remark'] ?> (<?= userName($row['opt'],'user') ?>)</td>
<td class="text-success fs-15 fw-semibold"><?= $pro->walletStatus($row['status']) ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="card ">
<div class="card-header">
<h3 class="card-title mb-0">Recent Transactions (NGN): <?=userName($uid)?> [<?=userName($uid,'user')?>]</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="data-table" class="table table-bordered text-nowrap mb-0">
<thead class="border-top">
<tr>
<th class="bg-transparent border-bottom-0 w-5">S/n</th>
<th class="bg-transparent border-bottom-0">Amount</th>
<th class="bg-transparent border-bottom-0">Date</th>
<th class="bg-transparent border-bottom-0">Remark</th>
<th class="bg-transparent border-bottom-0">Status</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$sql = $db->query("SELECT * FROM walletnaira WHERE id='$uid' ORDER BY sn DESC LIMIT 200 ");
while($row = $sql->fetch_assoc()) { $e = $i++;
?>
<tr class="border-bottom">
<td class="text-muted fs-15 fw-semibold text-center"><?= $e ?>.</td>
<td class="text-muted fs-15 fw-semibold">NGN<?= number_format(abs($row['cos']),2) ?>
</td>
<td><?= substr($row['created'], 0,10) ?> </td>
<td><?= $row['remark'] ?> (<?= userName($row['opt'],'user') ?>)</td>
<td class="text-success fs-15 fw-semibold"><?= $pro->walletStatus($row['status']) ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="card ">
<div class="card-header">
<h3 class="card-title mb-0">Referrals</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<form method="post">
<table id="data-table" class="table table-bordered text-nowrap mb-0">
<thead class="border-top">
<tr>
<th class="bg-transparent border-bottom-0 w-5">S/n</th>
<th class="bg-transparent border-bottom-0">Name</th>
<th class="bg-transparent border-bottom-0">Username</th>
<th class="bg-transparent border-bottom-0">Phone No</th>
<th class="bg-transparent border-bottom-0">Action</th>
</tr>
</thead>
<tbody>
<?php $userx = userName($uid,'user');
$i=1;
$sql = $db->query("SELECT * FROM user WHERE sponsor='$userx' ORDER BY sn ");
while($row = $sql->fetch_assoc()) { $id=$row['id']; $e = $i++;
?>
<tr class="border-bottom">
<td class="text-muted fs-15 fw-semibold text-center"><?= $e ?>.</td>
<td class="text-muted fs-15 fw-semibold"><?= userName($id) ?>
</td>
<td><?= userName($id,'user') ?> <?= $id ?></td>
<td><?= userName($id,'phone') ?></td>
<td><button type="submit" class="btn btn-primary btn-sm" name="Fid" value="<?= $id ?>">Details</button></td>
</tr>
<?php } ?>
</tbody>
</table></form>
</div>
</div>
</div>
<div class="card ">
<div class="card-header">
<h3 class="card-title mb-0">Team Property Transaction (USD)</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<form method="post">
<table id="data-table" class="table table-bordered text-nowrap mb-0">
<thead class="border-top">
<tr>
<th class="bg-transparent border-bottom-0 w-5">S/n</th>
<th class="bg-transparent border-bottom-0 w-5">Date</th>
<th class="bg-transparent border-bottom-0">Name</th>
<th class="bg-transparent border-bottom-0">Username</th>
<th class="bg-transparent border-bottom-0">Transaction Remark</th>
<th class="bg-transparent border-bottom-0">Amount</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$sql = $db->query("SELECT * FROM user WHERE sponsor='$userx' ORDER BY sn ");
while($row = $sql->fetch_assoc()) { $id=$row['id']; //$e = $i++;
?>
<?php
$i=1;
$s = $db->query("SELECT * FROM wallet WHERE id='$id' AND type BETWEEN 7 AND 9 ORDER BY sn DESC LIMIT 200 ");
while($r = $s->fetch_assoc()) { $e = $i++;
?>
<tr class="border-bottom">
<td class="text-muted fs-15 fw-semibold text-center"><?= $e ?>.</td>
<td><?= substr($r['created'], 0,10) ?> </td>
<td><?= userName($id) ?> </td>
<td><?= userName($id,'user') ?> </td>
<td><?= $r['remark'] ?> (<?= userName($r['rep'],'user') ?>)</td>
<td class="text-muted fs-15 fw-semibold">$<?= number_format(abs($r['cos']),2) ?>
</td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table></form>
</div>
</div>
</div>
<div class="card ">
<div class="card-header">
<h3 class="card-title mb-0">Team Property Transactions (NGN)</h3>
</div>
<div class="card-body">
<div class="table-responsive">
<form method="post">
<table id="data-table" class="table table-bordered text-nowrap mb-0">
<thead class="border-top">
<tr>
<th class="bg-transparent border-bottom-0 w-5">S/n</th>
<th class="bg-transparent border-bottom-0 w-5">Date</th>
<th class="bg-transparent border-bottom-0">Name</th>
<th class="bg-transparent border-bottom-0">Username</th>
<th class="bg-transparent border-bottom-0">Transaction Remark</th>
<th class="bg-transparent border-bottom-0">Amount</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$sql = $db->query("SELECT * FROM user WHERE sponsor='$userx' ORDER BY sn ");
while($row = $sql->fetch_assoc()) { $id=$row['id']; //$e = $i++;
?>
<?php
$i=1;
$s = $db->query("SELECT * FROM walletnaira WHERE id='$id' AND type BETWEEN 7 AND 9 ORDER BY sn DESC LIMIT 200 ");
while($r = $s->fetch_assoc()) { $e = $i++;
$bonus = $r['cos']*5*0.01;
// if($r['type']==7){
// $pro->processWalletNaira('f27wjr5yn4',$bonus,16,'','Contribute to own Sales Commission',$id);
// } else{
// $pro->processWalletNaira('f27wjr5yn4',$bonus,16,'','Group Investment Sales Commission',$id);
// }
?>
<tr class="border-bottom">
<td class="text-muted fs-15 fw-semibold text-center"><?= $e ?>.</td>
<td><?= substr($r['created'], 0,10) ?> </td>
<td><?= userName($id) ?> </td>
<td><?= userName($id,'user') ?> </td>
<td><?= $r['remark'] ?> (<?= userName($r['rep'],'user') ?>)</td>
<td class="text-muted fs-15 fw-semibold">NGN<?= number_format(abs($r['cos']),2) ?>
</td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table></form>
</div>
</div>
</div>
</div>
<!-- COL END -->
</div>
<!-- ROW-5 END -->
<?php } ?>
</div>
<!-- CONTAINER END -->
</div>
</div>
<!--app-content end-->
</div>
<!-- FOOTER -->
<?php include('footer.php'); ?>
<!-- FOOTER END -->
</div>
<form method="post" >
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Update User Information</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center">
<input type="text" class="form-control" name="firstname" placeholder="Firstname" value="<?= userName($uid,'firstname') ?>"><br>
<input type="text" class="form-control" name="lastname" placeholder="Lastname" value="<?= userName($uid,'lastname') ?>"><br>
<input type="text" class="form-control" name="phone" placeholder="Phone Number" value="<?= userName($uid,'phone') ?>"><br>
<input type="text" class="form-control" name="user" placeholder="Username" value="<?= userName($uid,'user') ?>"><br>
<input type="text" class="form-control" name="email" placeholder="Email" value="<?= userName($uid,'email') ?>"><br>
</div>
<div class="modal-footer">
<button type="submit" value="<?= $uid ?>" name="UpdateUser2" class="fund btn btn-primary">Update User Data</button>
</div>
</div>
</div>
</div>
</form>
<!-- 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 type="text/javascript">
$(function() {
$('.activation').on('click', function() {
modal = $('#exampleModal');
modal.modal('show');
//alert(ref)
})
})
</script>
</body>
</html>