<?php
session_start();
ob_start();
include('includes/config.php');
if($_SESSION['name'] == '')
 {
     header("location:index.php");
 }
    else{
        
        ?>
<!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>Forcecrypto Admin</title>
        <link rel="stylesheet" href="css/bootstrap.min.css" media="screen" >
        <link rel="stylesheet" href="css/font-awesome.min.css" media="screen" >
        <link rel="stylesheet" href="css/animate-css/animate.min.css" media="screen" >
        <link rel="stylesheet" href="css/lobipanel/lobipanel.min.css" media="screen" >
        <link rel="stylesheet" href="css/prism/prism.css" media="screen" >
        <link rel="stylesheet" href="css/select2/select2.min.css" >
        <link rel="stylesheet" href="css/main.css" media="screen" >
        <script src="js/modernizr/modernizr.min.js"></script>
    </head>
    <body class="top-navbar-fixed">
        <div class="main-wrapper">

            <!-- ========== TOP NAVBAR ========== -->
  <?php include('includes/topbar.php');?> 
            <!-- ========== WRAPPER FOR BOTH SIDEBARS & MAIN CONTENT ========== -->
            <div class="content-wrapper">
                <div class="content-container">

                    <!-- ========== LEFT SIDEBAR ========== -->
                   <?php include('includes/leftbar.php');?>  
                    <!-- /.left-sidebar -->

                    <div class="main-page">

                     <div class="container-fluid">
                            <div class="row page-title-div">
                                <div class="col-md-6">
                                    <h2 class="title">Reword Withdrawal Accept And Reject</h2>
                                
                                </div>
                                
                                <!-- /.col-md-6 text-right -->
                            </div>
                            <!-- /.row -->
                            <div class="row breadcrumb-div">
                                <div class="col-md-6">
                                    
                                </div>
                             
                            </div>
                            <!-- /.row -->
                        </div>
                        <div class="container-fluid">
                           
                        <div class="row">
                                    <div class="col-md-12">
                                        <div class="panel">
                                            <div class="panel-heading">
                                                <div class="panel-title">
                                                    
                                                </div>
                                            </div>
                                            <div class="panel-body">
<?php if($msg){?>
<div class="alert alert-success left-icon-alert" role="alert">
 <strong>Well done!</strong><?php echo htmlentities($msg); ?>
 </div><?php } 
else if($error){?>
    <div class="alert alert-danger left-icon-alert" role="alert">
                                            <strong>Oh snap!</strong> <?php echo htmlentities($error); ?>
                                        </div>
                                        <?php } ?>
                                               
 <?php


$id=$_GET['ID'];
$Query=mysqli_query($com,"select loginuser.mobile,loginuser.email,loginuser.owncode,bankdetail.name,bankdetail.upi_name,bankdetail.ifsc,bankdetail.bankname,bankdetail.account,`reword_withdrawal`.`id`,`reword_withdrawal`.`payamount`,`reword_withdrawal`.`payout`,`reword_withdrawal`.`status`,`reword_withdrawal`.`createdate` from `reword_withdrawal`
  INNER JOIN loginuser ON loginuser.id=`reword_withdrawal`.`userid`
  INNER JOIN bankdetail ON bankdetail.id=`reword_withdrawal`.`payid`
   where `reword_withdrawal`.`id`='".$id."'");
   $Result=mysqli_fetch_array($Query);
 
//print_r($id);exit;


?>                                           <table class="table">
  <tbody>
    <tr>
      <td style="color: blue; font-size:25px;" scope="col">Mobile:</td>
      <td style="color: blue; font-size:25px;" scope="col" ><?php echo $Result['mobile'];?></td>
      
    </tr>
  
  
    <tr>
      <input type="hidden" id="id" name="id" value="<?php echo $id; ?>">
      <td style="color: blue; font-size:25px;">Date:</td>
      <td style="color: blue; font-size:25px;"><?php echo $convert=date('d-m-Y',strtotime($Result['createdate']));?></td>
      
    </tr>
    
      <tr>  
      <td style="color: blue; font-size:25px;" scope="col">Pay Amount:</td>
      <td style="color: blue; font-size:25px;" scope="col"><i class="red_txt" style="font-size:25px;"><?php echo number_format($Result['payamount'],2);?></i></td>
      
    </tr>
    
    </tbody>
    </table>
               <h4 style="color: blue; font-size:25px;" ><strong>Upi:</strong> <?php echo $Result['upi_name'];?></h4>
                         
                         <h4 class="ahn" style=""><strong>Account Holder Name:</strong> <?php echo $Result['name'];?></h4>
                         
                          <h4 class="bn" style=""><strong>Bank Name:</strong> <?php echo $Result['bankname'];?></h4>
                          <h4 class="ifsc" style=""><strong>IFSC Code:</strong> <?php echo $Result['ifsc'];?></h4>
                          <h4 class="acn" style=""><strong>Account Number:</strong> <?php echo $Result['account'];?></h4>
                       <br>   
                      <div class="col-md-12">
                      <div class="row">
                        <div class="col-md-6 text-center"> 
						<a onclick="acceptreject(1)" class="btn btn-success"><strong><i class="fa fa-check"></i> Accepted</strong></a></div>
                        
                        <div class="col-md-6 text-center"> 
						<a onclick="acceptreject(2)" class="btn btn-danger"><strong><i class="fa fa-times"></i> Rejected</strong></a></div>
						
                      </div>                                 

                                            </div>
                                        </div>
                                    </div>
                                    <!-- /.col-md-12 -->
                                </div>
                    </div>
                </div>
                <!-- /.content-container -->
            </div>
            <!-- /.content-wrapper -->
        </div>
        <!-- /.main-wrapper -->
        <script src="js/jquery/jquery-2.2.4.min.js"></script>
        <script src="js/bootstrap/bootstrap.min.js"></script>
        <script src="js/pace/pace.min.js"></script>
        <script src="js/lobipanel/lobipanel.min.js"></script>
        <script src="js/iscroll/iscroll.js"></script>
        <script src="js/prism/prism.js"></script>
        <script src="js/select2/select2.min.js"></script>
        <script src="js/main.js"></script>
        <script>
            $(function($) {
                $(".js-states").select2();
                $(".js-states-limit").select2({
                    maximumSelectionLength: 2
                });
                $(".js-states-hide").select2({
                    minimumResultsForSearch: Infinity
                });
            });
        </script>
        <script>
			    function acceptreject(val) {
                 var id = document.getElementById('id').value; 
                 var type = val;
                   $.ajax({
                   type: "Post",
                    data: { id: id,type : type},
                   url: "reword_manage_withdrawaAction.php",
                   success: function (html) {
                       
                       window.location = 'reword_withrequest.php';
                       
                   },
                   
                   
               });

       }
</script>
    </body>
</html>
<?PHP } ?>
