<?php
@session_start();
include "control/activity.php";

 $dd = new activity();
 $loginStatus = $_SESSION['loginDetails'];


  if(isset($_SESSION['loginDetails'])){

  }else{
     header("Location:dashboard.php");
  }

  if($loginStatus == null){
    echo "<script>window.open('logout.php','_self')</script>";
  }
  
  $iid = $_REQUEST['iid'];

  $table = "userdetails";
  $condition = " where user_key='$iid'";
  $fetchUserdetails = $dd->single($table,$condition);
 
  $table = "admin_calculation";
  $condition = null;
  $getAdminDetails = $dd->single($table,$condition);
  
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title><?= $getAdminDetails['title']; ?></title>
</head>
<body>

    <div class="main" id="main">
		  <?php include "menu.php"; ?>
    <div class="right"> 
  <div class="tab-content">


   <?php include "headermenu.php"; ?>


        <!-- Overview -->
         <div id="overview" class="tab-pane active"  >
                <div class="content" >
                  
               <div class="content-wrapper">
                 <div class="container-fluid">

                      <!--======================================================  Content  ====================================================-->                                            
                          <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                              <a href="dashboard.php">ALL-REQUEST</a>
                            </li>
                          </ol>

                          <div class="row">
                              <div class="col-xl-5 col-sm-5 mb-5">
                                 <table class="table table-bordered data-table">
                                    <tr>
                                        <td colspan="5px"><button onclick="kycRequest()" class="btn btn-xs btn-info"> KYC REQUEST</button>
                                            <button class="btn btn-xs btn-info"> WITHDRAW REQUEST</button>
                                    </tr>
                                    <tr>
                                      <td colspan="2">Adhaar Number : <input class="form-control" value="<?= $fetchUserdetails['aadhar_number']; ?>" /></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2">Pan Number : <input class="form-control" value="<?= $fetchUserdetails['pancard_number']; ?>" /></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2">Bank Name : <input class="form-control" value="<?= $fetchUserdetails['bank_name']; ?>"/></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2">Holder Name : <input class="form-control" value="<?= $fetchUserdetails['holderName']; ?>"/></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2">A/C Number : <input class="form-control" value="<?= $fetchUserdetails['account']; ?>"/></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2">IFS Code : <input class="form-control" value="<?= $fetchUserdetails['ifsCode']; ?>"/></td>
                                    </tr>
                                    <tr>
                                        <td><button onclick="goApproval(<?= $iid; ?>)" class="btn btn-block btn-info">Approved Now</button></td>
                                        <td><button onclick="goRejected(<?= $iid; ?>)" class="btn btn-block btn-danger">Reject</button></td>
                                    </tr>
                                 </table>
                              </div>
                          </div>
  
                           
      <!--============  FIN DE L'AJOUT  ===============-->
      
<script>
 function kycRequest()
 {
    window.open('kyc_request_page.php','_self');
 }


 function goApproval(a)
 {
    var ttt = confirm('Are you sure to APPROVED it ?');
    if(ttt == true){
        window.open('getActivity_key_action.php?type=approved&iid='+a,'_self');
    }

 }


 function goRejected(a)
 {
    var ttt = confirm('Are you sure to REJECTED it ?');
    if(ttt == true){
        window.open('getActivity_key_action.php?type=rejected&iid='+a,'_self');
    }
 }

</script>
      
     
      </div>
      <!-- /.container-fluid-->
       </div>  <!-- /content-wrapper-->


                </div>
                </div>
             </div><!--Right panel-->
</div><!--Main-->


</body>
</html>

<?php include "style.php" ?>