Your IP : 18.216.126.33


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

<?php
session_start();
include("lib/connect.inc.php");
if($uidx != 1){
    header("Location:../login.php");
}
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Admin Dashboard</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 -->
    <div class="content-wrapper">
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>Dashboard</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">Admin Dashboard</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->        <div class="content">

    </section>
        <!-- Content Header (Page header) -->
            <div class="container-fluid">
                 <div class="row">
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-info">
              <div class="inner">
                <div class="t-content">
                                <h3><?php echo sqL('user') ?></h3>

                                <p>Registered Users</p>
              
                            </div>
              </div>
              <div class="icon">
                <i class="ion ion-bag"></i>
              </div>
              <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
          <!-- ./col -->
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-success">
              <div class="inner">
               <div class="t-content">
                                 <h3><?php echo sqL1('user','status',0) ?><sup style="font-size: 20px"></sup></h3>

                                    <p>Deactivated Users</p>
                            </div>
              </div>
              <div class="icon">
                <i class="ion ion-stats-bars"></i>
              </div>
              <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
          <!-- ./col -->

                <?php $sum=0; $sql = $db->query("SELECT * FROM withdraw WHERE status=0"); $nos = 0;
                while($row = $sql->fetch_assoc()){
                    if($row['status']==0){$sum += 1;}
                    else {$nos += 1;}
                }
                ?>
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-secondary">
              <div class="inner">
                <div class="t-content">
                               <h3><?php echo $nos; ?><sup style="font-size: 20px"></sup></h3>
                                    <p>Withdrwal Request</p>
                            </div>
              </div>
              <div class="icon">
                <i class="ion ion-person-add"></i>
              </div>
              <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>


                <!-- <h4>Withdrwal Request</h4> -->

                <?php $sql = $db->query("SELECT * FROM withdraw WHERE status='1'"); $nos = 0;
                while($row = $sql->fetch_assoc()){
                    if($row['status']==0){$sum += 1;}
                    else {$nos += 1;}
                }
                ?>
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-warning">
              <div class="inner">
                <div class="t-content">
                                <h3><?php echo $nos; ?><sup style="font-size: 20px"></sup></h3>
                                
                                    <p>Withdrawal Approved</p>
                            </div>
              </div>
              <div class="icon">
                <i class="ion ion-person-add"></i>
              </div>
              <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
         
                <!-- <h4>Registration PINs</h4> -->

                <?php $sql = $db->query("SELECT * FROM pin WHERE rep='$uid' AND tm=1"); $sum = 0; $no = 0;
                while($row = $sql->fetch_assoc()){
                    if($row['status']==0){$sum += 1;}
                    else {$no += 1;}
                }
                ?>

          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-primary">
              <div class="inner">
                <div class="t-content">
                    <h3><?php echo $no; ?><sup style="font-size: 20px"></sup></h3>
                                

                                    <p>Registration Pin</p>
                            </div>
              </div>
              <div class="icon">
                <i class="ion ion-person-add"></i>
              </div>
              <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>

          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-warning">
              <div class="inner">
                <div class="t-content">
                                <h3> $<?php echo number_format(totalTransfer($uid),2) ?><sup style="font-size: 20px"></sup></h3>

                                    <p>Cash Transfer</p>
                            </div>
              </div>
              <div class="icon">
                <i class="ion ion-person-add"></i>
              </div>
              <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>






          <!-- ./col -->
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-danger">
              <div class="inner">
               <div class="t-content">
                                <p class="text-uppercase mb-1"></p>
                                <h3 class="mb-1"><?php echo sqL('globeuser')  ?></h3>
                                <span class="text-white font-90">Global Matrix Users </span>
                            </div>
              </div>
              <div class="icon">
                <i class="ion ion-pie-graph"></i>
              </div>
              <a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
          <!-- ./col -->
        </div>
                <div class="row">
                        <div class="col-md-12">
                <div class="card">
                    <div class="card-header text-white bg-dark">
                                    <h5 style="float: left">Recent Registrations</h5>

                                                            <form class="mt-3" method="post">
                                    <div class="float-right" style="margin-top: -20px"><table><tr><td><input type="text" name="q" required class="form-control" placeholder="Serach for"></td><td><select required name="filter" class="form-control">
                                                        <option value="">Select Option</option>
                                                        <option value="firstname">Firstname</option>
                                                        <option value="lastname">Lastname</option>
                                                        <option value="user">Username</option>
                                                        <option value="email">E-mail</option>
                                                        <option value="phone">Phone Number</option>
                                                    </select></td><td><button type="submit" name="Serach" class="btn btn-primary">Search Item</button></td><td></td></tr></table></div>
                                </form>
                                </div> 


                            
                            <div class="card-body">
                        
                                    
                                    <div class="overflow-x-auto">

                                     <table class="table table-striped table-bordered dataTable" id="example1">
                                            <thead>
                                            <tr>
                                                <th>SN</th>
                                                <th>Name(s)</th>
                                                <th>Email</th>
                                                <th>Username</th>
                                                <th>Phone No</th>
                                                <th>Joined On</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php
                                            $i=1;
                                            $sql = $db->query("SELECT * FROM user ORDER BY sn DESC LIMIT 50"); $e = 0;
                                            if(isset($_POST['q'])){
                                                $q = $_POST['q']; $filter = $_POST['filter'];
                                                $sql = $db->query("SELECT * FROM user WHERE $filter LIKE '%$q%' ");
                                            }

                                            while($row = $sql->fetch_assoc()) { $e = $i++;

                                                ?>

                                                <tr>
                                                    <td><?php echo $e; ?></td>
                                                    <td><?php  echo $row['firstname'].' '.$row['lastname']    ?></td>
                                                    <td><?php echo $row['email'] ?></td>
                                                    <td><?php echo $row['user']; ?></td>
                                                    <td><?php echo $row['phone']; ?></td>
                                                    <td><?php echo substr($row['created'],0,10); ?></td>
                                                </tr>

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

                                            </tfoot>
                                        </table>
                                     
                                    </div>
                                </div>
                            </div>
                            </div>
                            </div><!-- /.card-header -->
                            <!-- /.card-body -->

                        <!-- /.card -->
                        </div>
                    <!-- 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>

?>