{include file="mheader.tpl"}
<div class="wrapper">
        <div class="container-fluid">
            <!-- Page-Title -->
            <div class="page-title-box">
                <div class="row align-items-center">
                    <div class="col-sm-6">
                        <h4 class="page-title">Dashboard</h4>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-right">
                            <li class="breadcrumb-item"><a href="javascript:void(0);">{$settings.site_name}</a></li>
                            <li class="breadcrumb-item active">Dashboard</li>
                        </ol>
                    </div>
                </div>
                <!-- end row -->
            </div>
 
{if $userinfo.umessages}
<ul>
{foreach from=$userinfo.umessages item=m}
<li>{$m.text|escape:html|nl2br}</li>
{/foreach}
</ul>
{/if}

 
    <div class="row">
                        <div class="col-md-4">
                            <div class="card stat-card">
                                <div class="card-body">
                                    <h5 class="card-title">Total Balance</h5>
                                    <h2 class="float-right">{$currency_sign}{$ab_formated.total}</h2>
                                    
                                    <div class="progress" style="height: 10px;">
                                        <div class="progress-bar bg-success" role="progressbar" style="width: 100%" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="card stat-card">
                                <div class="card-body">
                                    <h5 class="card-title">Total Withdrawals</h5>
                                    <h2 class="float-right">{$currency_sign}{$ab_formated.withdrawal}</h2>
                                   
                                    <div class="progress" style="height: 10px;">
                                        <div class="progress-bar bg-info" role="progressbar" style="width: 100%" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="card stat-card">
                                <div class="card-body">
                                    <h5 class="card-title">Pending Withdrawals</h5>
                                    <h2 class="float-right">{$currency_sign}{$ab_formated.withdraw_pending}</h2>
                                    
                                    <div class="progress" style="height: 10px;">
                                        <div class="progress-bar bg-danger" role="progressbar" style="width: 100%" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
    <div class="row content">
       
        
        <div class="col-sm-12 text-left">
            <div class="card my-4">
                <h5 class="card-header bg-primary text-white">Dashboard</h5>
                <div class="card-body">
                    <div class="row">

        <div class="table-responsive">
                        <table class="table">
                            <tbody>
                               
                                <tr>
                                    <td>Sponsor/Referral Name</td>
                                    <td>{$upline.name}</td>
                                </tr>

                                <tr>
                                    <td>Total Balance</td>
                                    <td>{$currency_sign}<b>{$ab_formated.total}</b><br>
 <small>
{section name=p loop=$ps}
   {if $ps[p].balance > 0}{$currency_sign}{$ps[p].balance} of {$ps[p].name}<br>{/if}
{/section}
</small>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td>Total Earning</td>
                                    <td>{$currency_sign}{$ab_formated.earning}</td>
                                </tr>
                                    <tr>
                                        <td>Active Deposit</td>
                                        <td>{$currency_sign}{$ab_formated.active_deposit}</td>
                                    </tr>

                                    {if $last_deposit}
<tr>
 <td>Last Deposit:</td>
 <td>{$currency_sign}<b>{$last_deposit|default:"n/a"}</b> &nbsp; <small>{$last_deposit_date|default:"n/a"}</small></td>
</tr>
{/if}
{if $ab_formated.deposit != 0}
<tr>
 <td>Total Deposit:</td>
 <td>{$currency_sign}<b>{$ab_formated.deposit}</b></td>
</tr>
{/if}
{if $last_withdrawal}
<tr>
 <td>Last Withdrawal:</td>
 <td>{$currency_sign}<b>{$last_withdrawal|default:"n/a"}</b> &nbsp; <small>{$last_withdrawal_date|default:"n/a"}</small></td>
</tr>
{/if}

                                    <tr>
                                        <td>Last Access</td>
                                        <td>{$last_access|default:"n/a"}&nbsp;</td>
                                    </tr>
                            </tbody>
                        </table>
                        </div>

                    </div>

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

                </div>
            </div>    

{section name=p loop=$ps}
  {if $ps[p].pending_col > 0}{$ps[p].pending_col} {$ps[p].name} deposit{if $ps[p].pending_col > 1}s{/if} of {$currency_sign}{$ps[p].pending_amount} total pending<br>{/if}
{/section}

<br><br>
{if $wires} {$wires} Wire Transfer(s) pending.<br>
{/if}
<br>



{include file="mfooter.tpl"}