{include file="header.tpl"}
    <div class="col-md-10 col-12 fix-mt fix-mtSm">
        <div class="d-block d-sm-none mb-4">
            <div class="row">
                <div class="col-12 align-center">
                    <h5 class="reduceH5 site-yellow">
                        <b>Your Deposits</b>
                    </h5>
                </div>
            </div>
        </div>
        <!-- ## -->
        <div class="row px-0 px-sm-4">
            <div class="col-md-12 col-12">
                <div class="post-box p-4">
                    <div class="mb-3 align-center">
                        <h5 class="reduceH5 bold-text">
                            Your Deposits
                        </h5>
                    </div> 

<b>Total: {$currency_sign}{$total}</b><br><br>
<div class="table-responsive">
{foreach from=$plans item=p}
<table cellspacing=1 cellpadding=2 border=0 width=100% class=line><tr><td class=item>
<table cellspacing=1 cellpadding=2 border=0 width=100% class="table table-striped table-bordered">
<tr>
 <td colspan=3 align=center><b>{$p.name}</b></td>
</tr><tr>
 <th class=inheader>Plan</td>
 <th class=inheader width=200>Deposit Amount</td>
 <th class=inheader width=100 nowrap><nobr>{$p.period} Profit (%)</nobr></td>
</tr>
{foreach from=$p.plans item=o}
<tr>
 <td class=item>{$o.name}</td>
 <td class=item align=right>{$currency_sign}{$o.min_deposit} {if $o.max_deposit>0}- {$currency_sign}{$o.max_deposit}{else}and more{/if}</td>
 <td class=item align=right>{$o.percent}</td>
</tr>
{/foreach}
</table>
<br>
<table cellspacing=1 cellpadding=2 border=0 width=100% class="table table-striped table-bordered">
{if !$p.deposits}
<tr>
 <td colspan=4><b>No deposits for this plan</b></td>
</tr>           
{else}
<tr>
 <td colspan=4 class=inheader style="text-align:left">Your deposits:</td>
</tr>
<tr>
 <th class=inheader>Date</td>
 <th class=inheader>Amount</td>
{if $p.use_compound}
 <th class=inheader>Compounding Percent</td>
{/if}
{if $p.withdraw_principal}
 <th class=inheader>Release</td>
{/if}
</tr>           
{foreach from=$p.deposits item=d}
<tr>
 <td align=center class=item><b>{$d.date}</b><br>{if $p.q_days == 0}Working {$d.duration} days{else}Expire in {$d.expire_in}{/if}</td>
 <td align=center class=item><b>{$d.deposit|fiat:$d.ec} <img src="images/{$d.ec}.gif" align=absmiddle hspace=1 height=17></b></td>


{if $p.use_compound}
 <td align=center class=item align=center>{$d.compound}% <a href="{"?a=change_compound&deposit=`$d.id`"|encurl}">[change]</a></td>
{/if}
{if $p.withdraw_principal}
 <td align=center class=item>
  {if $d.can_withdraw}
   <a href="{"?a=withdraw_principal&deposit=`$d.id`"|encurl}">[release]</a>
  {else}
   {if $d.pending_duration > 0}
    {$d.pending_duration} day{if $d.pending_duration > 1}s{/if} left
   {else}
    not available
   {/if}
  {/if}
 </td>
{/if}
</tr>
{/foreach}
{/if}
</table>
{if $p.total_deposit > 0 || $p.today_profit > 0 || $p.total_profit > 0}
<table cellspacing=0 cellpadding=1 border=0 class="table table-striped table-bordered">
<tr><td>Deposited Total:</td><td><b>{$p.total_deposit|fiat}</b></td></tr>
<tr><td>Profit Today:</td><td><b>{$p.today_profit|fiat}</b></td></tr>
<tr><td>Total Profit:</td><td><b>{$p.total_profit|fiat}</b></td></tr>
</table>
{/if}
<br>
</td></tr></table>
<br>
{/foreach}
</div></div></div></div></div>
{include file="footer.tpl"}
