
<!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">
                                            
                        <div class="row">
       <?php  require_once('../include/kyc.php'); ?>

    </div>
                                        <!--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="../deposit/log"
                           class="card-header-link">Deposit History</a>
                    </div>
                </div>
                <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 <?php echo (isset($_SESSION['deposit_success'])) ? 'current':null; ?>">
                            <div class="number  ">02</div>
                            <div class="content">
                                <h4>Success</h4>
                                <p>Success Your Deposit</p>
                            </div>
                        </div>
                    </div>
             <?php  if(isset($_SESSION['deposit_success']) &&($_SESSION['deposit_success'] ==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['pay_amount_usd']; ?> deposit marked as paid </h2>
            <p>The deposit is still pending and will be added to your wallet shortly</p>
            <p>Transaction ID: <?php echo $_SESSION['trans_id']; unset($_SESSION['deposit_success']); unset($_SESSION['pay_amount_usd']);unset($_SESSION['trans_id']); ?></p>
            <a href="../" class="site-btn">
                <i class="anticon anticon-plus"></i>Add Money again
            </a>
        </div>
    </div>
		<?php }else{?>
                        <div class="progress-steps-form">
        <form action="../php/now.php" method="post" enctype="multipart/form-data">
            <input type="hidden" name="_token" value="GJ2s3NLFrmVthRdn56m1WtDvOjBfNw8VtfZgqT8D">            <div class="row">
                <div class="col-xl-6 col-md-12 mb-3">
                    <label for="exampleFormControlInput1" class="form-label">Payment Method:</label>
                    <div class="input-group">
                        <select required name="gateway_code" id="gatewaySelect" class="site-nice-select">
                            <option selected disabled>--Select Gateway--</option>
                                                            <option value="bitcoin">Bitcoin</option>
                                                            <option value="ethereum">Ethereum</option>
                                                            <option value="tether1">Tether USDT (ERC20)</option>
                                                            <option value="tether3">Tether USDT (TRC20)</option>
                                                            <!--<option value="tether2">Tether USDT (BEP2)</option>-->
                                                            <!--<option value="bnb">BNB (BEP20)</option>-->
                                                            <!--<option value="binance_coin">BNB (BEP2)</option>-->
                                                         
                                                    </select>
                    </div>
                    <div class="input-info-text charge"></div>
                </div>
                <div class="col-xl-6 col-md-12">
                    <label for="exampleFormControlInput1" class="form-label">Enter Amount:</label>
                    <div class="input-group">
                        <input required type="text" name="amount" class="form-control"
                               oninput="this.value = validateDouble(this.value)" aria-label="Amount" id="amount"
                               aria-describedby="basic-addon1">
                        <span class="input-group-text" id="basic-addon1">USD</span>
                    </div>
                    <div class="input-info-text min-max"></div>
                </div>

            </div>

            <div class="row manual-row">

            </div>


            <div class="transaction-list table-responsive">
                <div class="user-panel-title">
                    <h3>Review Details:</h3>
                </div>
                <table class="table">
                    <tbody>
                    <tr>
                        <td><strong>Amount</strong></td>
                        <td><span class="amount"></span> <span class="currency"></span></td>
                    </tr>
                    <tr>
                        <td><strong>Charge</strong></td>
                        <td class="charge2"></td>
                    </tr>
                    <tr>
                        <td><strong>Payment Method</strong></td>
                        <td id="logo"><img src="" class="payment-method" alt=""></td>
                    </tr>
                    <tr>
                        <td><strong>Total</strong></td>
                        <td class="total"></td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <button type="submit" class="site-btn blue-btn">
                    Proceed to Payment<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>

var globalData;
data_img = {"bitcoin":"btc","ethereum":"eth", "tether":"usdt","tether1":"usdt","tether2":"usdt","tether3":"usdt", "bnb":"bnb",'binance_coin':"bnb" };

 var globalData2 = {"minimum_deposit":"100", "maximum_deposit":"unlimited", "charge_type":0, "charge":0, "logo":null};
// var globalData2 = JSON.parse(globalData2);
data = globalData2;
        var currency = "USD"
        $("#gatewaySelect").on('change',function (e) {
            "use strict"
            e.preventDefault();

            $('.manual-row').empty();

            var code = $(this).val()

            var url = '../php/index.php?code';
            url = url.replace(':code', code);
            // $.get(url, function (data) {

                
                globalData = data;
                code_name = code;
                $('.charge').text('Charge ' + data.charge + ' ' + (data.charge_type === 'percentage' ? ' % ' : currency))
                $('.min-max').text('Minimum ' + data.minimum_deposit + ' ' + currency + ' and ' + 'Maximum ' + data.maximum_deposit + ' ' + currency)
                if(code.toLowerCase().includes('tether')){ var code_name ='Tether'.toUpperCase(); }
                if(code.toLowerCase().includes('binance_coin')){ var code_name ='BNB'.toUpperCase(); }
                $('#logo').html(` <img class="payment-method" src='${"https://assets.coingate.com/images/crypto-svgs/"+data_img[code]+".svg"}' > ${ code_name  }`);

                var amount = $('#amount').val()

                if (Number(amount) > 0) {

                    $('.amount').text((Number(amount)))

                    var charge = data.charge_type === 'percentage' ? calPercentage(amount, data.charge) : data.charge
                    $('.charge2').text(charge + ' ' + currency)

                    $('.total').text((Number(amount) + Number(charge)) + ' ' + currency)
                }


                if (data.credentials !== undefined) {
                    $('.manual-row').append(data.credentials)
                    imagePreview()
                }


            // });

            $('#amount').on('keyup',function (e) {
                "use strict"

                var amount = $(this).val()
                $('.amount').text((Number(amount)))

                $('.currency').text(currency)

                var charge = globalData.charge_type === 'percentage' ? calPercentage(amount, globalData.charge) : globalData.charge
                $('.charge2').text(charge + ' ' + currency)

                $('.total').text((Number(amount) + Number(charge)) + ' ' + currency)
            })


        });
    </script>
    <script>
        // Color Switcher
        $(".color-switcher").on('click', function () {
            "use strict"
            $("body").toggleClass("dark-theme");
            var url = 'https://app.hyiprio.xyz/theme-mode';
            $.get(url)
        });
    </script>




<?php 
	if(isset($_SESSSION['deposit_success'])){
		unset($_SESSSION['deposit_success']);
	}
?>

	<?php 
			require_once('../include/footer.php');
	?>

</body>
</html>

