{include file="mheader.tpl"}
<div class="header-title-breadcrumb element-box-shadow">
              <div class="container">
                  <div class="row">
                      <div class="col-md-7 col-sm-6 col-xs-12 text-left">
                        <h3>Withdrawal History</h3>
                      </div>
                      <div class="col-md-5 col-sm-6 col-xs-12 hide-on-tablet">
                          <ol class="breadcrumb text-right">
                            <li><a href="?a=account">Home</a></li> 
                            <li class="active">Withdrawal History</li>
                          </ol>                    
                      </div>
                  </div>
              </div>
            </div>
            <div class="spacer_80"></div>

{literal}
<script language=javascript>
function go(p)
{
  document.opts.page.value = p;
  document.opts.submit();
}
</script>
{/literal}
<div class="row">
<div class="col-md-12">
<form method=post name=opts>
<input type=hidden name=a value=withdraw_history>
<input type=hidden name=page value={$current_page}>
<div class="form-group">
<label for="inputType" class="col-lg-8 control-label">All transactions</label>
<div class="col-lg-8 select-form">
   <select name=type class="form-control input-type-1" onchange="document.opts.submit();">
<option value="">All transactions</option>
{section name=opt loop=$options}
<option value="{$options[opt].type}" {if $options[opt].selected}selected{/if}>{$options[opt].type_name}</option>
{/section}
   </select>
   </div>
    </div>
{if $ecs}
<div class="spacer_30"></div>
<div class="form-group">
<label for="inputType" class="col-lg-8 control-label">All eCurrencies</label>
<br><img src=images/q.gif width=1 height=4><br>
<div class="col-lg-8 select-form">

   <select name=ec class="form-control input-type-1">
     <option value=-1>All eCurrencies</option>
{section name=ec loop=$ecs}
 <option value={$ecs[ec].id} {if $frm.ec eq $ecs[ec].id}selected{/if}>{$ecs[ec].name}</option>
{/section}
   </select>
   </div>
    </div>
{/if}
<div class="spacer_30"></div>
<div class="form-group">
<label for="inputType" class="col-lg-8 control-label">From Month</label>
<div class="col-lg-8 select-form">
 <select name=month_from class="form-control input-type-1">
{section name=month_from loop=$month}
<option value={$smarty.section.month_from.index+1} {if $smarty.section.month_from.index+1 == $frm.month_from}selected{/if}>{$month[month_from]}
{/section}
</select> &nbsp;
</div>
</div>
<div class="form-group">
<label for="inputType" class="col-lg-8 control-label">Day</label>
<div class="col-lg-8 select-form">
<select name=day_from class="form-control input-type-1">
{section name=day_from loop=$day}
<option value={$smarty.section.day_from.index+1} {if $smarty.section.day_from.index+1 == $frm.day_from}selected{/if}>{$day[day_from]}
{/section}
</select> &nbsp;
</div>
</div>
<div class="form-group">
<label for="inputType" class="col-lg-8 control-label">Year</label>
<div class="col-lg-8 select-form">
<select name=year_from class="form-control input-type-1">
{section name=year_from loop=$year}
<option value={$year[year_from]} {if $year[year_from] == $frm.year_from}selected{/if}>{$year[year_from]}
{/section}
</select><br><img src=images/q.gif width=1 height=4><br>
</div></div>
<div class="form-group">
<label for="inputType" class="col-lg-8 control-label">To Month</label>
<div class="col-lg-8 select-form">
<select name=month_to class="form-control input-type-1">
{section name=month_to loop=$month}
<option value={$smarty.section.month_to.index+1} {if $smarty.section.month_to.index+1 == $frm.month_to}selected{/if}>{$month[month_to]}
{/section}
</select> &nbsp;
</div>
</div>
<div class="form-group">
<label for="inputType" class="col-lg-8 control-label">Day</label>
<div class="col-lg-8 select-form">
<select name=day_to class="form-control input-type-1">
{section name=day_to loop=$day}
<option value={$smarty.section.day_to.index+1} {if $smarty.section.day_to.index+1 == $frm.day_to}selected{/if}>{$day[day_to]}
{/section}
</select> &nbsp;
</div>
</div>
<div class="form-group">
<label for="inputType" class="col-lg-8 control-label">Year</label>
<div class="col-lg-8 select-form">

<select name=year_to class="form-control input-type-1">
{section name=year_to loop=$year}
<option value={$year[year_to]} {if $year[year_to] == $frm.year_to}selected{/if}>{$year[year_to]}
{/section}
</select>
</div></div>
<div class="spacer_30"></div>
 <div class="form-group">
<div class="col-lg-8">
	&nbsp; <input type=submit value="Go" class="btn btn-cryptic button-element sweetalert31">
