{if $inactive}

<p>{$LANG.affiliatesdisabled}</p>

{else}

<p align="center">{$LANG.affiliatesrealtime}</p>

<p align="center"><strong>{$LANG.affiliatesreferallink}:</strong> <input type="text" size="60" value="{$referrallink}"></p>

<table align="center" class="clientareatable" style="width:50%;" cellspacing="1">
<tr class="clientareatableactive"><td width=230>{$LANG.affiliatesregdate}:</td><td>{$date}</td></tr>
<tr class="clientareatableactive"><td>{$LANG.affiliatesvisitorsreferred}:</td><td>{$visitors}</td></tr>
<tr class="clientareatableactive"><td>{$LANG.affiliatesbalance}:</td><td>{$balance}</td></tr>
<tr class="clientareatableactive"><td>{$LANG.affiliateswithdrawn}:</td><td>{$withdrawn}</td></tr>
</table>

{if $withdrawrequestsent}
<p align="center">{$LANG.affiliateswithdrawalrequestsuccessful}</p>
{else}
{if $withdrawlevel}<p align="center"><input type="button" value="{$LANG.affiliatesrequestwithdrawal}" onclick="window.location='{$smarty.server.PHP_SELF}?action=withdrawrequest'" class="button"></p>{/if}
{/if}

<p class="heading2">{$LANG.affiliatesreferals}</p>

<table align="center" class="clientareatable" cellspacing="1">
<tr class="clientareatableheading"><td>{$LANG.affiliatessignupdate}</td><td>{$LANG.orderproduct}</td><td>{$LANG.affiliatesamount}</td><td>{$LANG.orderbillingcycle}</td><td>{$LANG.affiliatescommission}</td><td>{$LANG.affiliatesstatus}</td></tr>
{foreach key=num item=referral from=$referrals}
<tr class="clientareatableactive"><td>{$referral.date}</td><td>{$referral.service}</td><td>{$referral.amount}</td><td>{$referral.billingcycle}</td><td>{$referral.commission}</td><td>{$referral.status}</td></tr>
{foreachelse}
<tr class="clientareatableactive"><td colspan="6">{$LANG.affiliatesnosignups}</td></tr>
{/foreach}
</table>

{if $affiliatelinkscode}
<p><strong>{$LANG.affiliateslinktous}</strong></p>
<p align="center">{$affiliatelinkscode}</p>
{/if}

{/if}