
<!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">Send Money</h3>
                    <div class="card-header-links">
                        <a href="../send-money/log"
                           class="card-header-link">SEND MONEY LOG</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>Payment Details</h4>
                                <p>Enter your Payment details</p>
                            </div>
                        </div>
                        <div class="single-step <?php echo (isset($_SESSION['send_money_pay']) && ($_SESSION['send_money_pay']==true)) ? 'current': '' ?> ">
                            <div class="number">02</div>
                            <div class="content">
                                <h4>Success</h4>
                                <p>Successfully Payment</p>
                            </div>
                        </div>
                    </div>
                    <?php

                        if(isset($_SESSION['send_money_pay']) && ($_SESSION['send_money_pay']==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['send_money_amount'];  ?> Send Money Successfully</h2>
            <p>The Send Money has been successfully sent to the <?php echo ucwords($_SESSION['notifyUser2']); ?></p>
            <p>Transaction ID: <?php echo $_SESSION['trans_id'];  ?> </p>
            <a href="../send-money" class="site-btn">
                <i class="anticon anticon-plus"></i>Send Money again
            </a>
        </div>
    </div>                    
                    
                   <?php unset( $_SESSION['send_money_amount']); unset( $_SESSION['trans_id']); unset( $_SESSION['send_money_pay']); unset($_SESSION['notifyUser2']);  }else{  ?>
<div class="progress-steps-form">
        <form action="../php/send-money-now.php" method="post">
            <input type="hidden" name="_token" value="GJ2s3NLFrmVthRdn56m1WtDvOjBfNw8VtfZgqT8D">            <div class="row">
                <div class="col-xl-6 col-md-12">
                    <label for="exampleFormControlInput1" class="form-label">User Email</label>
                    <div class="input-group">
                        <input type="email" name="email" required class="form-control userCheck"
                               placeholder="User Email">
                    </div>
                    <div class="input-info-text notifyUser"></div>
                </div>
                <div class="col-xl-6 col-md-12">
                    <label for="exampleFormControlInput1" class="form-label">Enter Amount</label>
                    <div class="input-group">
                        <input type="text" class="form-control sendAmount" name="amount" required
                               placeholder="Enter Amount" aria-label="Amount"
                               oninput="this.value = validateDouble(this.value)" aria-describedby="basic-addon1">
                        <span class="input-group-text" id="basic-addon1">USD</span>
                    </div>
                    <div
                        class="input-info-text">Minimum 10 USD and Maximum 5000 USD</div>
                </div>
                <div class="col-xl-12 col-md-12 mt-3">
                    <label for="exampleFormControlInput1"
                           class="form-label">Send Money Note (Optional)</label>
                    <div class="input-group">
                        <textarea class="form-control-textarea" placeholder="Send Money Note" name="note"></textarea>
                    </div>
                </div>
            </div>
            <div class="transaction-list table-responsive">
                <div class="user-panel-title">
                    <h3>Send Money Details</h3>
                </div>
                <table class="table">
                    <tbody>
                    <tr>
                        <td><strong>Payment Amount</strong></td>
                        <td><span class="previewAmount"></span> USD</td>
                    </tr>
                    <tr>
                        <td><strong>Charge</strong></td>
                        <td><span class="previewCharge"></span> USD</td>
                    </tr>
                    <tr>
                        <td><strong>User Email</strong></td>
                        <td class="userEmail"></td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div class="buttons">
                <button type="submit" class="site-btn blue-btn">
                    Send Money<i class="anticon anticon-double-right"></i>
                </button>
            </div>
        </form>

    </div>

                </div>
            </div>
        </div>
    </div>
                    <!--Page Content-->
                </div>
            </div>
        </div>
    </div>


    <!-- Automatic Popup -->
    
    <!-- /Automatic Popup End -->
</div>
<?php } ?>
<!--/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>
        $('.userCheck').on('change',function (e) {
            "use strict"
            var email = $(this).val();

            $('.userEmail').text(email)

            var url = '../php/exist.php?email=:email';
            url = url.replace(':email', email);
            $.get(url, function (data) {
                $('.notifyUser').text(data)
            })
        })

        $('.sendAmount').on('keyup',function (e) {
            "use strict"
            var amount = $(this).val();
            $('.previewAmount').text(amount);

            var charge = "6";
            var chargeType = "percentage";


            if (chargeType === 'percentage') {
                var finalCharge = calPercentage(amount, charge)
            } else {
                var finalCharge = charge

            }
            $('.previewCharge').text(finalCharge);
        })


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







</body>
</html>

