{include file="header.tpl"}

<div id="main-content">
    <div id="sub_content">
<div class="plan_head"><p>User Account</p></div>
<div class="plan_img"><img src="images/ra.png"></div>
<div class="dashboard">
<div class="deshboard-left">
                <div class="desh-menu">
                    <ul>
                        <li><a href="?a=account"><i class="fa fa-university" aria-hidden="true"></i> Account Overview</a></li>
                        <li><a href="?a=deposit"><i class="fa fa-cloud-download" aria-hidden="true"></i> Make Deposit</a></li>
                        <li><a href="?a=withdraw"><i class="fa fa-upload" aria-hidden="true"></i> Withdraw Fund</a></li>
                        <li><a href="?a=deposit_list"><i class="fa fa-list" aria-hidden="true"></i> Deposit List</a></li>
                        <li><a href="?a=deposit_history"><i class="fa fa-briefcase" aria-hidden="true"></i> Deposit History</a></li>
                        <li><a href="?a=withdraw_history"><i class="fa fa-history" aria-hidden="true"></i> Withdraw History</a></li>
                        <li><a href="?a=earnings"><i class="fa fa-list-ul" aria-hidden="true"></i> Earning History</a></li>
                        <li><a href="?a=referals"><i class="fa fa-external-link-square" aria-hidden="true"></i> Referral</a></li>
                        <li><a href="?a=referallinks"><i class="fa fa-link" aria-hidden="true"></i> Referral Link</a></li>
                        <li><a href="?a=edit_account"><i class="fa fa-user" aria-hidden="true"></i> Account Setting</a></li>
                        <li><a href="?a=logout"><i class="fa fa-power-off" aria-hidden="true"></i> Log Out</a></li>
                    </ul>
                </div>
            </div>
<div class="desh_right">

{literal} 
<script>
var delay = 500;
countEarnings = function() {
  var totalProfit = 0.00000000;
  var dps = document.getElementsByClassName('deposit_pb');
  for (i in dps) {
    if (isNaN(parseInt(i))) continue;
    var amount = parseFloat(dps[i].getAttribute('data-amount'));
    if (isNaN(amount)) return;
    var percent = parseFloat(dps[i].getAttribute('data-percent'));
    if (isNaN(percent)) return;
    var duration = parseFloat(dps[i].getAttribute('data-duration'));
    if (isNaN(duration)) return;
    var totaltime = parseFloat(dps[i].getAttribute('data-totaltime'));
    if (isNaN(totaltime)) return;
    duration += delay;
    if (totaltime > 0 && duration > totaltime) duration = totaltime;
    dps[i].setAttribute('data-duration', duration);
    var profit = (amount/100)*(duration/1000)*(percent/3600);
    totalProfit += profit;
  }
  document.getElementById('total_profit').innerHTML = totalProfit.toFixed(8);
  setTimeout('countEarnings()', delay);
};
</script>{/literal} 


<div style="display:none">
</div>

                <div class="desh_bg">
                    <div class="desh_icon">
                        <img src="images/duser.png">
                    </div>
                    <div class="welcome">
                        <h3>Welcome {$userinfo.username}</h3>
                    </div>
                    <div class="desh_user_right">
                        <div class="duser_details">
                            <p>Registration Date : {$userinfo.create_account_date}</p>
                        </div>
                        <div class="duser_details">
                            <p>Last Access : {$last_access}&nbsp;</p>
                        </div>
                    </div>
                </div>
                <div class="desh_down">
                    <div class="balance_left">
                        <div class="balance_one">
                            <div class="balance_icon">
                                <img src="images/tba.png">
                            </div>
                            <div class="balance_tittle">
                                <p>Total Balance:  {$currency_sign}<b>{$ab_formated.total}</b></p>
                            </div>
                        </div>
                        <div class="balace_btn1">
                            <a style="font-size: 15px;" href="?a=deposit" class="a-link">Invest Now</a>       
                        </div>
                    </div>
                    <div class="balance_right">
                        <div class="balance_one">
                            <div class="balance_icon">
                                <img src="images/tba.png">
                            </div>
                            <div class="balance_tittle">                   
                                <p style="color:green;">Earned Total: <br> {$currency_sign}<b>{$ab_formated.earning}</b></p>
                            </div>
                        </div>
                        <div class="balace_btn1">
                            <a style="font-size: 15px;" href="?a=withdraw" class="a-link">Withdraw Now</a>       
                        </div>
                    </div>
                </div>
                <div class="deposit_withdraw">
                    <div class="deposit_left">
                        <div class="depsoit_head">
                            <p>Deposit History</p>
                        </div>
                        <div class="deposit_all">
                            <div class="deposit_one">
                                <div class="deposit_left_">
                                    <p>Total Deposit </p>
                                </div>
                                <div class="deposit_right-">
                                    <p>{$currency_sign}<b>{$ab_formated.deposit}</b></p>
                                </div>
                            </div>
                            <div class="deposit_one">
                                <div class="deposit_left_">
                                    <p>Last Deposit </p>
                                </div>
                                <div class="deposit_right-">
                                    <p>{$currency_sign}<b>{$last_deposit|default:"n/a"}</b> &nbsp; <small>{$last_deposit_date|default:"n/a"}</small></p>
                                </div>
                            </div>
                            <div class="deposit_one">
                                <div class="deposit_left_">
                                    <p>Active Deposit </p>
                                </div>
                                <div class="deposit_right-">
                                    <p>{$currency_sign}<b>{$ab_formated.active_deposit}</b></p>
                                </div>
                            </div>
                            
                        </div>
                    </div>
                    <div class="deposit_left">
                        <div class="depsoit_head">
                            <p>Withdraw History</p>
                        </div>
                        <div class="deposit_all">
                            <div class="deposit_one">
                                <div class="deposit_left_">
                                    <p>Pending Withdraw </p>
                                </div>
                                <div class="deposit_right-">
                                    <p>{$currency_sign}<b>{$ab_formated.withdraw_pending}</b></p>
                                </div>
                            </div>
                            <div class="deposit_one">
                                <div class="deposit_left_">
                                    <p>Last Withdraw </p>
                                </div>
                                <div class="deposit_right-">
                                    <p>{$currency_sign}<b>{$last_withdrawal|default:"n/a"}</b> &nbsp; <small>{$last_withdrawal_date|default:"n/a"}</small><b>n/a</b></p>
                                </div>
                            </div>
                            <div class="deposit_one">
                                <div class="deposit_left_">
                                    <p>Total Withdraw </p>
                                </div>
                                <div class="deposit_right-">
                                    <p>{$currency_sign}<b>{$ab_formated.withdrawal}</b></p>
                                </div>
                            </div>
                            
                        </div>
                    </div>
                </div>
                <div class="main-referbg">
                    <p>Referral Link : {$settings.site_url}/?ref={$userinfo.username}</p>
                </div>

<script>
countEarnings();
</script>
</div>
</div>
</div>
</div>

{if $userinfo.umessages}
<ul>
{foreach from=$userinfo.umessages item=m}
<li>{$m.text|escape:html|nl2br}</li>
{/foreach}
</ul>
{/if}


{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}


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




{include file="footer.tpl"}
