Your IP : 3.148.115.187
<?php
session_start();
include("lib/connect.inc.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Top Ten Champions</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 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 -->
<!-- Content Header (Page header) -->
<div class="card">
<div class="card-header">
<!-- 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> TOP TEN CHAMPIONS</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">Top Champions</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">
<div class="col-md-12">
<div class="card ">
<div class="card-header text-white bg-dark">
<h5>Top Champions</h5>
</div>
<div class="card-body">
<table class="table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Username</th>
<th>Country</th>
<th>Top Score</th>
<th>Position</th>
</tr>
</thead>
<tbody>
<?php //Criteria 1. Must have at least 3 referal. 2. Highest Stage. 3. Highest level. 4. Highest referral 5. Exclude covisadmin
$score='';
$level = $db->query("SELECT * FROM user WHERE level>6 AND sp>2 AND sn>1 ORDER BY level DESC, sn ASC LIMIT 40");
while($rowl = $level->fetch_assoc()){
$lv = $rowl['level'];
$team = $covis->userStageTeam($rowl['id']);
$point = ($team<10) ? '0'.$team : $team;
$sp = ($rowl['sp']<10) ? '0'.$rowl['sp'] : $rowl['sp'];
$sp = ($sp>99) ? 99 : $sp;
$score .= $lv.$point.$sp.'.'.$rowl['sn'].',';
}
$sc = explode(',', $score); rsort($sc);
$i = 0; while($i<10){ $e=$i++; $key = explode('.',$sc[$e]); $id = $covis->keyToId($key[1]);
?>
<tr>
<td><?php echo userName($id) ?></td>
<td><?php echo userName($id,'user') ?></td>
<td><?php echo userName($id,'state') ?>, <?php echo str_replace(',', '', userName($id,'country')) ?> </td>
<td><?php echo number_format($key[0]) ?></td>
<td><?php echo $e+1 ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<i>Note: TOP TEN Champions are members in the highest stage, highest stage levels and highest referrals</i>
<!-- <?php if($uidx==1){ ?>
<form method="post">
<table class="table table-bordered">
<thead>
<tr><td>SEARCH MEMBER</td><td><input type="text" name="user" placeholder="Username" width="5" class="form-control"></td> <td>
<input type="submit" name="SearchUserG" class="btn btn-warning" value="Check Members Score"> </td></tr></thead></table>
</form>
<?php
if(isset($_POST['user'])){
$user = $_POST['user'] ;
$userid = $covis->userName3($user);
$level = $db->query("SELECT * FROM user WHERE id='$userid' ");
$rowl = $level->fetch_assoc();
$stage = $covis->stageCalc($rowl['sn']);
$point = $covis->stageTeam($rowl['id'],$stage);
$point = ($point<10) ? '0'.$point : $point;
$sp = ($rowl['sp']<10) ? '0'.$rowl['sp'] : $rowl['sp'];
$sp = ($sp>99) ? 99 : $sp;
$score = $rowl['level'].$point.$sp;
$stat = '<table class="table table-bordered">
<tr><th colspan="2">MEMBER STATISTICS</th></tr>';
$stat .= '<tr><td>Name</th><td>'.userName($userid).'</th></tr>';
$stat .= '<tr><td>Username</th><td> '.$user.'</th></tr>';
$stat .= '<tr><td>Stage</th><td> '.$covis->stageCalc($rowl['sn']).'</th></tr>';
$stat .= '<tr><td>Stage Level</th><td> '.$covis->stageLevel($rowl['sn']).'</th></tr>';
$stat .= '<tr><td>Stage Team</th><td> '.number_format($point).'</th></tr>';
$stat .= '<tr><td>Direct Referral</th><td> '.$rowl['sp'].'</th></tr>';
$stat .= '<tr><td>Top Score</th><td> '.number_format($score*1.001).'</th></tr>';
$stat .= '<tr><td>Address</th><td> '.$rowl['city'].', '.$rowl['state'].', '.$rowl['country'].'</th></tr>';
$stat .= '<tr><td>E-mial</th><td> '.$rowl['email'].'</th></tr>';
$stat .= '<tr><td>Account Number</th><td> '.$rowl['bank'].', '.$rowl['accountno'].'</th></tr>';
$stat .= '</table>';
echo mysqli_num_rows($level)==1 ? $stat : '<h2>Username not found</h2>';
?>
<?php } } ?> --->
</div>
</div>
</div>
</div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
<!-- right col -->
</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>
<!-- page script -->
<script>
$(function () {
$("#example1").DataTable({
"responsive": true,
"autoWidth": false,
});
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false,
"responsive": true,
});
});
</script>
</body>
</html>