{include file="header.tpl"}

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


<h3>RCB Requests</h3>

<div class="details">
<table class="form">
<tr>
 <th>Active Requests</th>
 <td>{$totals.active|intval}</td>
</tr>
<tr>
 <th>Processed Requests</th>
 <td>{$totals.processed|intval}</td>
</tr>
<tr>
 <th>RCB Received</th>
 <td>${$totals.received|number_format:2}</td>
</tr>
<tr>
 <th>RCB Pending</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>Status</th>
 <th>Time</th>
 <th>Program</th>
 <th>Deposit/RCB</th>
 <th>Username</th>
 <th>EC No</th>
</tr>
{else}
<tr class="{cycle values="row1,row2"}">
  <td>{if $refbacks[s].status == 1}<b class="profit">Paid</b>{else}<b class="spend">Pending</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">No Refback Requests</div>
{/if}
</div>

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

{include file="footer.tpl"}