
<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-lg-4">
        <div class="row">
            <div class="col-12">
                <div class="card m-b-20" >
                    <div class="card-body">
                        <div class="media">
                            <div class="media-body">
                                <h5 style="padding-bottom: 5px;color: #b1ffb1;" class="mb-2">Buying Wallet</h5>
                                <p style="padding-bottom: 10px;color: #ececec;margin-bottom: 0;">Add Fund & Start Buying. Get Earning Daily.</p>

                                <p style="color: #ececec;margin-bottom: 0;">Balance: <?php if($user_data->credit > 0): ?> <a style="color: #abffa0;" class="mb-0"><?php echo e($user_data->credit); ?></a> <?php else: ?> <a style="color: red" class="mb-0">0.00</a> <?php endif; ?></p>
                                <p style="color: #ececec;">Profit: <?php if($roi+$uppro > 0): ?> <a style="color: #fffcbe" class="mb-0"><?php echo e($roi+$uppro); ?></a> <?php else: ?> <a style="color: red" class="mb-0">0.00</a> <?php endif; ?></p>

                                <a href="<?php echo e(url('addfund')); ?>" style="font-size: 11px;background: #2676ae;color: #fff;padding: 4px 10px;">Add Fund</a> 
                                <a href="<?php echo e(url('pack')); ?>" style="font-size: 11px;background: #f21c8cd1;color: #fff;padding: 4px 10px;">Buy Now</a>

                            </div>
                        </div>
                    </div>
                </div> 
            </div>

            <div class="col-12">
                <div class="card m-b-20" >
                    <div class="card-body">
                        <div class="media">
                            <div class="media-body">
                                <h5 style="color: #b1ffb1;" class="mb-2">Earning Wallet</h5> 

                                <p style="color: #ececec;margin-bottom: 0;">Balance: <?php if($user_data->balance > 0): ?> <a style="color: #abffa0;" class="mb-0"><?php echo e($user_data->balance); ?></a> <?php else: ?> <a style="color: red" class="mb-0">0.00</a> <?php endif; ?></p>
                                <p style="color: #ececec;">Total Earning: <?php if($user_data->tearn+$uppro > 0): ?> <a style="color: #78d3ff;" class="mb-0"><?php echo e($user_data->tearn+$uppro); ?></a> <?php else: ?> <a style="color: red" class="mb-0">0.00</a> <?php endif; ?></p>

                                <a href="<?php echo e(url('payout')); ?>" style="font-size: 11px;background: #009688;color: #fff;padding: 4px 10px;">Withdraw</a>       
                            </div>
                        </div>
                    </div>
                </div>            
            </div>
        </div>
    </div>

    <div class="col-lg-8">
        <div class="row">
            <div class="col-12">
                <div class="row">
                    <div class="col-lg-6 col-xl-6">
                        <div class="card m-b-20" >
                            <div class="card-body">
                                <div class="media">
                                    <div class="media-body">
                                        <h5 style="color: #b1ffb1;" class="mb-2">Affiliate Status</h5> 
                                        <p style="color: #ececec;margin-bottom: 0;">Refers: <?php if($user_data->sponsor_count > 0): ?> <span style="color: #84fff5;"><?php echo e($user_data->sponsor_count); ?></span> <?php else: ?> <span style="color: red;">0</span> <?php endif; ?></p>
                                        <p style="color: #ececec;margin-bottom: 0;">Team: <?php if($user_data->tcount > 0): ?> <span style="color: #84fff5;"><?php echo e($user_data->tcount); ?></span> <?php else: ?> <span style="color: red;">0</span> <?php endif; ?></p>
                                        <p style="color: #ececec;margin-bottom: 0;">Bonus: <?php if($affb > 0): ?> <span style="color: #bbffdb;"><?php echo e($affb); ?></span> <?php else: ?> <span style="color: red;">0.00</span> <?php endif; ?></p>                  
                                    </div>
                                </div>
                            </div>
                        </div>            
                    </div>

                    <div class="col-lg-6 col-xl-6">
                        <div class="card m-b-20" >
                            <div class="card-body">
                                <div class="media">
                                    <div class="media-body">
                                        <h5 style="color: #b1ffb1;" class="mb-2">Account Status</h5> 
                                        <p style="color: #ececec;margin-bottom: 0;">Total Buy: <span style="color: #84fff5;"><?php echo e($user_data->total_buy); ?></span></p>
                                        <p style="color: #ececec;margin-bottom: 0;">Total Payout: <?php if($pay > 0): ?> <span style="color: #84fff5;"><?php echo e($pay); ?></span> <?php else: ?> <span style="color: red;">0.00</span> <?php endif; ?></p> 
                                        <p style="color: #ececec;margin-bottom: 0;">Status: <?php if($user_data->activ_status == 1): ?> <span style="color: #abffa0;">Active</span> <?php else: ?> <span style="color: red;">Inactive</span> <?php endif; ?></p>
                                    </div>
                                </div>
                            </div>
                        </div>            
                    </div>

                    <div class="col-lg-6 col-xl-6">
                        <div class="card m-b-20">
                            <div class="card-body">
                                <div class="media">
                                    <div class="media-body">
                                        <h5 style="padding-bottom: 5px;color: #b1ffb1;" class="mb-2">Club Status</h5>
                                        <?php if($user_data->club >= 1): ?>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">My Club: <span style="color: #84fff5;"><?php if($user_data->club == 1): ?> Executive <?php else: ?> Manager <?php endif; ?></span> <?php if($user_data->club == 1): ?> <?php if($user_data->refexc < 5): ?> (Need <?php echo e(5-$user_data->refexc); ?> Executive for Manager) <?php endif; ?> <?php endif; ?></p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Total Bonus: <span style="color: #78ff9f;"><?php echo e($cbon); ?></span></p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Club Fund: <span style="color:#ffb1f5"><?php if($user_data->club == 1): ?> <?php echo e($wallet->exclub); ?> <?php else: ?> <?php echo e($wallet->mclub); ?> <?php endif; ?></span></p>
                                        <?php if($user_data->club == 1): ?>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Achiever: <span style="color:#e1ff98"><?php echo e($achvex); ?></span></p>
                                        <?php else: ?>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Achiever: <span style="color:#e1ff98"><?php echo e($achvmn); ?></span></p>
                                        <?php endif; ?>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Status: <?php if($user_data->mpak >= 1): ?> <span style="color: #abffa0;">Active</span> <?php else: ?> <span style="color: red;">Inactive</span> (Need 1 Refer) <?php endif; ?></p>
                                        <?php else: ?>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Club Target:  <span style="color: #84fff5;">Executive</span></p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Refer Target: <span style="color: #78ff9f;">10</span> Refer</p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Refer Sales: <?php if($user_data->refpak > 0): ?> <span style="color: #abffa0;"><?php echo e($user_data->refpak); ?></span> <?php else: ?> <span style="color: red;">0</span> <?php endif; ?> Pack</p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Status: <span style="color: red;">Inactive</span> (Need <?php echo e(10-$user_data->refpak); ?> Refer)</p>
                                        <?php endif; ?>                                                            
                                    </div>
                                </div>
                            </div>
                        </div>            
                    </div>

                    <?php if($user_data->founder == 1): ?>
                    <div class="col-lg-6 col-xl-6">
                        <div class="card m-b-20">
                            <div class="card-body">
                                <div class="media">
                                    <div class="media-body">
                                        <h5 style="padding-bottom: 5px;color: #b1ffb1;" class="mb-2">Founder Status</h5>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Founders: <span style="color: #84fff5;"><?php echo e($fcount); ?></span></p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Total Bonus: <span style="color: #84fff5;"><?php echo e($fbon); ?></span></p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Fund: <span style="color:#ffb1f5"><?php echo e($wallet->founder); ?></span></p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Status: <span style="color: #abffa0;">Active</span></p>                                                            
                                    </div>
                                </div>
                            </div>
                        </div>            
                    </div>
                    <?php else: ?>
                    <?php if($fcount < 100): ?>
                    <div class="col-lg-6 col-xl-6">
                        <div class="card m-b-20">
                            <div class="card-body">
                                <div class="media">
                                    <div class="media-body">
                                        <h5 style="padding-bottom: 5px;color: #b1ffb1;" class="mb-2">Founder Status</h5>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Founders: <span style="color: #84fff5;"><?php echo e($fcount); ?></span></p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Refer Target: <span style="color: #78ff9f;">100</span> Refer</p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Refer Sales: <?php if($user_data->refpak > 0): ?> <span style="color: #abffa0;"><?php echo e($user_data->refpak); ?></span> <?php else: ?> <span style="color: red;">0</span> <?php endif; ?> Pack</p>
                                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Status: <span style="color: red;">Inactive</span> (Need <?php echo e(100-$user_data->refpak); ?> Refer)</p>                                                            
                                    </div>
                                </div>
                            </div>
                        </div>            
                    </div>
                    <?php endif; ?>
                    <?php endif; ?>

                </div>
            </div>
        </div>        
    </div>
    
    <div class="col-lg-6 col-xl-4">
        <div class="card m-b-20">
            <div class="card-body">
                <div class="media">
                    <div class="media-body">
                        <h5 style="padding-bottom: 5px;color: #b1ffb1;" class="mb-2">Rank Status</h5>
                        <?php if($user_data->rank_status >= 1): ?>
                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">My Rank: <span style="color: #84fff5;"><?php if($user_data->rank_status == 1): ?> AGM <?php elseif($user_data->rank_status == 2): ?> DGM <?php elseif($user_data->rank_status == 3): ?> GM <?php elseif($user_data->rank_status == 4): ?> ED <?php elseif($user_data->rank_status == 5): ?> Director <?php endif; ?></span></p>
                        <?php endif; ?>

                        <?php if($user_data->rank_status < 5): ?>
                        <p style="padding-bottom: 5px;color: #ececec;margin-bottom: 0;">Target: <?php if(is_null($user_data->rank_status)): ?> Need <span style="color: #84fff5;"><?php echo e(10-$user_data->refexc); ?></span> Executive for <span style="color: #84fff5;">AGM</span> <?php elseif($user_data->rank_status == 1): ?> Need <span style="color: #84fff5;"><?php echo e(8-$user_data->agm); ?></span> AGM for <span style="color: #84fff5;">DGM</span> <?php elseif($user_data->rank_status == 2): ?> Need <span style="color: #84fff5;"><?php echo e(7-$user_data->dgm); ?></span> DGM for <span style="color: #84fff5;">GM</span> <?php elseif($user_data->rank_status == 3): ?> Need <span style="color: #84fff5;"><?php echo e(6-$user_data->gm); ?></span> GM for <span style="color: #84fff5;">ED</span> <?php elseif($user_data->rank_status == 4): ?> Need <span style="color: #84fff5;"><?php echo e(6-$user_data->ed); ?></span> ED for <span style="color: #84fff5;">Director</span> <?php endif; ?></p>
                        <?php endif; ?>                                                             
                    </div>
                </div>
            </div>
        </div>            
    </div>

    <div class="col-lg-6 col-xl-4">
        <div class="card m-b-20">
            <div class="card-body">
                <div class="media">
                    <div class="media-body">
                        <h5 style="padding-bottom: 5px;color: #b1ffb1;" class="mb-2">Refer Link</h5>
                        <p style="padding-bottom: 10px;color: #ececec;">Share your Referral Link with your Friends & Earn Refer and Gen Bonus.</p>
                        <div style="display:flex;">
                            <input style="width: 70%;border: 1px solid #0d4368; height: 38px; color: #a3d5ff; padding-left: 5px;background: #042c48;" type="text" id="myInput" value="<?php echo e(url('/')); ?>/ref/<?php echo e($user_data->username); ?>" readonly>
                            <button onclick="myFunction()" style="border: 1px solid #0d4368;border-left: 0;height: 38px;background: #042c48;color: bisque;padding-left: 10px;padding-right: 10px;min-width: 90px;">Copy Link</button>
                        </div>                                                            
                    </div>
                </div>
            </div>
        </div>            
    </div>
        
</div>

<script type="text/javascript">
    function myFunction() {
  /* Get the text field */
  var copyText = document.getElementById("myInput");

  /* Select the text field */
  copyText.select();
  copyText.setSelectionRange(0, 99999); /* For mobile devices */

   /* Copy the text inside the text field */
  navigator.clipboard.writeText(copyText.value);

}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('member.layout.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ebs/public_html/resources/views/member/dashboard.blade.php ENDPATH**/ ?>