{if $inactive}

			<div class="notice notice-error">
				<div class="inside">
					<p>{$LANG.affiliatesdisabled}</p>
				</div>
			</div>

{else}

{if $withdrawrequestsent}

			<div class="notice notice-success">
				<div class="inside">
					<p>{$LANG.affiliateswithdrawalrequestsuccessful}</p>
				</div>
			</div>

{else}

{if $withdrawlevel}

<p class="center">

  <input type="button" value="{$LANG.affiliatesrequestwithdrawal}" onclick="window.location='{$smarty.server.PHP_SELF}?action=withdrawrequest'" class="button1 color2">
</p>

{/if}
{/if}

		<div class="bigheader">
			<h2>{$LANG.affiliatesreferallink}</h2>
		</div><!-- .bigheader -->

<p class="center">
  <input type="text" class="referrallink inputstyle" value="{$referrallink}">
</p>

		<div class="bigheader">
			<h2>{$LANG.affiliates_statistics}</h2>
		</div><!-- .bigheader -->

<div class="table-responsive table-grey" id="stats">
<table>
        <tr>
          <td width="30%"><strong>{$LANG.affiliatesvisitorsreferred}:</strong></td>
          <td>{$visitors}</td>
        </tr>
        <tr>
          <td><strong>{$LANG.affiliatessignups}:</strong></td>
          <td>{$signups}</td>
        </tr>
        <tr>
          <td><strong>{$LANG.affiliatesconversionrate}:</strong></td>
          <td>{$conversionrate}%</td>
        </tr>
</table>
</div>

		<div class="bigheader">
			<h2>{$LANG.affiliates_commissions}</h2>
		</div><!-- .bigheader -->

<div class="table-responsive table-grey">
<table>
        <tr>
          <td width="30%"><strong>{$LANG.affiliatescommissionspending}:</strong></td>
          <td>{$pendingcommissions}</td>
        </tr>
        <tr>
          <td><strong>{$LANG.affiliatescommissionsavailable}:</strong></td>
          <td>{$balance}</td>
        </tr>
        <tr>
          <td><strong>{$LANG.affiliateswithdrawn}:</strong></td>
          <td>{$withdrawn}</td>
        </tr>
</table>
</div>

		<div class="bigheader">
			<h2>{$LANG.affiliatesreferals}</h2>
		</div><!-- .bigheader -->

<div class="table-responsive table-grey">
<table>
  <tr>
    <th>{$LANG.affiliatessignupdate}</th>
    <th>{$LANG.orderproduct}</th>
    <th>{$LANG.affiliatesamount}</th>
    <th>{$LANG.affiliatescommission}</th>
    <th>{$LANG.affiliatesstatus}</th>
  </tr>
  {foreach key=num item=referral from=$referrals}
  <tr>
    <td>{$referral.date}</td>
    <td>{$referral.service}</td>
    <td>{$referral.amountdesc}</td>
    <td>{$referral.commission}</td>
    <td>{$referral.status}</td>
  </tr>
  {foreachelse}
  <tr>
    <td colspan="5" align="center">{$LANG.affiliatesnosignups}</td>
  </tr>
  {/foreach}
</table>
</div>

{if $affiliatelinkscode}
<p><strong>{$LANG.affiliateslinktous}</strong></p>

<p class="center">{$affiliatelinkscode}</p>
{/if}

{/if}