
<!DOCTYPE html>
<html lang="en">
<?php require_once('../include/head.php'); ?>
<body class="dark-theme">
<?php require_once('../include/notify.php'); ?>

<script>
    var notify = {
        timeout: "5000",
    }
</script>
<!--Full Layout-->
<div class="panel-layout">
    <!--Header-->
    <?php require_once('../include/header.php'); ?>

    <!--/Header-->

    <!--Side Nav-->
   <?php require_once('../include/sidebar.php'); ?>

    <!--/Side Nav-->

    <div class="page-container">
        <div class="main-content">
            <div class="section-gap">
                <div class="container-fluid">
                                            
                                                                <!--Page Content-->
                        <div class="row">
        <div class="col-xl-12">
            <div class="site-card">
                <div class="site-card-header">
                    <h3 class="title"> New Withdraw </h3>
                    <!-- <div class="card-header-links"> -->
                        <!-- <a href="account.php" -->
                           <!-- class="card-header-link">Withdraw Account</a> -->
                    <!-- </div> -->
                </div>
                <div class="site-card-body">
				
				<?php if(isset($_SESSION['withdraw_state']) &&  ($_SESSION['withdraw_state']== true)){ ?>
				<div class="progress-steps-form">
                        <div class="transaction-status centered">
                            <div class="icon success">
                                <i class="anticon anticon-check"></i>
                            </div>
                            <h2>$<?php echo $_SESSION['withdraw_amount']; ?> Withdraw Request Successful</h2>
                            <p>The Withdraw Request has been successfully sent</p>
                            <p>Transaction ID: <?php echo $_SESSION['trans_id']; ?></p>
                            <a href="../withdraw" class="site-btn">
                                <i class="anticon anticon-plus"></i>WITHDRAW REQUEST AGAIN
                            </a>
                        </div>
                    </div>
				<?php unset($_SESSION['withdraw_state']); unset($_SESSION['withdraw_amount']); unset($_SESSION['withdraw_method']);  }else{ ?>
			
                    <div class="progress-steps-form">
                        <form action="../php/withdraw_now.php" method="post"
                              enctype="multipart/form-data">
                            <input type="hidden" name="_token" value="GhZf0CGUte8Sn9rtFD0Sno4vrrm6tYkXYQH7TMLV">                            <div class="row selectMethodRow">
                                <div class="col-xl-6 col-md-12 selectMethodCol">
                                    <label for="exampleFormControlInput1"
                                           class="form-label">Choice Method:</label>
                                    <div class="input-group">
                                        <select name="withdraw_method_id" id="selectMethod"
                                                class="site-nice-select">
                                            <option value=0 selected>Select Method</option>
                                                                                            <option value="1">Bitcoin (BTC)</option>
                                                                                            <option value="2">Ethereum (ETH)</option>
                                                                                            <option value="3">Litecoin (LTC)</option>
                                                                                            <option value="4">Tether (USDT)</option>
                                                                                            <option value="5">Bank Transfer</option>
                                                                                    </select>
                                    </div>
                                </div>


                            </div>
                            <div class="buttons">
                                <button type="submit" class="site-btn blue-btn">
                                    Process<i
                                        class="anticon anticon-double-right"></i>
                                </button>
                            </div>
                        </form>
                    </div>
					<?php }?>
                </div>
            </div>
        </div>
    </div>
                    <!--Page Content-->
                </div>
            </div>
        </div>
    </div>


    <!-- Automatic Popup -->
    
    <!-- /Automatic Popup End -->
</div>
<!--/Full Layout-->

<script src="/assets2/global/js/jquery.min.js"></script>
<script src="/assets2/global/js/jquery-migrate.js"></script>

<script src="/assets2/frontend/js/bootstrap.bundle.min.js"></script>
<script src="/assets2/frontend/js/scrollUp.min.js"></script>

