{include file="header.tpl"}

<script type="text/javascript">
url = '{"?a=listrcb&p="|encurl}';
{literal}
function go(p) {
  document.location = url+p+'/';
}
{/literal}
</script>


<h3>{t}RCB Requests{/t}</h3>

<div class="details">
<table class="form">
<tr>
 <th>{t}Active Requests{/t}</th>
 <td>{$totals.active|intval}</td>
</tr>
<tr>
 <th>{t}Processed Requests{/t}</th>
 <td>{$totals.processed|intval}</td>
</tr>
<tr>
 <th>{t}RCB Received{/t}</th>
 <td>${$totals.received|number_format:2}</td>
</tr>
<tr>
 <th>{t}RCB Pending{/t}</th>
 <td>${$totals.pending|number_format:2}</td>
</tr>
</table>
<br>

{if $refbacks}
<table class="list">
{section name=s loop=$refbacks}
{if $refbacks[s].type == 'date'}
<tr>
 <td class="title" colspan=6>{$refbacks[s].date}</td>
</tr>
<tr>
 <th>{t}Status{/t}</th>
 <th>{t}Time{/t}</th>
 <th>{t}Program{/t}</th>
 <th>{t}Deposit/RCB{/t}</th>
 <th>{t}Username{/t}</th>
 <th>{t}EC No{/t}</th>
</tr>
{else}
<tr class="{cycle values="row1,row2"}">
  <td>{if $refbacks[s].status == 1}<b class="profit">{t}Paid{/t}</b>{else}<b class="spend">{t}Pending{/t}</b>{/if}</td>
  <td>{$refbacks[s].time_added}</td>
  <td><a href="{"?a=details&lid=`$refbacks[s].listing_id`"|encurl}" target="_blank">{$refbacks[s].program_name}</a></td>
  <td>${$refbacks[s].inv_amount}{if $refbacks[s].rcb_amount} / ${$refbacks[s].rcb_amount}{/if}</td>
  <td>{$refbacks[s].username}</td>
  <td><img src="{"`$theme`images/`$refbacks[s].paysystem`.gif"|encurl}" alt="{$refbacks[s].paysystem}"> {$refbacks[s].psaccount}</td>
</tr>
{/if}
{/section}
</table>
{else}
 <div class="message">{t}No Refback Requests{/t}</div>
{/if}
</div>

{paginator col=$pages.col cur=$pages.cur url="javascript:go('%s')"}

{include file="footer.tpl"}