<?php include("includes/header.php"); ?>
<?php include("includes/auto_out.php"); ?>
<!DOCTYPE html>
<html>
<head>
  <title>All Users | <?php echo $sitename;  ?> HQ</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css">

   <!--CSS-->
  <link rel="stylesheet" href="style.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.css">
  <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css">

    <!-- Bootstrap Core CSS -->
      <link href="css/bootstrap.min.css" rel="stylesheet">

     <!-- Font Awesome -->
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">

      <!-- Custom CSS -->
      <link href="css/blog-home.css" rel="stylesheet">

      <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
      <!--[if lt IE 9]-->
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
          <script src="js/jquery.js"></script>
          <script src="js/bootstrap.js"></script>





          <!----MODAL-------------------->
          <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>



</head>

<body>
  <?php  include("includes/dashboard_navbar.php"); ?>
  <!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here-->
  <style>
    body{
      background-color: #f5f5f5;
    }
    .destop-siderbar{
      background-color: #131e2a;
      height: 100%;
      width:240px;
      box-shadow: 0 0 4px 0 rgba(0,0,0,.50), 0 2px 4px 0 rgba(0,0,0,.50);
      position: fixed;
      margin-left:-20px;
      padding:50px 25px;
    }
    .destop-siderbar li{
       padding: 30px 20px;
       list-style: none;
    }
    .destop-siderbar li a{
      color: #fff;
      font-size: 17px;
      padding:10px 0px;
    }
    .destop-siderbar li a i{
      color:rgb(45, 156, 219);
      font-weight: lighter;
    }
    .destop-siderbar .active {
      background-color:#123962;
      box-shadow: 0 0 4px 0 rgba(0,0,0,.50), 0 2px 4px 0 rgba(0,0,0,.50);
      
    }
    .destop-siderbar .active a{
      color:#fff;
    }
    .destop-siderbar .active a:hover{
      color:#fff;
    }
    .destop-siderbar li a:hover{
      color: #a5bdd9;
      text-decoration: none;
    }
    .panel{
      border-radius: 0px;
      border-color: transparent;
    }
    .input-danger{
       border:1px solid darkred;
       color:darkred;
     }
     .input-danger::placeholder{
       opacity: 0.6;
       color:darkred;
     }
  </style>

  <div class="container-fluid">
    <div class="row">
      <!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here-->
      <div class="col-sm-2 hidden-xs" style="height: 100%;">
             <?php include("includes/desktop_side.php"); ?>
      </div>
      <!--/////////////////////// DESTOP Side bar starts here--><!-- DESTOP Side bar starts here--><!-- DESTOP Side bar starts here-->
      <div class="col-sm-10">
        <br><br><br><br>

        <!----------------------------------------------------------------------------------->

        <div class="row">
          <div class="col-sm-12">
              
              <div align="right">
                  <a href="apply-now.php" class="btn btn-primary" style="border-radius: 0px;"><i class="fa fa-plus" style="font-size: 18px;"></i> Create New User</a>
              </div>
            <div class="row">


              <div class="col-sm-12">
                 <div class="panel panel-default">
                  <div class="panel-body">
                       <span style="font-size: 16px; font-weight: bold;"><i class="fa fa-caret-left" style="font-size: 18px;"></i> <i class="fa fa-caret-right" style="font-size: 18px;"></i> ALL USERS</span>

                       <style>
                         table thead tr th{
                           font-size: 13px;
                           font-weight: bolder;
                         }
                         table tbody tr td{
                           font-size: 13px;
                           font-weight:;
                         }
                       </style>

                        <div class="table-responsive">
                          
                          <div class="hidden-lg hidden-md" align="left" style="font-size: 15px; margin-left: 10px; color: red;"><img src="images/swipe-left.gif" class="img-responsive" width="45"> Swipe left to view full transaction details.</div>
                          <hr>
                         <table class="table table-bordered table-striped">
                             <thead>
                               <tr>
                                <th>EDIT</th>
                                <th>X</th>
                                <th>ACCOUNT ID</th>
                                <th>PIN</th>
                                <th>NAME</th>
                                <th>STATUS</th>
                                <th>EMAIL</th>
                                <th>AMOUNT</th>
                                <th>ACC NUMB</th>
                                 <th>COUNTRY<span style="color:#000; font-size: 12px; font-weight: normal;"></span></th>
                                 <th>PASSWORD</th>
                               </tr>
                            
                       <?php
                        $query = mysqli_query($conn, "SELECT * FROM users ORDER BY id DESC");
                        $numrow = mysqli_num_rows($query);
                        if($numrow >= 1){
                          while($row = mysqli_fetch_assoc($query)){
                            
                            $user_id = $row['id'];
                            $b_firstname = $row["b_firstname"];
                            $b_middlename = $row["b_middlename"];
                            $b_lastname = $row["b_lastname"];
                            $b_email = $row["b_email"];
                            $b_gender = $row["b_gender"];
                            $b_phone = $row["b_phone"];
                            $b_country = $row['b_country'];
                            $b_state = $row["b_state"];
                            $b_city = $row["b_city"];
                            $b_zipcode = $row["b_zipcode"];
                            $b_address = $row["b_address"];
                            $b_account_balance = $row["b_amount"];
                            $b_account_number = $row["b_account_number"];
                            $b_password = $row["b_password"];
                            $b_account_id = $row["account_id"];
                            $b_account_pin = $row["account_pin"];
                            $b_account_status = $row["account_status"];
                            $b_currency = $row["b_currency"];
                            $visa_card_balance = $row["visa_card_balance"];

                            $maestro_card_balance = $row["maestro_card_balance"];
                            $amex_card_balance = $row["amex_card_balance"];
                            $discover_card_balance = $row["discover_card_balance"];
                            $card_status = $row["card_status"];
                            $car_loan_balance = $row["car_loan_balance"];
                            $home_loan_balance = $row["home_loan_balance"];
                            $business_loan_balance = $row["business_loan_balance"];
                            $medical_loan_balance = $row["medical_loan_balance"];
                            $loan_status = $row["loan_status"];  ?>
                                 
                                 </thead>
                                 <tbody class="tbody">
                                 <tr>



                                  

                                 <td> <a href="edit-users.php?user_id=<?php echo $user_id; ?>" class="btn btn-primary" style="border-radius: 0px;"><i class="fa fa-edit"></i></a> </td>
                                 <td><a href="delete-users.php?user_id=<?php echo $user_id; ?>" class="btn btn-danger" style="border-radius: 0px;"><i class="fa fa-trash"></i></a> </td>
                                 
                                 <td><?php echo $b_account_id; ?></td>
                                 <td><?php echo $b_account_pin; ?></td>
                                 <td><?php echo $b_firstname."&nbsp;".$b_middlename."&nbsp;".$b_lastname; ?></td>
                                 <td><?php
                                   if($b_account_status == "Active"){
                                     $b_account_status = '<p style="font-size: 18px;">Active <img src="../images/5290058.png" width="20px"></p>';
                                   }elseif($b_account_status == "Dormant"){
                                     $b_account_status = '<p style="font-size: 20px;">Dormant <img src="../images/5206916.png" width="20px"></p>';
                                   }elseif($b_account_status == "Suspended"){
                                     $b_account_status = '<p style="font-size: 20px;">Suspended <img src="../images/1828665.png" width="20px"></p>';
                                   }elseif($b_account_status == "Deactivated"){
                                     $b_account_status = '<p style="font-size: 20px;">Deactivated <img src="../images/3687412.png" width="20px"></p>';
                                   }

                                   echo $b_account_status;
                                 ?></td>

                                  
                                  
                                  <td><?php echo $b_email; ?></td>
                                  <td>$<?php echo $b_account_balance; ?></td>
                                  <td><?php echo $b_account_number; ?></td>
                                  <td><?php echo $b_country; ?></td>
                                  <td><?php echo $b_password; ?></td>

                                   




                                   
                                 </tr>
                               



                        <?php  }
                        }else{
                          echo ' <br><br>
                    <div align="center">
                    <img src="images/empty.png" width="80" class="img-responsive">
                    <br>
                    <span style="font-size: 18px;">What\'s Up Comrade</span><br><br>
                    <span style="font-size: 15px;">You have not traded crypto with btczux, <a href="sell-bitcoin.php">Trade Now <i class="fa fa-caret-right"></i></a></span>
                    </div>

                    <br><br><br><br><br>';
                        }
                       ?>

                           </tbody>
                         </table>

                       </div>

                       
                            
                   
                    <br>
                  </div>
                </div>
              </div>
              

         

            </div>

            

            <!--------------------------->

            






          </div>








          </div>
        </div>
        
        
        
        
        
        
      </div>
    </div>
  </div>
</body>
</html>