<?php include("includes/header.php"); ?>
<?php include("includes/auto_out.php"); ?>
<!DOCTYPE html>
<html>
<head>
  <title>All Cards | <?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" align="">
            
            
          </div>
        </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 CARDS</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 card details.</div>
                          <hr>
                         <table class="table table-bordered table-striped">
                             <thead>
                               <tr>
                                <th>EDIT</th>
                                <th>X</th>
                                <th>DATE</th>
                                <th>STATUS</th>
                                <th>ACCOUNT</th>
                                <th>CARD</th>
                                <th>TYPE</th>
                                <th>RESIDENT ADDRESS</th>
                                

                               </tr>
                            
                       <?php
                        $query = mysqli_query($conn, "SELECT * FROM card_trans ORDER BY id DESC");
                        $numrow = mysqli_num_rows($query);
                        if($numrow >= 1){
                          while($row = mysqli_fetch_assoc($query)){
                            
                            $card_id = $row['id'];
                            $my_account = $row["my_account"];
                            $card_name = $row["card_name"];
                            $card_type = $row["card_type"];
                            $card_shipment_address = $row['card_shipment_address'];
                            $card_status = $row['card_status'];
                            $card_date = $row["card_date"];   ?>
                                 
                                 </thead>
                                 <tbody class="tbody">
                                 <tr>

                                  <td> <a href="edit-cards.php?card_id=<?php echo $card_id; ?>" class="btn btn-primary" style="border-radius: 0px;"><i class="fa fa-edit"></i></a> </td>

                                  <td><a href="delete-cards.php?card_id=<?php echo $card_id; ?>" class="btn btn-danger" style="border-radius: 0px;"><i class="fa fa-trash"></i></a> </td>

                                 
                                  <td><?php echo $card_date; ?></td>
                                  <td>
                                    <?php
                                      if($card_status == "PENDING"){
                                         $card_status = "<a class='btn btn-warning btn-sm' style='border-radius:0px;'>PENDING</a>";
                                      }elseif($card_status == "APPROVED"){
                                         $card_status = "<a class='btn btn-success'>APPROVED</a>";
                                      }else{
                                         $card_status = "<a class='btn btn-danger btn-sm' style='border-radius:0px;'>DECLINED</a>";
                                      }
                                    ?>
                                    <?php echo $card_status; ?>
                                  </td>
                                  <td><?php echo $my_account; ?></td>
                                  <td>
                                    <?php
                                     if($card_name == "VISA"){
                                      $card_name = '<img src="../images/349221.png" class="img-responsive" style="margin-top:0px;" width="30">';
                                     }elseif($card_name == "MAESTRO"){
                                      $card_name = '<img src="../images/147258.png" class="img-responsive" style="margin-top:0px;" width="30">';
                                     }elseif($card_name == "AMEX"){
                                      $card_name = '<img src="../images/349228.png" class="img-responsive" style="margin-top:0px;" width="30">';
                                     }else{
                                      $card_name = '<img src="../images/349230.png" class="img-responsive" style="margin-top:0px;" width="30">';
                                     }
                                    ?>
                                    <?php echo $card_name; ?>
                                  </td>
                                  <td><?php echo ($card_type); ?> CARD</td>
                                  <td><?php echo $card_shipment_address; ?></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>