Your IP : 3.149.240.101


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

<?php

session_start();
include("lib/connect.inc.php");
$uid = $covis->Uid();
if($uidx != 1){
    header("Location:../login.php");
}

$stage = $covis->stageCalc($uidx);
$lev = $covis->stageLevel($uidx);

if(isset($_SESSION['report'])){$report = $_SESSION['report']; }

?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="treant/examples/tree/basic-example2.css">
    <!-- Neptune CSS -->
    <link rel="stylesheet" href="css/core.css">
    <title>OnePayNg Transactions</title>
    <link rel="shortcut icon" href="img/fav.png" />
    <link rel="stylesheet" href="treant/Treant.css">
    <link rel="stylesheet" href="treant/examples/tree/basic-example2.css">
    <!-- Neptune CSS -->
    <link rel="stylesheet" href="css/core.css">

    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Vendor CSS -->
    <link rel="stylesheet" href="../vendor/bootstrap4/css/bootstrap.min.css">
    <link rel="stylesheet" href="../vendor/themify-icons/themify-icons.css">
    <link rel="stylesheet" href="../vendor/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../vendor/animate.css/animate.min.css">
    <link rel="stylesheet" href="../vendor/jscrollpane/jquery.jscrollpane.css">
    <link rel="stylesheet" href="../vendor/waves/waves.min.css">
    <link rel="stylesheet" href="../vendor/switchery/dist/switchery.min.css">
    <link rel="stylesheet" href="../vendor/morris/morris.css">
    <link rel="stylesheet" href="../vendor/jvectormap/jquery-jvectormap-2.0.3.css">
    <!-- Font Awesome -->
    <?php include('head.php'); ?>
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">

    <?php include('nav.php'); ?>


    <!-- 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>OnePayNg Transactions</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">OnePayNg Transactions</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">
                         
                         <?php
                         function onePayTotal($e,$channel){
                             global $db;
                             $c1=0;
                             $sql = $db->query("SELECT * FROM onepaydebit WHERE channel='$channel' ");
                             while($row = mysqli_fetch_assoc($sql)){
                                
                                    $c1 += $row['price'] ;  
                                
                             }
                               
                            return $c1; 
                         }
                         
                         
                         function onePayWeek($ww,$channel){
                             global $db;
                             $c1=0; //$ww=date('W');
                             $sql = $db->query("SELECT * FROM onepaydebit WHERE channel='$channel' ");
                             while($row = mysqli_fetch_assoc($sql)){
                                 if(date('W',strtotime($row['date']))==$ww){
                                    $c1 += $row['price'] ;  
                                 }
                                
                             }
                               
                            return $c1; 
                         }
                         
                         function onePay($e,$channel){
                             global $db;
                             $c1=0;
                             $sql = $db->query("SELECT * FROM onepaydebit WHERE channel='$channel' ");
                             while($row = mysqli_fetch_assoc($sql)){
                                 if(date('F',strtotime($row['date']))==date("F", mktime(0, 0, 0, $e, 10))){
                                    $c1 += $row['price'] ;  
                                 }
                                
                             }
                               
                            return $c1; 
                         }
                         
                         $i=1; $mm = date('m'); while($i<=$mm){ $e=$i++;  ?>
          <div class="col-lg-3 col-12">
            <!-- small box -->
            <div class="small-box bg-info">
              <div class="inner">
              TRANSACTION SUMMARY
                    <table class="table table-sm">
                        <tr><td>Fund Onepay:</td> <th>₦<?php echo number_format(onePay($e,1),2); ?></th></tr>
                    <tr><td>Fund Charges:</td> <th>₦<?php echo number_format(onePay($e,2),2); ?></th></tr>
                    <tr><td>Fund Received:</td> <th>₦<?php echo number_format(abs(onePay($e,3)),2); ?></th></tr>
                     </table>
                   
              </div>
              <div class="icon">
                <i class="ion ion-stats-bars"></i>
              </div>
              <a href="?index=<?php echo $e ?>" class="small-box-footer"><?php echo date("F", mktime(0, 0, 0, $e, 10)); ?> 2021 <i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
        <?php } ?>
        
                  <div class="col-lg-3 col-12">
            <!-- small box -->
            <div class="small-box bg-success">
              <div class="inner">
              
                    TRANSACTION SUMMARY
                    <table class="table table-sm">
                        <tr><td>Fund Onepay:</td> <th>₦<?php echo number_format(onePayTotal($e,1),2); ?></th></tr>
                    <tr><td>Fund Charges:</td> <th>₦<?php echo number_format(onePayTotal($e,2),2); ?></th></tr>
                    <tr><td>Fund Received:</td> <th>₦<?php echo number_format(abs(onePayTotal($e,3)),2); ?></th></tr>
                     </table>
                   
              </div>
              <div class="icon">
                <i class="ion ion-stats-bars"></i>
              </div>
              <a href="?" class="small-box-footer"> 2021 ANNUAL TOTAL<i class="fas fa-arrow-circle-right"></i></a>
            </div>
          </div>
                       
                        
                        <div class="col-md-12">
                            <div class="card ">
                                
                                
                                <div class="card-header text-white bg-dark">
                                    <h5 style="float: left;">OnePayNg Transactions Weekly Summary </h5>
                                  
                                    </div>
                                 
                                    <div class="card-body">
                                          <table class="table table-striped table-bordered dataTable" id="example1">
                                        <tr>
                                            <th>WEEK</th>
                                            <th>TRANSFERED</th>
                                            <th>CHARGES</th>
                                            <th>RECEIVED</th>
                                            
                                           
                                        </tr>
                                        <?php $i=1; $week = date('W');  while($i<=$week){ $e=$i++;   ?>
                                            <tr>
                                                     <td> <a href="?week=<?php echo $e ?>" >WEEK <?php echo $e ?></a></th>
                                                <td>₦<?php echo number_format(onePayWeek($e,1),2); ?></th>
                                                <td>₦<?php echo number_format(onePayWeek($e,2),2); ?></th>
                                                <td>₦<?php echo number_format(abs(onePayWeek($e,3)),2); ?></th>
                                           
                                               
                                            </tr>
                                        <?php } ?>
                                       
                                    </table>
                                    </div>
                                    
                                <?php if(isset($_GET['week'])){ $ww = $_GET['week']; ?>
                                
                                <div class="card-header text-white bg-dark">
                                    <h5 style="float: left;">OnePayNg Transactions History For WEEK <?php echo $ww; ?>, 2021 </h5>
                                  
                                    </div>
                                    
                                 
                                    <div class="card-body">
                                          <table class="table table-striped table-bordered dataTable" id="example1">
                                        <tr>
                                            <th>S/N</th>
                                            <th>User</th>
                                            <th>Date</th>
                                            <th>Amount($)</th>
                                            <th>Remark</th>
                                           
                                        </tr>
                                        <?php $sql = $db->query("SELECT * FROM onepaydebit ORDER BY id DESC LIMIT 500"); $i = 0;
                                        while($row = mysqli_fetch_assoc($sql)){ 
                                            if(date('W',strtotime($row['date']))==$ww){
                                            $i +=1;
                                            $col = $row['channel']<3 ? 'style="color: red"' : '';
                                            ?>
                                            <tr <?php echo $col ?>>
                                                <td><?php echo $i  ?></th>
                                                <td><?php echo userName($row['userid'])  ?> (<?php echo userName($row['userid'],'user')  ?>)</th>
                                                <td><?php echo date('jS M Y',strtotime($row['date']))  ?></th>
                                                <td>$<?php echo number_format(abs($row['price']/$covis->onePayRate),2)  ?></th>
                                                <td> <?php echo $covis->onePayRemark($row['channel']);  ?></th>
                                               
                                            </tr>
                                        <?php } } ?>
                                       
                                    </table>
                                    </div>
                                
                                <?php }elseif(isset($_GET['index'])){ $m = $_GET['index']; ?>
                                
                                <div class="card-header text-white bg-dark">
                                    <h5 style="float: left;">OnePayNg Transactions History For <?php echo date("F", mktime(0, 0, 0, $m, 10)); ?> 2021 </h5>
                                  
                                    </div>
                                    
                                 
                                    <div class="card-body">
                                          <table class="table table-striped table-bordered dataTable" id="example1">
                                        <tr>
                                            <th>S/N</th>
                                            <th>User</th>
                                            <th>Date</th>
                                            <th>Amount($)</th>
                                            <th>Remark</th>
                                           
                                        </tr>
                                        <?php $sql = $db->query("SELECT * FROM onepaydebit ORDER BY id DESC LIMIT 500"); $i = 0;
                                        while($row = mysqli_fetch_assoc($sql)){ 
                                            if(date('F',strtotime($row['date']))==date("F", mktime(0, 0, 0, $m, 10))){
                                            $i +=1;
                                            $col = $row['channel']<3 ? 'style="color: red"' : '';
                                            ?>
                                            <tr <?php echo $col ?>>
                                                <td><?php echo $i  ?></th>
                                                <td><?php echo userName($row['userid'])  ?> (<?php echo userName($row['userid'],'user')  ?>)</th>
                                                <td><?php echo date('jS M Y',strtotime($row['date']))  ?></th>
                                                <td>$<?php echo number_format(abs($row['price']/$covis->onePayRate),2)  ?></th>
                                                <td> <?php echo $covis->onePayRemark($row['channel']);  ?></th>
                                               
                                            </tr>
                                        <?php } } ?>
                                       
                                    </table>
                                    </div>
                                
                                <?php }else{ ?>
                                    <div class="card-header text-white bg-dark">
                                    <h5 style="float: left;">Recent OnePayNg Transactions History</h5>
                                  
                                    </div>
                                 
                                    <div class="card-body">
                                          <table class="table table-striped table-bordered dataTable" id="example1">
                                        <tr>
                                            <th>S/N</th>
                                            <th>User</th>
                                            <th>Date</th>
                                            <th>Amount($)</th>
                                            <th>Remark</th>
                                           
                                        </tr>
                                        <?php $sql = $db->query("SELECT * FROM onepaydebit ORDER BY id DESC LIMIT 500"); $i = 0;
                                        while($row = mysqli_fetch_assoc($sql)){ $i +=1;
                                            $col = $row['channel']<3 ? 'style="color: red"' : '';
                                            ?>
                                            <tr <?php echo $col ?>>
                                                <td><?php echo $i  ?></th>
                                                <td><?php echo userName($row['userid'])  ?> (<?php echo userName($row['userid'],'user')  ?>)</th>
                                                <td><?php echo date('jS M Y',strtotime($row['date']))  ?></th>
                                                <td>$<?php echo number_format(abs($row['price']/$covis->onePayRate),2)  ?></th>
                                                <td> <?php echo $covis->onePayRemark($row['channel']);  ?></th>
                                               
                                            </tr>
                                        <?php } ?>
                                       
                                    </table>
                                    </div>
                                    
                                    <?php } ?>
                                   
                            </div>
                        </div>
                         
                        </div>
                    </div>
                </div>
                </div>

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

    <script type="text/javascript" src="../vendor/chartist/chartist.min.js"></script>

    <!-- Vendor JS -->
    <script type="text/javascript" src="../vendor/jquery/jquery-1.12.3.min.js"></script>
    <script type="text/javascript" src="../vendor/tether/js/tether.min.js"></script>
    <script type="text/javascript" src="../vendor/bootstrap4/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../vendor/detectmobilebrowser/detectmobilebrowser.js"></script>
    <script type="text/javascript" src="../vendor/jscrollpane/jquery.mousewheel.js"></script>
    <script type="text/javascript" src="../vendor/jscrollpane/mwheelIntent.js"></script>
    <script type="text/javascript" src="../vendor/jscrollpane/jquery.jscrollpane.min.js"></script>
    <script type="text/javascript" src="../vendor/jquery-fullscreen-plugin/jquery.fullscreen-min.js"></script>
    <script type="text/javascript" src="../vendor/waves/waves.min.js"></script>
    <script type="text/javascript" src="../vendor/switchery/dist/switchery.min.js"></script>
    <script type="text/javascript" src="../vendor/flot/jquery.flot.min.js"></script>
    <script type="text/javascript" src="../vendor/flot/jquery.flot.resize.min.js"></script>
    <script type="text/javascript" src="../vendor/flot.tooltip/js/jquery.flot.tooltip.min.js"></script>
    <script type="text/javascript" src="../vendor/CurvedLines/curvedLines.js"></script>
    <script type="text/javascript" src="../vendor/TinyColor/tinycolor.js"></script>
    <script type="text/javascript" src="../vendor/sparkline/jquery.sparkline.min.js"></script>
    <script type="text/javascript" src="../vendor/raphael/raphael.min.js"></script>
    <script type="text/javascript" src="../vendor/morris/morris.min.js"></script>
    <script type="text/javascript" src="../vendor/jvectormap/jquery-jvectormap-2.0.3.min.js"></script>
    <script type="text/javascript" src="../vendor/jvectormap/jquery-jvectormap-world-mill.js"></script>
    <script type="text/javascript" src="../vendor/peity/jquery.peity.js"></script>
    <script type="text/javascript" src="../vendor/chartist/chartist.min.js"></script>

    <!-- Neptune JS -->
    <script type="text/javascript" src="js/app.js"></script>
    <script type="text/javascript" src="js/demo.js"></script>
    <script type="text/javascript" src="js/index.js"></script>


    <!-- page script -->
    <script type="text/javascript">
        <?php
        // if($covis->globeStage($uidy)==1 ){
        if($stages==1 ){
            echo $covis->covisTreeGlobe($uid);
        }else{
            echo $covis->covisTree4Globe($uid);
        }
        ?>
    </script>

    <script src="treant/vendor/raphael.js"></script>
    <script src="treant/Treant.js"></script>


    <script>
        new Treant( chart_config );
    </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>

?>