</div></div>
</form>
</div>
</div>
<div class="spacer_30"></div>

{if $settings.use_history_balance_mode}
<div class="row">
<div class="col-md-12">
<div class="panel-body dash-table-markets">
    <div class="panel-body padding_30">
         <div class="table-responsive">
<table class="table table-cryptic dataTable no-footer" role="grid">
    <thead>
<tr role="row">
 <th>Date</th>
 <th>Type</th>
 <th>Credit</th>
 <th>Debit</th>
 <th>Balance</th>
 <th>P.S.</th>
</tr>
</thead>
{if $qtrans > 0}
{section name=trans loop=$trans}
<tbody>
<tr role="row">
 <td><p class="no-margin"><p class="no-margin">{$trans[trans].d}</p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$trans[trans].transtype}</b><br><small class=gray>{$trans[trans].description}</small></p></p></td>
 <td><b>
  {if $trans[trans].debitcredit == 0}
  {$currency_sign}{$trans[trans].actual_amount}
  </b>
  {else}
  &nbsp;
  {/if}
 </p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>
  {if $trans[trans].debitcredit == 1}
  {$currency_sign}{$trans[trans].actual_amount}
  </b> 
  {else}
  &nbsp;
  {/if}
 </p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>
  {$currency_sign}{$trans[trans].balance}</b>
 </p></p></td>
 <td><p class="no-margin"><p class="no-margin"><img src="images/{$trans[trans].ec}.gif" align=absmiddle hspace=1 height=17></p></p></td>
</tr>
{/section}
{else}
<tr role="row">
 <td><p class="no-margin"><p class="no-margin">No transactions found</p></p></td>
</tr>
{/if}
<tr role="row"><td>&nbsp;</td></tr>

{if $qtrans > 0}
<tr role="row">
 <td><p class="no-margin"><p class="no-margin">Total for this period:</p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign}{$periodcredit}</b></p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign}{$perioddebit}</b></p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign}{$periodbalance}</b></p></p></td>
</tr>
{/if}
<tr role="row">
 <td>Total:</p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign}{$allcredit}</b></p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign}{$alldebit}</b></p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign}{$allbalance}</b></p></p></td>
</tr>
</tbody>

</table>
</div>
</div>
</div>
</div>
</div>
{else}
<div class="row">
<div class="col-md-12">
    
<div class="panel-body dash-table-markets">
 <div class="panel-body padding_30">
     <div class="table-responsive">
<table class="table table-cryptic dataTable no-footer" role="grid">
    <thead>
<tr role="row">
 <th>Type</b></th>
 <th>Amount</th>
 <th>Date</th>
</tr>
</thead>
{if $qtrans > 0}
{section name=trans loop=$trans}
<tbody>
<tr role="row">
 <td><p class="no-margin"><p class="no-margin"><b>{$trans[trans].transtype}</b></p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign} {$trans[trans].actual_amount}</b> <img src="images/{$trans[trans].ec}.gif" align=absmiddle hspace=1 height=17></p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b><small>{$trans[trans].d}</small></b></p></p></td>
 
</tr>
<tr role="row">
 <td class=gray><p class="no-margin"><p class="no-margin"><small>{$trans[trans].description}</small></p></p></td>
 <td></td>
 <td></td>
 
 
</tr>
{/section}
{else}
<tr role="row">
 <td><p class="no-margin"><p class="no-margin">No transactions found</p></p></td>
 
 <td></td>
</tr>
{/if}


{if $qtrans > 0}
<tr role="row">
    <td><p class="no-margin"><p class="no-margin">For this period:</p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign} {$periodsum}</b></p></p></td>
 
 <td></td>
</tr>
{/if}
<tr role="row">
    <td><p class="no-margin"><p class="no-margin">Total:</p></p></td>
 <td><p class="no-margin"><p class="no-margin"><b>{$currency_sign} {$allsum}</b></p></p></td>

 <td></td>
</tr>
</tbody>
</table>
</div>
{/if}
</div>
</div>

</div>
</div>
{if $colpages > 1}
<center>
{if $prev_page > 0}
 <a href="javascript:go('{$prev_page}')">&lt;&lt;</a>
{/if}
{section name=p loop=$pages}
{if $pages[p].current == 1}
{$pages[p].page}
{else}
 <a href="javascript:go('{$pages[p].page}')">{$pages[p].page}</a>
{/if}
{/section}
{if $next_page > 0}
 <a href="javascript:go('{$next_page}')">&gt;&gt;</a>
{/if}
</center>
{/if}
<a href="#" class="scrollToTop"><i class="fa fa-chevron-up text-white" aria-hidden="true"></i></a>
</div>

{include file="mfooter.tpl"}
