    <div class="page-container">
        <div class="main-content">
            <div class="section-gap">
                <div class="container-fluid">
                                        <!--Page Content-->
     <?php 
     
     $ranks = [
         "Member"=>["name"=>"Member","title"=>"By signing up to the account","image"=>"sCQgIyl0OKzFiO73nmWF.svg"],
         "Leader"=>["name"=>"Leader","title"=>"By earning ".'$50'." from the site","image"=>"TQDUvbD48kmhmV9qifzh.svg"],
         "Captain"=>["name"=>"Captain","title"=>"By earning ".'$200'." from the site","image"=>"hGHllGGCIYfpx5Z2VKrW.svg"],
         "Victor"=>["name"=>"Victor","title"=>"By earning ".'$500'." from the site","image"=>"SaNfYL7WD2pzAAME8Sqb.svg"],
         ];
         
        if($current_active_plan == "Member" || $current_active_plan == "")
            {   
                $activeRank = $ranks['Member'];
            }else{
                $activeRank = $ranks[$current_active_plan];
            }
     ?>               
    
    <div class="row">
        <div class="col-md-12"> <h3 class="my-5 p-2">Welcome, <?php echo $customer_fname.' '.$customer_lname; ?></h3></div>
    <div class="col-xl-3 col-lg-3 col-md-4 col-sm-6 col-12">
        <div class="user-ranking" >
            <h4>Level 1</h4>
            <p>Live-Trade <?php echo $activeRank['name']; ?></p>
            <div class="rank" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo $activeRank['title']; ?>">
                <img src="/images/<?php echo $activeRank['image']; ?>" 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="https://elitewaveequities.com/register?id=<?php echo $refer_id; ?>" 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 $assist->total_referals($refer_id); ?> 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-inbox"></i></div>
            <div class="content">
                <h4><span class="count"><?php echo $assist->countalltransaction(); ?></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-file-add"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo number_format($assist->totalDeposit(),2); ?></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-check-square"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo number_format($assist->totalInvestment(),2); ?></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 number_format($total_profit,2); ?></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-arrow-right"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo number_format($assist->totalTansfers(),2); ?></span></h4>
                <p>Total Transfer </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 number_format($assist->totalWithdrawal(),2); ?></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-gift"></i></div>
            <div class="content">
                <h4><b>$</b><span class="count"><?php echo number_format($assist->referal_balance($refer_id),2); ?></span>
                </h4>
                <p>Referral 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-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"><?php echo $assist->total_referals($refer_id); ?></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">1</h4>
                <p>Rank Achieved</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-question"></i></div>
            <div class="content">
                <h4 class="count">0</h4>
                <p>Total Ticket</p>
            </div>
        </div>
    </div>
</div>
                </div>
            </div>
        </div>
    </div>


    <!-- Automatic Popup -->
<?php if($welcome_modal == "true"){
    $assist->updateWelcome();
    ?> 
<div id="auto-popup" class="auto-popup-section">
    <div class="auto-popup-dialog animated fadeInUp">
        <button class="auto-popup-close auto-popup-close-now" onclick="updatePopup()"><i icon-name="x"></i></button>
        <div class="auto-popup-dialog-inner"
             style="background: url(/images/auto-pop.jpg) no-repeat;">
            <div class="row">
                <div class="col-md-12 col-12">
                    <div class="auto-pop-content">
                        <h2>Congratulation!</h2>
                        <h3>You got a Signup Bonus
                            <span>5 USD</span></h3>
                        <button class="site-btn grad-btn auto-popup-close-now" onclick="updatePopup()"><i
                                class="anticon anticon-check"></i> Got it</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php } ?>
  