<?php require_once('../php/singles.php'); ?>
<!DOCTYPE html>
<html lang="en">
	<?php 
			require_once('../include/head.php');
	?>
<body class="dark-theme">
<script>
    var notify = {
        timeout: "5000",
    }
</script>
<!--Full Layout-->
<div  class="panel-layout">

	<?php 
	    if(!($infos['get_bonus'])){
			include('../include/bonus.php');
			$q="update info set get_bonus ='1' where email = '$mail'";
			mysqli_query($conn,$q);
	    }
	?>

    <!--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-3 col-lg-3 col-md-4 col-sm-6 col-12">
        <div class="user-ranking" >
            <h4>Level <?php  echo $infos['level']; ?></h4>
            <p> Member</p>
            <div class="rank" data-bs-toggle="tooltip" data-bs-placement="top" title="By signing up to the account">
                <img src="/assets2/global/images/sCQgIyl0OKzFiO73nmWF.svg" alt="">
            </div>
        </div>
    </div>
            <div class="col-xl-9 col-lg-9 col-md-8 col-sm-12 col-12">
            <div class="site-card">
                <div class="site-card-header">
                    <h3 class="title">Referral URL</h3>
                </div>
                <div class="site-card-body">
                    <div class="referral-link">
                        <div class="referral-link-form">
                            <input type="text" value="<?php echo $website_link; ?>/register.php?ref=<?php echo md5(strtolower($infos['uname'])); ?>" id="refLink"/>
                            <button type="submit" onclick="copyRef()">
                                <i class="anticon anticon-copy"></i>
                                <span id="copy">Copy Url</span>
                                <input id="copied" hidden value="Copied">
                            </button>
                        </div>
                        <p class="referral-joined">
                            0 peoples are joined by using this URL
                        </p>
                    </div>
                </div>
            </div>
        </div>
    
</div>

    
    <div class="row user-cards">
	
	 <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">
        <div class="single">
            <div class="icon"><i class="anticon anticon-dollar"></i></div>
            <div class="content">
                <h4 > <span class="count"><?php echo ($infos['bal'] + $infos['profit']); ?></h4>
                <p>Main Balance</p>
            </div>
        </div>
    </div>
	
    <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">
        <div class="single">
            <div class="icon"><i class="anticon anticon-inbox"></i></div>
            <div class="content">
                <h4><span class="count"><?php echo $total_trans; ?></span></h4>
                <p>All Transactions</p>
            </div>
        </div>
    </div>
   
    <!--<div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">-->
    <!--    <div class="single">-->
    <!--        <div class="icon"><i class="anticon anticon-check-square"></i></div>-->
    <!--        <div class="content">-->
    <!--            <h4><b>$</b><span class="count"><?php echo $total_invest_sum; ?></span></h4>-->
    <!--            <p>Total Investment</p>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--</div>-->
    <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">
        <div class="single">
            <div class="icon"><i class="anticon anticon-credit-card"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo $infos['profit']; ?></span></h4>
                <p>Total Profit</p>
            </div>
        </div>
    </div>
	 <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">
        <div class="single">
            <div class="icon"><i class="anticon anticon-file-add"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo $total_deposit_sum; ?></span></h4>
                <p>Total Deposit</p>
            </div>
        </div>
    </div>
    <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">
        <div class="single">
            <div class="icon"><i class="anticon anticon-arrow-right"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo $last_deposit; ?></span></h4>
                <p>Last Deposit </p>
            </div>
        </div>
    </div>
    <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">
        <div class="single">
            <div class="icon"><i class="anticon anticon-money-collect"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo $total_withdraw_sum; ?></span></h4>
                <p>Total Withdraw</p>
            </div>
        </div>
    </div>
   <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">
        <div class="single">
            <div class="icon"><i class="anticon anticon-money-collect"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo $last_withdraw; ?></span></h4>
                <p>Last Withdraw</p>
            </div>
        </div>
    </div>
    <!-- <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12"> -->
        <!-- <div class="single"> -->
            <!-- <div class="icon"><i class="anticon anticon-account-book"></i></div> -->
            <!-- <div class="content"> -->
                <!-- <h4><b>$</b><span class="count">0</span></h4> -->
                <!-- <p>Deposit Bonus</p> -->
            <!-- </div> -->
        <!-- </div> -->
    <!-- </div> -->
    <!-- <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12"> -->
        <!-- <div class="single"> -->
            <!-- <div class="icon"><i class="anticon anticon-gold"></i></div> -->
            <!-- <div class="content"> -->
                <!-- <h4><b>$</b><span class="count">0</span></h4> -->
                <!-- <p>Investment Bonus</p> -->
            <!-- </div> -->
        <!-- </div> -->
    <!-- </div> -->
    <!-- <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12"> -->
        <!-- <div class="single"> -->
            <!-- <div class="icon"><i class="anticon anticon-inbox"></i></div> -->
            <!-- <div class="content"> -->
                <!-- <h4 class="count">0</h4> -->
                <!-- <p>Total Referral</p> -->
            <!-- </div> -->
        <!-- </div> -->
    <!-- </div> -->

    <div class="col-xl-3 col-lg-6 col-md-6 col-sm-6 col-12">
        <div class="single">
            <div class="icon"><i class="anticon anticon-radar-chart"></i></div>
            <div class="content">
                <h4 class="count"><?php echo $infos['level']; ?></h4>
                <p>Rank Achieved</p>
            </div>
        </div>
    </div>
   
</div>

    
    <div class="row">
    <div class="col-xl-12">
        <div class="site-card">
            <div class="site-card-header">
                <h3 class="title">Recent Transactions</h3>
            </div>
            <div class="site-card-body table-responsive">
                <div class="site-datatable">
                    <table class="display data-table">
                        <thead>
                        <tr>
                            <th>Description</th>
                            <th>Transactions ID</th>
                            <th>Type</th>
                            <th>Amount</th>
                            <th>Fee</th>
                            <th>Status</th>
                            <th>Gateway</th>
                        </tr>
                        </thead>
							<tbody>
								<?php require_once('../include/recent_trans.php'); ?>
							</tbody>
                    </table>
                </div>
            </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>
        function copyRef() {
            /* Get the text field */
            var copyApi = document.getElementById("refLink");
            /* Select the text field */
            copyApi.select();
            copyApi.setSelectionRange(0, 999999999); /* For mobile devices */
            /* Copy the text inside the text field */
            document.execCommand('copy');
            $('#copy').text($('#copied').val())

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



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



</body>
</html>

