<?
include('../../config.php');


if(isset($_POST['fund'])){
    $user=$_POST['pass'];
    $dbo="update User set paid='ok'";
    $q=mysqli_query($conn, $dbo);
    
    $op="update Deposit set credit='yes'";
    $opp=mysqli_query($conn, $op);
    
    
    
}

?>


    <?php include("inc/header.php") ?>


  <body data-spy="scroll" data-target="#navSection" data-offset="100">

    <?php include("inc/sidebar.php") ?>
    
    
    <!-- sidebar -->

    <div class="content">
      <div class="header">
        <div class="header-left">
          <a href="#" class="burger-menu"><i data-feather="menu"></i></a>

        </div><!-- header-left -->

        <div class="header-right">
          
          <div class="dropdown dropdown-loggeduser">
            <a href="#" class="dropdown-link" data-toggle="dropdown">
              <div class="avatar avatar-sm">
                <img src="assets/img/img1.jpg" class="rounded-circle" alt="">
              </div><!-- avatar -->
            </a>
            <div class="dropdown-menu dropdown-menu-right">
              <div class="dropdown-menu-header">
                <div class="media align-items-center">
                  <div class="avatar">
                    <img src="assets/img/img1.jpg" class="rounded-circle" alt="">
                  </div><!-- avatar -->
                  <div class="media-body mg-l-10">
                    <h6>Louise Kate Lumaad</h6>
                    <span>Administrator</span>
                  </div>
                </div><!-- media -->
              </div>
              <div class="dropdown-menu-body">
                <a href="#" class="dropdown-item"><i data-feather="user"></i> View Profile</a>
                
                <a href="../Login/" class="dropdown-item"><i data-feather="log-out"></i> Sign Out</a>
              </div>
            </div><!-- dropdown-menu -->
          </div>
        </div><!-- header-right -->
      </div><!-- header -->
      <div class="content-header">
        <div>
          
      <h4 class="content-title" style="padding-left:30px;"> DEPOSIT REQUEST</h4>
        </div>
      </div><!-- content-header -->
     
      <div class="content-body content-body-components">
	   
	  
	  
        
          
          <div class="demo-modal-btn d-block tx-center">
            <div class="card card-body">
            <div class="table-responsive">
              <table class="table table-striped mg-b-0">
                <thead>
                    <tr>
                        <th scope="col">OrderNo</th>
                    <th scope="col"> Customer Name</th>
                    <th scope="col">Amount</th>
                    <th scope="col">Method</th>
                    
                    <th scope="col">Status</th>
                    <th scope="col">Date</th>
                    
                     
                    <th scope="col">Action</th>
                        
                        
                 
                  </tr>
                  
                </thead>
                <?
                $db="select * from User where status='1' and paid='waiting'";
                        $query=mysqli_query($conn, $db);
                        while(($row=mysqli_fetch_array($query))>0)
                        {
                            
                            
                            
                            
                            $user=$row['user_id'];
                            $name=$row['firstname'];
                            $name2=$row['lastname'];
                            $fname=$name.''.$name2;
                            $phone=$row['phone'];
                            $email=$row['email'];
                            $currency=$row['currency'];
                            $plan=$row['plan'];
                            $curr=$currency.$plan;
                            $account=$row['account'];
                            $pass=$row['password'];
                            $status=$row['status'];
                            $code=$row['code'];
                            $exp=$row['exp_id'];
                            
                            $tim="select * from Deposit where exp_id='$exp' and credit=''";
                            $timm=mysqli_query($conn, $tim);
                            $fetch=mysqli_fetch_array($timm);
                            $time=$fetch['time'];
                  ?>          
               <tbody>
                            <tr>
                            <td>
                            <a href="#"><? echo $exp; ?></a>
                            </td>
                            <td class="hidden-phone"><? echo $fname; ?></td>
                            <td><? echo $plan; ?></td>
                            <td>Bitcoin</td>
                            <td>Pending</td>
                            <td><? echo $time; ?></td>
                           
                            <td>
                                <form method="post">
                                    <? echo '<input type="hidden" name="pass" value"'.$user.'"/>'; ?>
                            <button class="btn btn-success btn-xs" name="fund" type="submit">Add Fund</button>
                           </form>
                            </td>
                            </tr>
                              
                            
                </tbody>
                <? } ?>
              </table>
            </div><!-- table-responsive -->
          </div>
            
            
          </div>
		  <nav aria-label="Page navigation example" style="float:right; margin-top:10px; margin-right:10px;">
            <ul class="pagination pagination-outline mg-b-0">
              <li class="page-item disabled"><a class="page-link page-link-icon" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><polyline points="15 18 9 12 15 6"></polyline></svg></a></li>
              <li class="page-item active"><a class="page-link" href="#">1</a></li>
              <li class="page-item"><a class="page-link" href="#">2</a></li>
              <li class="page-item"><a class="page-link" href="#">3</a></li>
              <li class="page-item"><a class="page-link page-link-icon" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg></a></li>
            </ul>
          </nav>
        

      </div><!-- content-body -->
     
    </div><!-- content -->

	
    <script src="lib/jquery/jquery.min.js"></script>
    <script src="lib/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="lib/feather-icons/feather.min.js"></script>
    <script src="lib/perfect-scrollbar/perfect-scrollbar.min.js"></script>
    <script src="lib/prismjs/prism.js"></script>
    <script src="lib/js-cookie/js.cookie.js"></script>

    <script src="assets/js/cassie.js"></script>
    <script>
      $(function(){

        'use strict'

      })
    </script>
	
	<script>
      $(function(){

        'use strict'

        $('#modal6').on('show.bs.modal', function (event) {

          var animation = $(event.relatedTarget).data('animation');
          $(this).addClass(animation);
        })

        // hide modal with effect
        $('#modal6').on('hidden.bs.modal', function (e) {
          $(this).removeClass (function (index, className) {
              return (className.match (/(^|\s)effect-\S+/g) || []).join(' ');
          });
        });

      })
    </script>
  </body>

</html>
