{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>Transactions</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">
                            Transactions
                        </h5>
                    </div>
<div class="table-responsive">
{literal}
<script language=javascript>
function go(p)
{
  document.opts.page.value = p;
  document.opts.submit();
}
</script>
{/literal}

<table cellspacing=0 cellpadding=0 border=0 width=100% class="my_accont">
<tr>
<form method=post name=opts>
<input type=hidden name=a value=history>
<input type=hidden name=page value={$current_page}>
 <td>
   <select name=type class="form-control" 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>
{if $ecs}
<br><img src=images/q.gif width=1 height=4><br>
   <select name=ec class="form-control">
     <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>
{/if}
 </td>
 <td align=right>
From: <select name=month_from class="form-control p1">
{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;
<select name=day_from class="form-control p1">
{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;

<select name=year_from class="form-control p1">
{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>

To: <select name=month_to class="form-control p1">
{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;
<select name=day_to class="form-control p1">
{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;

<select name=year_to class="form-control p1">
{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>

 </td>
 <td>
	&nbsp; <input type=submit value="Go" class="Btn">
 </td>
</tr></table>
</form>
<br><br>


<table cellspacing=1 cellpadding=2 border=0 width=100% class="table table-striped table-bordered">
<tr>
 <th class=inheader><b>Type</b></td>
 <th class=inheader width=200><b>Amount</b></td>
 <th class=inheader width=170><b>Date</b></td>
</tr>
{foreach from=$trans item=t}
<tr>
 <td><b>{$t.transtype}</b></td>
 <td width=200 align=right><b>{$t.amount|fiat:$t.ec}</b> <img src="images/{$t.ec}.gif" align=absmiddle hspace=1 height=17>{if $t.type == 'withdraw_pending'}<a href="{"?a=cancelwithdraw&id=`$t.id`&return=`$return`&"|encurl}" onclick="return confirm('Are you sure you want to delete this request?')">[cancel]</a>{/if}</td>
 <td width=170 align=center valign=bottom><b><small>{$t.d}</small></b></td>
</tr>
<tr>
 <td colspan=3 class=gray><small>{$t.description|escape:html}</small></td>
</tr>
{foreachelse}
<tr>
 <td colspan=3 align=center>No transactions found</td>
</tr>
{/foreach}
<tr><td colspan=3>&nbsp;</td>

{if $totals}
<tr>
 <td><b>Total for selected options:</b></td>
 <td align=right nowrap>
  {foreach from=$totals item=t}{$t.amount|fiat:$t.ec} <img src="images/{$t.ec}.gif" align=absmiddle><br>{/foreach}
 </td>
 <td></td>
</tr>
{/if}

{*
{if $trans}
<tr>
    <td colspan=2>For this period:</td>
 <td align=right><b>{$currency_sign} {$periodsum}</b></td>
</tr>
{/if}
<tr>
    <td colspan=2>Total:</td>
 <td align=right><b>{$currency_sign} {$allsum}</b></td>
</tr>
*}
</table>

{paginator col=$paginator.col cur=$paginator.cur url="javascript:go('%s')"}
</div></div></div></div></div>

{literal}
<style>
.my_accont .p1 {
    width: 26%;
    display: inline-block;
}
@media screen and (max-width: 767px)
{.my_accont td {
    width: 100%;
    display: block;
}
.my_accont .p1 {
    width: 100%;
    display: block;
}
}
</style>
{/literal}
{include file="footer.tpl"}