{if $say eq 'added'}
<br><table cellspacing=2 cellpadding=3 border=0 width="100%">
<tr><td><strong style="color:green">Thank you. Your request has been sent to administrator. You will receive commission back after admininstrator approve the request.</td></tr>
</table><br><br>
{else}
{if $rcbrates}
<table cellspacing=0 cellpadding=3 border=0 width="100%">  
<tr><td><b>RCB For {$listing.name}</b></td></tr>
<tr><td><table cellspacing=1 cellpadding=2 width="99%" style="border: 1px dotted #CCCCCC;" align="center">
<tr bgcolor="#EEEEEE">
<td width=25% align="center" rowspan="2">Deposit Amount</td>
<td width=15% align="center" rowspan="2">Referral</td>
<td width="30%" align="center" colspan="2">1st Deposit</td>
<td width="30%" align="center" colspan="2">Re-Invested</td>
</tr>
<tr bgcolor="#EEEEEE">
<td width=15% align="center">RCB</td>
<td width=15% align="center">BONUS</td>
<td width=15% align="center">RCB</td>
<td width=15% align="center">BONUS</td>
</tr>
{section name=l loop=$rcbrates}
<tr bgcolor="#CCFF99">
<td align="center">${$rcbrates[l].min_deposit}-${$rcbrates[l].max_deposit}</td>
<td align="center">{if $rcbrates[l].ref>0}{$rcbrates[l].ref}%{else} -- {/if}</td>
<td align="center">{if $rcbrates[l].rcb>0}{$rcbrates[l].rcb}%{else} -- {/if}</td>
<td align="center">{if $rcbrates[l].bonus>0}${$rcbrates[l].bonus}{else} -- {/if}</td>
<td align="center">{if $rcbrates[l].rcb2>0}{$rcbrates[l].rcb2}%{else} -- {/if}</td>
<td align="center">{if $rcbrates[l].bonus2>0}${$rcbrates[l].bonus2}{else} -- {/if}</td>
</tr>
{/section}
<tr bgcolor="#fbfbfb"><td colspan="6">
<ul>
<li>Please fill in the form and submit to us. We will process it Asap.</li>
{if !$userinfo.logged}
<li>You can <a href="{"?a=signup"|encurl}" style="color:red">signup</a> and <a href="{"?a=login"|encurl}" style="color:red">login</a> into our site to track your refbacks.</li>
</ul>
{/if}

{if $errors}
<ul style="color:red">
{if $errors.turing}<li> Invalid turing image.</li>{/if}
{if $errors.email}<li> Please enter your e-mail addresss.</li>{/if}
{if $errors.invalid_email}<li> Please enter valid e-mail address.</li>{/if}
{if $errors.username}<li> Please enter your program username.</li>{/if}
{if $errors.account}<li> Please enter your payment system account.</li>{/if}
{if $errors.amount}<li> Wrong deposit amount, please check again.</li>{/if}
</ul>
{/if}
</td></tr>

<tr><td colspan=6><form method=post name="rcb_form" onsubmit="return vrcbdate()">
<input type="hidden" name="a" value="details">
<input type="hidden" name="aj" value="rcb">
<input type="hidden" name="lid" value="{$listing.id}">
<input type="hidden" name="action" value="savercb">
<input type="hidden" name="program" value="{$listing.name}">
<table cellspacing=1 cellpadding=2 border=0 width="90%">
<tr><td width="40%">* Program Username:</td><td><input type="text" name="username" value="{$frm.username|escape:html}" class=inpts size="30"></td></tr>
<tr><td>* Invested Amount:</td><td><input type="text" name="deposit" value="{$frm.deposit|default:1}" class=inpts size="15"> USD</td></tr>
<tr><td>* Deposited Date:</td><td><select name=dpdate_year class=inpts>
{section name=dpdate_year loop=$year}
<option value={$year[dpdate_year]}{if $year[dpdate_year] == $date.year} selected{/if}>{$year[dpdate_year]}</option>{/section}
</select> <select name=dpdate_month class=inpts>
{section name=dpdate_month loop=$month}
<option value={$smarty.section.dpdate_month.index+1}{if $smarty.section.dpdate_month.index+1 == $date.month} selected{/if}>{$month[dpdate_month]}</option>
{/section}
</select> <select name=dpdate_day class=inpts>
{section name=dpdate_day loop=$day}
<option value={$smarty.section.dpdate_day.index+1}{if $smarty.section.dpdate_day.index+1 == $date.day} selected{/if}>{$day[dpdate_day]}</option>
{/section}</select></td></tr>
<tr><td>* Contact E-mail:</td><td><input type="text" name="email" value="{$frm.email|default:$userinfo.email|escape:html}" class=inpts size="30"></td></tr>
<tr><td >* Deposit Payment System: </td>
<td><select name="paysystem" class="inpts" onchange="setDefAccount()">
{section name=rp loop=$rcbpayments}
<option value="{$rcbpayments[rp].name}" {if $frm.paysystem == $rcbpayments[rp].name}selected{/if}>{$rcbpayments[rp].name}</option>
{/section}</select></td></tr>
<tr><td>* Your Payment System Account:</td><td><input type="text" name="psaccount" value="{$frm.psaccount|default:$userinfo.libertyreserve_account|escape:html}" class=inpts size="30"></td></tr>
<tr>
 <td>&nbsp;&nbsp;Your Comments</td>
 <td><textarea name="comments" cols="35" rows="4" class="inpts">{$frm.comments|escape:html}</textarea></td>
</tr>
{if $settings.use_turing}
<tr>
  <td>* Turing</td>
  <td><img src="{"?a=turing&`$sesname`=`$sesid`&r=`$rand`"|encurl}" alt="turing code"><br><input type=text name="turing" maxlength="6" size="10" class="inpts"></td>
</tr>
{/if}

<tr><td></td><td><input type="submit" value="Request Now &gt;&gt;" class="sbmt"></td></tr>
</table></form>
</td></tr></table>
</td></tr></table><br>
<script>setDefAccount();</script>
{else}
<table cellspacing=0 cellpadding=0 border=0 width=100% class="listbody">
<tr><td><strong> RCB For {$listing.name}</strong></td></tr>
<tr><td>Unfortunately ,We don't offer RCB for this Program at present .<br>
Please check it later or try other programs.<br>
Thanks for your support.<br>
</td></tr></table><br><br>
{/if}{/if}

{if $rcbdata}
<fieldset><legend><b>RCB Requested History</b></legend>
<table cellspacing=1 cellpadding=2 border=0 width=100%>  
<tr bgcolor="green">
 <th><b>Date</b></th>
 <th><b>User</b></th>
 <th><b>Deposit/RCB</b></th>
 <th><b>EC(A/C)</b></th>
 <th><b>Status</b></th>
</tr>
{section name=l loop=$rcbdata}
<tr bgcolor={if $smarty.section.l.rownum % 2 == 0}#F8F8F8{else}#FFFFF2{/if}>
 <td>{$rcbdata[l].rdate}</td>
 <td>{$rcbdata[l].username}</td>
 <td>${$rcbdata[l].deposit}/<font color="green">${$rcbdata[l].rcb}</font></td>
 <td>{$rcbdata[l].ec}({$rcbdata[l].ecno})</td>
 <td>{if $rcbdata[l].status == 0}Waiting For Check...{elseif $rcbdata[l].status == 1}Paid{if $rcbdata[l].batch}(batch={$rcbdata[l].batch}){/if}{else}Declined{/if}</td>
</tr>
{/section}
{else}
<tr><td>No Data Yet</td></tr>
{/if}
</table></fieldset>