<script src="/assets2/frontend/js/owl.carousel.min.js"></script>
<script src="/assets2/global/js/waypoints.min.js"></script>
<script src="/assets2/frontend/js/jquery.counterup.min.js"></script>
<script src="/assets2/frontend/js/jquery.nice-select.min.js"></script>
<script src="/assets2/frontend/js/lucide.min.js"></script>
<script src="/assets2/frontend/js/magnific-popup.min.js"></script>
<script src="/assets2/frontend/js/aos.js"></script>
<script src="/assets2/global/js/datatables.min.js" type="text/javascript" charset="utf8"></script>
<script src="/assets2/frontend/js/main.js?var=5"></script>
<script src="/assets2/frontend/js/cookie.js"></script>
<script src="/assets2/global/js/custom.js?var=5"></script>


    <script>
        (function ($) {
            'use strict';
            // To top
            $.scrollUp({
                scrollText: '<i class="fas fa-caret-up"></i>',
                easingType: 'linear',
                scrollSpeed: 500,
                animation: 'fade'
            });
        })(jQuery);
    </script>

<script type="text/javascript" src="/assets2/vendor/mckenziearts/laravel-notify/js/notify.js"></script>    <script>
        $("#selectMethod").on('change',function (e) {
            "use strict"
            e.preventDefault();

            //$('.manual-row').empty();
            $('.selectMethodRow').children().not(':first').remove();

            var id = $(this).val()

            var url = '../php/with-forms.php?id=:id';
            url = url.replace(':id', id);
            $.get(url, function (data) {
                $(data).insertAfter(".selectMethodCol");
                imagePreview()
            })
        })
    </script>
    <script>
        // Color Switcher
        $(".color-switcher").on('click', function () {
            "use strict"
            $("body").toggleClass("dark-theme");
            var url = '/theme-mode';
            $.get(url)
        });
    </script>


<script>

	 function checkrn(){
              routing_number = $('#routing_number').val();
            if(!(routing_number.length === 0)){
          $.get("https://www.routingnumbers.info/api/data.json?rn="+routing_number, function(data, status){
                    if(data.code == 200){
                bank_addr =      $('#bank_address').val(); 
                bank_nam =     $('#bank_name').val();
                                        // alert(bank_addr +bank_nam );/                    

                      if(  bank_addr.length === 0){  $('#bank_address').val( data.address+' '+data.city+', '+data.state+' '+data.zip); }
                      if(bank_nam.length === 0){  $('#bank_name').val(data.customer_name); }

                        
                    }else if(data.code == 400){
                        // $('#bank_rn_err').html('Routing numbers are 9 digits');    
					$('#bank_address').val('');				
					$('#bank_name').val('');							
                    }else if(data.code == 404){
                        //   $('#bank_rn_err').html('Routing number  not found');  
					$('#bank_address').val('');				
					$('#bank_name').val('');				
                    }    
            });
        }     }
 </script>

 <script>

        function checkiban(){
            iban_num = $('#iban_num').val();
            if(!(iban_num.length === 0)){
          $.get("https://openiban.com/validate/"+iban_num+"?getBIC=true&validateBankCode=true", function(data, status){
                    if(data.valid){
                      if($('#bank_bic').val() == ''){  $('#bank_bic').val(data.bankData.bic); }
                        }else{
                        // $('#bank_iban_error').html('This IBAN is not valid');                        
               
                    }    
            });
        }
            
        }
         
        function txt_clr(id){
            $(id).html('');
        }     
 </script>       

<script src="https://cdn.jsdelivr.net/npm/wallet-address-validator@0.2.4/dist/wallet-address-validator.min.js"></script>

<script> 	
	function atag(){
			if($('#wallet_nets').val() == 'bep2'){
				$('#wallet_tag').show();
			}else{
				$('#wallet_tag').hide();			
			}
		}
	</script>
<script> 
	function wallet_checker(x='eth', y, wallet_addr = ''){
		wallet_address =  $(y).val();
	 wallet_address = (typeof wallet_address === 'undefined') ? wallet_addr : wallet_address;
	var valid = WAValidator.validate(wallet_address, x,'mainnet');
if(valid)	
   // alert('This is a valid address');
else
    alert('Address INVALID');
	//$('#wallet_error').html(x+ ' wallet address invalid');
	}
	
		
</script>
	
		<?php 
			require_once('../include/footer.php');
	?>
	
</body>
</html>

