    <div class="page-container">
        <div class="main-content">
            <div class="section-gap">
                <div class="container-fluid">
                    <?php if(!$validate_is_true){ ?>
                    <div class="row">
        <div class="col">
            <div class="alert site-alert alert-dismissible fade show" role="alert">
                <div class="content">
                    <div class="icon"><i class="anticon anticon-warning"></i></div>
                                            You need to
                        <strong>Validate your account</strong> to enable you withdraw.
                                    </div>
                                   
                            </div>
        </div>
    </div><?php } ?>
<!--Page Content-->
                        <div class="row">
        <div class="col-xl-12">
            <div class="site-card">
                <div class="site-card-header">
                    <h3 class="title">Add Money</h3>
                    <div class="card-header-links">
                        <a href="/user/withdraw/log"
                           class="card-header-link">Withdrawal History</a>
                    </div>
                </div>
                <?php if(explode(',', $GLOBALS['toast_alert'])[0] == false || explode(',', $GLOBALS['toast_alert'])[2] == "'method'"){ ?>
                <div class="site-card-body">
                    <div class="progress-steps">
                        <div class="single-step current">
                            <div class="number">01</div>
                            <div class="content">
                                <h4>Withdrawal Amount</h4>
                                <p>Enter your Withdrawal details</p>
                            </div>
                        </div>
                        <div class="single-step ">
                            <div class="number">02</div>
                            <div class="content">
                                <h4>Success</h4>
                                <p>Success Your Withdrawal</p>
                            </div>
                        </div>
                    </div>
                    <div class="progress-steps-form">
                    <div class="row">
                            <div class="col-md-6 m-b-30">
                                <div class="site-card h-100 mb-0">
                                    <div class="site-card-header d-flex justify-content-between">
                                        <div class="card-heading">
                                            <h4 class="card-title">Withdrawal Method</h4>
                                        </div>
                                        <div class="dropdown">
                                            <button class="btn btn-round btn-primary btn-sm" data-bs-target="#AddWithdrawModal"  data-bs-toggle="modal" aria-expanded="false"><i class="anticon anticon-plus"></i> Add Method </button>
                                        </div>
                                    </div>
                                    <div class="card-body">                                        
                                          <?php                                       
                                        foreach($get_withdraw_m as $wsingle){
                                        ?>
                                        <div class="row active-task m-b-20">
                                            <div class="col-xs-1">
                                                <div class="bg-type bg-orange mb-1 mb-xs-0 mt-1">
                                                    <span>
                                                        <?php 
                                                        $PMname = explode(' ', $wsingle['withdraw_type']);
                                                        if(count($PMname)>1){
                                                                foreach($PMname as $Jname){
                                                                    echo substr($Jname,0,1); 
                                                                }}else{
                                                                    echo substr($wsingle['withdraw_type'],0,1); 
                                                                }
                                                                    ?></span>
                                                </div>
                                            </div>
                                            <div class="col-11">
                                                <small class="d-block mb-1"><?php echo $wsingle['withdraw_type']; ?></small>
                                                <h5 class="mb-0"><a><?php echo $wsingle['withdraw_data']; ?></a></h5>
                                                <ul class="list-unstyled list-inline">
                                                    <li class="list-inline-item">
                                                        <small><a href="/user/withdraw?deleteM=<?php echo $wsingle['withdraw_m_id']; ?>" class="text-danger"> Delete </a></small>
                                                    </li>
                                                    <li class="list-inline-item">|</li>
                                                    <li class="list-inline-item">
                                                        <small>Dated added: <?php echo $wsingle['created_at']; ?></small>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
        
                                       <?php } ?> 
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6 m-b-30">
                            <div class="site-card h-100 mb-0">

                                    <div class="site-card-header">
                                        <h4 class="site-card-title">Withdraw Funds</h4>
                                    </div>
                                    <div class="site-card-body">
                                    <form action="/user/withdraw" method="POST" onsubmit="return checksubmit()" class="w-100">
                                                        <div class="col-xs-12">
                                                        <?php //echo $alert_msg_NEWiVT; ?>
                                                            <div class="mb-3">
                                                                <label>Select Payment Method</label>
                                                                <div class="input-group">
                                                                    <select class="form-control" id="bacs" name="method" required>
                                                                    <?php
                                                                         foreach($get_withdraw_m as $wsingle){
                                                                         ?>
                                                                        <option value="<?php echo $wsingle['withdraw_type']; ?>"><?php echo $wsingle['withdraw_type']; ?> - <?php echo $wsingle['withdraw_data']; ?></option>
                                                                            <?php } ?>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                            <input type="hidden" name="address" id="" value="<?php echo $wsingle['withdraw_data']; ?>">
                                                            <div class=" mb-3  w-100">
                                                                <label>Enter Amount</label>
                                                                <div class="input-group w-100">
                                                                        <label class="input-group-text  px-2" for="visa1"><i class="anticon anticon-dollar"></i> </label>
                                                                    <input type="number" name="amount" id="withD_amt" class="form-control" value="" placeholder="0" min="10" required>
                                                                </div>
                                                                <div class="w-100 d-flex justify-content-between">
                                                                <!-- <small>Minimum Withdrawal: 0.0005 BTC</small>
                                                                <small>Maximum Withdrawal: 5.00 BTC</small> -->
                                                            </div>
                                                            </div>
                                                            <div class=" mb-3  w-100">
                                                                <label>Available Balance</label>
                                                                <div class="input-group w-100">
                                                                        <label class="input-group-text px-2"  for="visa1"><i class="anticon anticon-wallet"></i>  Main Wallet</label>
                                                                    <input type="text" class="form-control" value="<?php echo $wallet_balance; ?>" readonly>
                                                                </div>
                                                            </div>
                                                            
                                                        </div>
                                                        <div class="col-12 d-flex justify-content-center">
                                                            <button class="site-btn blue-btn" type="submit" name="make_withdrawal" <?php echo ($validate_is_true)?'':'disabled'; ?>>Withdraw Funds</button>
                                                        </div>
                                                        </form>
                                                        <script>
                                                            function checksubmit(){
                                                                var totalBal = '<?php echo $wallet_balance ?>';
                                                                if(parseInt(totalBal) < document.querySelector('#withD_amt').value){     
                                                                    Swal.fire({
                                                                        icon: 'warning',
                                                                        title: 'Balance too Low for Withdrawal',
                                                                        text: 'Upgrade your Account, and try again!'
                                                                    });
                                                                    return false;
                                                                }
                                                                return true;
                                                            }
                                                        </script>
                            </div>
                            </div>
                        </div>
                        
                    </div>







                    </div>
                </div>
                <?php }else{ //print_r($GLOBALS['toast_alert']); 
                $data = explode(':',trim(explode(',', $GLOBALS['toast_alert'])[2],"'")); 
                ?>

                    <div class="site-card-body">
                    <div class="progress-steps">
                        <div class="single-step current">
                            <div class="number">01</div>
                            <div class="content">
                                <h4>Deposit Amount</h4>
                                <p>Enter your deposit details</p>
                            </div>
                        </div>
                        <div class="single-step current">
                            <div class="number">02</div>
                            <div class="content">
                                <h4>Success</h4>
                                <p>Success Your Deposit Process</p>
                            </div>
                        </div>
                    </div>
                        <div class="progress-steps-form">
        <div class="transaction-status centered">
            <div class="icon success">
                <i class="anticon anticon-check"></i>
            </div>
            <h2>$<?php echo $data[1]; ?> Withdrawal Processing</h2>
            <p><?php echo $data[2]; ?></p>
            <p>Transaction ID: <?php echo $data[0]; ?> </p>
            <a href="/user/withdraw" class="site-btn">
                <i class="anticon anticon-plus"></i>Withdraw again
            </a>
        </div>
    </div>
                </div>
                    <?php } ?>
            </div>
        </div>
    </div>
                    <!--Page Content-->
                </div>
            </div>
        </div>
    </div>  

