
<!DOCTYPE html>
<html lang="en">
<?php require_once('../include/head.php'); ?>

<body class="dark-theme">
<?php require_once('../include/head.php'); ?>

<?php
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);
$username = $infos['uname'];
    $q2 = "select count(email) from info where ref = '$username' ";
    $total_p = mysqli_R(mysqli_query($conn,$q2),0);
?>

<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 col-lg-12 col-md-12 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="https://<?php echo $website_link; ?>/register.php?ref=<?php echo md5($mail); ?>" 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">
                            <?php echo $total_p; ?> peoples are joined by using this URL
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-xl-12">
            <div class="site-card">
                <div class="site-card-header">
                    <h3 class="title">All Referral Logs</h3>
                    <div class="card-header-links">
                        <span
                            class="card-header-link rounded-pill"> Referral Profit: 0 USD</span>
                    </div>
                </div>
                <div class="site-card-body table-responsive">


                    <div class="site-tab-bars">
                        <ul class="nav nav-pills" id="pills-tab" role="tablist">
                            <li class="nav-item" role="presentation">
                                <a
                                    href=""
                                    class="nav-link active"
                                    id="generalTarget-tab"
                                    data-bs-toggle="pill"
                                    data-bs-target="#generalTarget"
                                    type="button"
                                    role="tab"
                                    aria-controls="generalTarget"
                                    aria-selected="true"
                                ><i icon-name="network"></i>General</a>
                            </li>

                                                    </ul>
                    </div>


                    <div class="tab-content" id="pills-tabContent">

                        <div
                            class="tab-pane fade show active"
                            id="generalTarget"
                            role="tabpanel"
                            aria-labelledby="generalTarget-tab"
                        >
                            <div class="row">
                                <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12">
                                    <div class="site-datatable">
                                        <div class="row table-responsive">
                                            <div class="col-xl-12">
                                                <table class="display data-table">
                                                    <thead>
                                                    <tr>
                                                        <th>Description</th>
                                                        <th>Transactions ID</th>
                                                        <th>Amount</th>
                                                        <th>Status</th>
                                                    </tr>
                                                    </thead>
                                                    <tbody>


                                                    

                                                    </tbody>
                                                </table>

                                                                                                    <p class="centered">No Data Found</p>
                                                
                                                
                                            </div>
                                        </div>
                                    </div>

                                </div>

                            </div>

                        </div>

                        
                    </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 = 'https://app.hyiprio.xyz/theme-mode';
            $.get(url)
        });
    </script>




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


</body>
</html>

