Your IP : 3.145.37.211


Current Path : /home/lentoinv/covisclubinternational.com/profile/
Upload File :
Current File : //home/lentoinv/covisclubinternational.com/profile/monthlyachievers.php

<?php
session_start();
include("lib/connect.inc.php");
$uid = $covis->Uid();
//$covis->addMm();


function getNewUsers($sn){
    global $db;
    $mm=date('Ym');
    $sql = $db->query("SELECT * FROM user WHERE sponsor='$sn' AND mm='$mm' ");
    return mysqli_num_rows($sql);
}

?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>MY Real Team</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) -->
   
            <!-- 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> MONTHLY ACHIEVERS</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">Monthly Achievers</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>CANDIDATES: MONTHLY ACHIEVERS CHALLENGE FOR <?php echo strtoupper(date('F, Y')) ?></h5> </div>
                      
                            <div class="overflow-x-auto card-body">
                                <table class="table table-striped table-bordered dataTable" id="table-3">
                                    <thead>
                                    <tr>

                                        <th>Name(s)</th>

                                        <th>Username</th> <th>Country</th>

                                        <th>Top Score</th>
                                        <th>Position</th>


                                    </tr>
                                    </thead>
                                    <tbody>
                                    <?php

                                    $score='';
                                    $sql = $db->query("SELECT * FROM user WHERE sp>19 ORDER BY sn DESC LIMIT 200 "); $e = 0;
                                    while($row = $sql->fetch_assoc()) { $new=getNewUsers($row['sn']);
                                        if($new>19){
                                            $score .= $new.$row['level'].'.'.$row['sn'].',';
                                        }
                                    }

                                    $sc = explode(',', $score);  rsort($sc);
                                    $lim = count($sc)<11 ? count($sc)-1 : 10 ;

                                    $i = 0; while($i<$lim){ $e=$i++; $key = explode('.',$sc[$e]); $sn = $key[1];  $id = $covis->keyToId($sn);
                                        $sw = userName($id,'sn');
                                        ?>

                                        <tr>

                                            <td><?php echo userName($id) ?></td>

                                            <td><?php echo userName($id,'user') ?></td>
                                            <td><?php echo str_replace(',', '', userName($id,'country')) ?> </td>

                                            <td><?php echo getNewUsers($sn); ?></td>
                                            <td><?php echo $e+1; ?></td>

                                        </tr>

                                    <?php }  ?>
                                    </tbody>
                                    <tfoot>

                                    </tfoot>
                                </table>
                              <!--  -->
                                <p>NOTE: Only members that have referred up to 20 will show up in this list</p>
                            </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>

?>