<!-- end app -->
<div class="modal fade" id="AddWithdrawModal"  data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="AddWithdrawModal" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content" style="height: 100% !important; top:0 !important;">
            <div class="modal-body site-card">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <div class="animate-bottom">
                    <div class=" row">
                        <div class="col-md-12">
                            <h4 class="text-center">Add Withdrawal Method</h4>
                            <div class="site-card-body">
                                            <h4>Select Payment Method</h4>
                                            <div class="row">
                                            <label class="dispPM col-sm-6 col-12 border-dark d-flex align-items-center justify-content-center p-3 my-1" style="height: 50px; position:relative;" for="bitcoinR">
                                                <div class="w-100 d-flex justify-content-between align-items-center px-lg-2" style="position:relative" >
                                                    <div class="form-inline">
                                                        <input type="radio" name="paymentMethod" id="bitcoinR" value="bitcoin" onclick="paymentMethod(this.value)" style="background:lightgrey; margin:5px; width:20px; height:20px; " checked="checked">
                                                        <label style="color:goldenrod;" for="bitcoinR">Bitcoin <span style="color:white;font-size:0.7em;" class="px-1">[within 24 hours]</span> </label>
                                                    </div>
                                                    <img src="/assets/img/BC_Logo.png" class="img-fluid" width="10%" >
                                                </div>
                                            </label>
                                            <label class="dispPM col-md-6 col-12 border-dark d-flex align-items-center justify-content-center p-3 my-1" style="height: 50px; position:relative;"  for="etherR">
                                                <div class="w-100 d-flex justify-content-between align-items-center px-lg-2" style="position:relative">
                                                    <div class="form-inline">
                                                        <input type="radio" name="paymentMethod" id="etherR" value="ether" onclick="paymentMethod(this.value)" style="background:lightgrey; margin:5px; width:20px; height:20px; " checked="checked">
                                                        <label style="color:cyan;"  for="etherR">Ethereum <span style="color:white;font-size:0.7em;" class="px-1">[within 24 hours]</span> </label>
                                                    </div>
                                                    <img src="/assets/img/eth.png" class="img-fluid" width="10%" >
                                                </div>
                                            </label>

                                            <label class="dispPM col-md-6 col-12  border-dark d-flex align-items-center justify-content-center p-3 my-1" style="height: 50px; position:relative;"  for="bankR">
                                                <div class="w-100 d-flex justify-content-between align-items-center px-lg-2" style="position:relative">
                                                    <div class="form-inline">
                                                        <input type="radio" name="paymentMethod" id="bankR" value="bank" onclick="paymentMethod(this.value)" style="background:lightgrey; margin:5px; width:20px; height:20px; " disabled>
                                                        <label style="color:lightgreen;"  for="bankR">Bank Transfer <span style="color:white;font-size:0.7em;" class="px-1">[unavailable]</span> </label>
                                                    </div>
                                                    <img src="/assets/img/Bank.png" class="img-fluid" width="10%" >
                                                </div>
                                            </label>
                                            <label class="dispPM col-md-6 col-12  border-dark d-flex align-items-center justify-content-center p-3 my-1" style="height: 50px; position:relative;"  for="paypalR">
                                                <div class="w-100 d-flex justify-content-between align-items-center px-lg-2">
                                                    <div class="form-inline">
                                                        <input type="radio" name="paymentMethod" id="paypalR" value="paypal" onclick="paymentMethod(this.value)" style="background:lightgrey; margin:5px; width:20px; height:20px; ">
                                                        <label style="color:lightblue;"  for="paypalR">Paypal  <span style="color:white;font-size:0.7em;" class="px-1">[within 24 hours]</span> </label>
                                                    </div>
                                                    <img src="/assets/img/paypal.png" class="img-fluid" width="20%" >
                                                </div>
                                            </label>
                                            <label class="dispPM col-md-6 col-12  border-dark d-flex align-items-center justify-content-center p-3 my-1" style="height: 50px; position:relative;" for="pmR">
                                                <div class="w-100 d-flex justify-content-between align-items-center px-lg-2">
                                                    <div class="form-inline">
                                                        <input type="radio" name="paymentMethod" id="pmR" value="pm" onclick="paymentMethod(this.value)" style="background:lightgrey; margin:5px; width:20px; height:20px; " disabled>
                                                        <label style="color:red; font-family:'Times New Roman', Times, serif;font-size:1.2em"  for="pmR">Perfect Money </label><span style="color:white;font-size:0.7em; font-family:sans-serif;font-weight:bold" class="px-1">[unavailable]</span>
                                                    </div>
                                                    <img src="/assets/img/pm.png" class="img-fluid" width="10%" >
                                                </div>
                                            </label>
                                            <label class="dispPM col-md-6 col-12  border-dark d-flex align-items-center justify-content-center p-3 my-1" style="height: 50px; position:relative;" for="cashappR">
                                                <div class="w-100 d-flex justify-content-between align-items-center px-lg-2">
                                                    <div class="form-inline">
                                                        <input type="radio" name="paymentMethod"  id="cashappR" value="cashapp" onclick="paymentMethod(this.value)" style="background:lightgrey; margin:5px; width:20px; height:20px; ">
                                                        <label style="color:lightgreen;" for="cashappR">Cash App  <span style="color:white;font-size:0.7em;" class="px-1">[within 24 hours]</span> </label>
                                                    </div>
                                                    <img src="/assets/img/cash-app.png" class="img-fluid" width="20%" >
                                                </div>
                                            </label>
                                            </div>
                                            <div class="form-row disptab" id="bitcoinM">
                                                                <div><h4 class="pt-2">Add Bitcoin Address</h4></div>
                                                                <form method="POST" action="/user/withdraw" class="w-100">
                                                                <div class="form-group col-md-12">
                                                                    <label for="walletbtc">Wallet Address</label>
                                                                    <input type="text" class="form-control" id="walletbtc"
                                                                        name="withdraw_data" placeholder="Wallet Address"
                                                                        value="" required>
                                                                </div>
                                                               
                                                                <div class="form-group col-md-12">
                                                                    <label for="btcnetwork">Network</label>
                                                                    <input type="text" class="form-control" id="btcnetwork"
                                                                        name="btcnetwork"  placeholder=""
                                                                        value="BITCOIN" readonly>
                                                                </div>
                                                                <button type="submit" name="AddWithdrawM" value="Bitcoin" class="site-btn blue-btn mt-3">Add Bitcoin Address</button>
                                                                </form>
                                            </div>
                                            <div class="form-row disptab" id="EtherM">
                                                                <h4 class="pt-2">Add Ethereum Address</h4>
                                                                <form method="POST" action="/user/withdraw" class="w-100">
                                                                <div class="form-group col-md-12">
                                                                    <label for="bank_name">Wallet Address</label>
                                                                    <input type="text" class="form-control" id="wallet_address"
                                                                        name="withdraw_data" placeholder="Wallet Address"
                                                                        value="" required>
                                                                </div>
                                                                <div class="form-group col-md-12">
                                                                    <label for="network">Network</label>
                                                                    <input type="text" class="form-control" id="network"
                                                                        name="network"  placeholder=""
                                                                        value="ERC20" readonly>
                                                                </div>
                                                                <button type="submit" value="Bitcoin" name="AddWithdrawM" class="site-btn blue-btn mt-3">Add Bitcoin Address</button>
                                                                </form>
                                                                
                                            </div>
                                            <div class="form-row disptab" id="PaypalM">
                                                                <h4 class="pt-2">Add Paypal Account</h4>
                                                                <form method="POST" action="/user/withdraw" class="w-100">
                                                                <div class="form-group col-md-12">
                                                                    <label for="bank_name">Paypal Email Address</label>
                                                                    <input type="text" class="form-control" id="pp_email"
                                                                        name="withdraw_data" placeholder="Enter Email Address"
                                                                        value="" required>
                                                                </div>
                                                                <button type="submit" value="Paypal" name="AddWithdrawM" class="site-btn blue-btn mt-3">Add Paypal</button>
                                                                </form>
                                            </div>
                                            <div class="form-row disptab" id="CashappM">
                                                                <h4 class="pt-2">Add Cash App</h4>
                                                                <form method="POST" action="/user/withdraw" class="w-100">
                                                                <div class="form-group col-md-12">
                                                                    <label for="bank_name">Cash App Tag</label>
                                                                    <input type="text" class="form-control" id="cashapp_tag"
                                                                        name="withdraw_data" placeholder="CashApp Tag"
                                                                        value="" required>
                                                                </div>
                                                                <button type="submit" value="Cash App" name="AddWithdrawM" class="site-btn blue-btn mt-3">Add CashApp Tag</button>
                                                                </form>
                                            </div>
                                            <div class="form-row disptab" id="BankAccM">
                                                                <h4 class="pt-2">Add Bank Account</h4>
                                                                <form method="POST" action="/user/withdraw" class="w-100">
                                                                <div class="form-group col-md-12">
                                                                    <label for="bank_name">Bank Name</label>
                                                                    <input type="text" class="form-control" id="bank_name"
                                                                        name="bank_name" placeholder="Exp: JP Morgan Chase Bank"
                                                                        value="" required>
                                                                </div>
                                                                <div class="form-group col-md-12">
                                                                    <label for="bank_acct_name">Account Name</label>
                                                                    <input type="text" class="form-control" id="bank_acct_name"
                                                                        name="bank_acct_name"  placeholder="John Doe"
                                                                        value="" required>
                                                                </div>
                                                                <div class="form-group col-md-12">
                                                                    <label for="acct_no">Account Number</label>
                                                                    <input type="text" class="form-control" id="acct_no"
                                                                        name="acct_no" placeholder="12345xxxxx"
                                                                        value="" required>
                                                                </div>
                                                                <div class="form-group col-md-12">
                                                                    <label for="routing_no">Routing Number</label>
                                                                    <input type="text" class="form-control" id="routing_no"
                                                                        name="routing_no" placeholder="12345xxxxxxxxxxx"
                                                                        value="" required>
                                                                        <input type="hidden" class="form-control" id="routing_no"
                                                                        name="bbcc_chk" value="false"
                                                                        value="" required>
                                                                </div>
                                                                <button type="submit" name="addBank" class="site-btn blue-btn mt-3">Add Bank Account</button>
                                                                </form>
                                            </div>
                                            <script>
                                               function paymentMethod(data){
                                                var disptab = document.querySelectorAll('.disptab');
                                                // console.log(disptab);
                                                for(i=0; i<disptab.length; i++){
                                                    disptab[i].style.display = 'none';
                                                }
                                                // alert(data);
                                                    if(data == 'bitcoin'){
                                                        document.querySelector('#bitcoinM').style.display = 'flex';
                                                    }
                                                    if(data == 'ether'){
                                                        document.querySelector('#EtherM').style.display = 'flex';
                                                    }
                                                    if(data == 'bank'){
                                                        document.querySelector('#BankAccM').style.display = 'flex';
                                                    }
                                                    if(data == 'paypal'){
                                                        document.querySelector('#PaypalM').style.display = 'flex';
                                                    }
                                                    if(data == 'cashapp'){
                                                        document.querySelector('#CashappM').style.display = 'flex';
                                                    }
                                                }
                                            </script>
                                        </div>    
                                    </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>