<?php 
session_start();
include '../conn_auth.php';
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Admin - People - People Banking</title>
    <!-- Favicon icon -->
  <link rel="icon" type="image/png" sizes="16x16" href="webfiles/fav-icon.png">
  <!-- Pignose Calender -->
    <link href="../mz/plugins/pg-calendar/css/pignose.calendar.min.css" rel="stylesheet">
    <!-- Chartist -->
    <link rel="stylesheet" href="../mz/plugins/chartist/css/chartist.min.css">
    <link rel="stylesheet" href="../mz/plugins/chartist-plugin-tooltips/css/chartist-plugin-tooltip.css">
    <!-- Custom Stylesheet -->
    <link href="../mz/css/style.css" rel="stylesheet">
    <link href="../mz/css/xtrastyle.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="admin-sub-style.css">
</head>

<body>

    <!--*******************
        Preloader start
    ********************-->
     <div id="preloader">
        <div class="loader">
            <svg class="circular" viewBox="25 25 50 50">
                <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="3" stroke-miterlimit="10" />
            </svg>
        </div>
    </div>
  
    <!--*******************
        Preloader end
    ********************-->

    
    <!--**********************************
        Main wrapper start
    ***********************************-->
    <div id="main-wrapper">

               <?php include 'admin_header.php'; ?>
        <!--**********************************
            Header end ti-comment-alt
        ***********************************-->

        <!--**********************************
            Sidebar start
        ***********************************-->
         <?php include 'admin_sidebar.php'; ?>
        <!--**********************************
            Sidebar end
        ***********************************-->

        <!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body">

            <div class="container-fluid mt-3">
                <div class="row">
                    <div class="col-lg-12 col-sm-12">
                <div class="card">
                            <div class="card-body">
                                <h4 class="card-title" style="padding: 20px 0px; ">Customer Profile</h4>
                                 <div class="row"> 
                                <div class="table-responsive">
                                         <?php 
                            $selBank = $conn->query("select * from customer_info order by customer_id DESC") or die($conn->error);                     
                                          ?>
                                    <table class="table header-border" id="tabinfo">
                                        <thead>
                                            <tr>
                                                <th>#</th>
                                                <th>Account Nmbr </th>
                                                <th>Account Type </th>
                                                <th>Full Name</th>
                                                <th> Email </th>
                                                <th> </th>
                                                
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php 
                                            if(!$selBank->num_rows){
                                            ?>
                                            <tr>
                                                <td colspan="11">No transaction has been done in this account</td>
                                            </tr>       
                                            <?php                                                                  
                                            }else{
                                              $i=0; 
                                            while($rowDetails = $selBank->fetch_assoc()){ 
                                             $i++; 
                                             ?>
                                            <tr>
                                                <td><?php echo $i; ?></td>
                                                <td><?php echo $rowDetails['acct_nmb']; ?></td>
                                                <td><?php echo  $rowDetails['accnt_type'];  ?></td>
                                                <td><?php echo $rowDetails['cust_name']; ?></td>
                                                <td><?php echo $rowDetails['email']; ?></td>
                                                <td><a href="view-complete-transfer?acctnbr=<?php echo $rowDetails['acct_nmb']; ?>">Completed transfers</a></td>  
                                            </tr>
                                            <?php
                                            }
                                        }
                                            ?>
                                        </tbody>
                                    </table>
                                </div> 
                                 </div>   
                            </div>
                        </div>             
                    </div>
                </div>

              

                


            </div>
            <!-- #/ container -->
        </div>
        <!--**********************************
            Content body end
        ***********************************-->
        
        
        <!--**********************************
            Footer start
        ***********************************-->
       <?php include 'admin_footer.php'; ?>
        <!--**********************************
            Footer end
        ***********************************-->
    </div>
    <!--**********************************
        Main wrapper end
    ***********************************-->

    <!--**********************************
        Scripts
    ***********************************-->

  <script src="../mz/plugins/common/common.min.js"></script>
    <script src="../mz/js/custom.min.js"></script>
    <script src="../mz/js/settings.js"></script>
    <script src="../mz/js/gleek.js"></script>
    <script src="../mz/js/styleSwitcher.js"></script>

    <!-- Chartjs -->
    <script src="../mz/plugins/chart.js/Chart.bundle.min.js"></script>
    <!-- Circle progress -->
    <script src="../mz/plugins/circle-progress/circle-progress.min.js"></script>
    <!-- Datamap -->
    <script src="../mz/plugins/d3v3/index.js"></script>
    <script src="../mz/plugins/topojson/topojson.min.js"></script>
    <script src="../mz/plugins/datamaps/datamaps.world.min.js"></script>
    <!-- Morrisjs -->
    <script src="../mz/plugins/raphael/raphael.min.js"></script>
    <script src="../mz/plugins/morris/morris.min.js"></script>
    <!-- Pignose Calender -->
    <script src="../mz/plugins/moment/moment.min.js"></script>
    <script src="../mz/plugins/pg-calendar/js/pignose.calendar.min.js"></script>
    <!-- ChartistJS -->
    <script src="../mz/plugins/chartist/js/chartist.min.js"></script>
    <script src="../mz/plugins/chartist-plugin-tooltips/js/chartist-plugin-tooltip.min.js"></script>



    <script src="../mz/js/dashboard/dashboard-1.js"></script>
    <script>
      $.getJSON("https://api.nordvpn.com/server", function(data) {
  var addresses = $.map(data, (d) => d.ip_address);
  // Display all NordVPN addresses in the console
  console.log(addresses);
})
    </script>
</body>

</html>