<html>
<head>
<link href="{$site_root}{$template_root}/css/style.css" rel="stylesheet" type="text/css">
</head>
<title>{$lang.affiliate.profile} - {$affiliate.fullname}</title>
<body>
   <center>
   <table width="90%" cellspacing="0" cellpadding="4">
        <tr class="table_header">
                <td colspan="2">{$lang.affiliate.profile}</th>
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.affiliate_id}</td>
                <td width="50%">{$affiliate.id}</td>
        </tr>
        <tr class="table_row even">
                <td width="50%">{$lang.affiliate.username}</td>
                <td width="50%">{$affiliate.login}</td>
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.email}</td>
                <td width="50%"><a href="mailto:{$affiliate.email}">{$affiliate.email}</a></td>
        </tr>
        <tr class="table_row even">
        		<td width="50%">{$lang.affiliate.web_site}</td>
                <td width="50%"><a href="mailto:{$affiliate.email}">{$affiliate.web_site}</a></td>
        </tr>
        <tr class="table_row odd">
        		<td width="50%">{$lang.affiliate.phone}</td>
                <td width="50%">{$affiliate.telephone}</td>
        </tr>
        <tr class="table_row even">
        		<td width="50%">{$lang.affiliate.unique_uvisitors_pro}</td>
                <td width="50%">{$affiliate.unique_visitors}</td>
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.full_name}</td>
                <td width="50%">{$affiliate.fullname}</td>
        </tr>
        <tr class="table_row even">
                <td width="50%">{$lang.affiliate.paid_out}</td>
                <td width="50%">{$affiliate.out}$</td>
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.due}</td>
                <td width="50%">{$affiliate.due}$</td>
        </tr>
        <tr class="table_row even">
                <td width="50%">{$lang.affiliate.address}</td>
                <td width="50%">{$affiliate.address}</td>
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.city}</td>
                <td width="50%">{$affiliate.city}</td>
        </tr>
        <tr class="table_row even">
                <td width="50%">{$lang.affiliate.state}</td>
                <td width="50%">{$affiliate.state}</td>
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.zip}</td>
                <td width="50%">{$affiliate.zip}</td>
        </tr>
        <tr class="table_row even">
                <td width="50%">{$lang.affiliate.country}</td>
                <td width="50%">{$affiliate.country}</td>
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.bank}</td>
                <td width="50%">{$affiliate.bank}</td>
        </tr>
        <tr class="table_row even">
        	{if $affiliate.aff_type}
                <td width="50%">{$lang.affiliate.commission}</td>
                <td width="50%">{$affiliate.commission}%</td>
            {else}
            	<td width="50%">{$lang.affiliate.cost}</td>
                <td width="50%">{$affiliate.cost}$</td>
            {/if}
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.unique_clicks}</td>
                <td width="50%">{$affiliate.clicks}</td>
        </tr>
        <tr class="table_row even">
                <td width="50%">{$lang.affiliate.total_clicks}</td>
                <td width="50%">{$affiliate.tclicks} {if ($affiliate.tclicks>0)} (<a href="aff_affiliates_clicks.php?which={$affiliate.id}">{$lang.affiliate.view_listing}</a>) /{/if} (<a href="aff_affiliates_links.php?which={$affiliate.id}">{$lang.affiliate.view_links}</a>)</td>
        </tr>
        <tr class="table_row odd">
                <td width="50%">{$lang.affiliate.unique_banners}</td>
                <td width="50%">{$affiliate.shows}</td>
        </tr>
        <tr class="table_row even">
                <td width="50%">{$lang.affiliate.ctr}</td>
                <td width="50%">{$affiliate.ctr} ({$affiliate.ctrper}%)</td>
        </tr>

	<form method="post" action="aff_profile.php?id={$affiliate.id}" name="fmess">
        <tr class="table_header">
                <td colspan="2">{$lang.affiliate.messages}</th>
        </tr>
	{if $page_links}
        <tr class="table_row even">
		<td colspan=2>
			<b>{$lang.affiliate.pages}:</b>
			{section name=c loop=$page_links}
				<a href={$page_links[c].url}>{$page_links[c].text}</a>&nbsp;
			{/section}
		</font></td>
        </tr>
	{/if}
	{section name=num loop=$messages}
        <tr {if $smarty.section.num.index mod 2 eq 1}class="table_row even"{else}class="table_row odd"{/if}>
                <td width="50%">[{$messages[num].date}]<br>&lt;<b>{$messages[num].sender}</b>&gt;&nbsp;&lt;<b>{$messages[num].recipient}</b>&gt;</td>
                <td width="50%">{$messages[num].body}</td>
        </tr>
	{sectionelse}
        <tr class="table_row odd"> 
                <td width="100%" align="center" colspan="2"><i>{$lang.affiliate.no_messages}</i></td>
        </tr>
	{/section}
        <tr class="table_row even">
                <td width="50%">{$lang.affiliate.send_to} {$affiliate.login}</td>
                <td width="50%">
			<textarea rows="10" cols="50" name="message" style="padding: 1px 4px;"></textarea><br>
			<input type="hidden" name="action" value="Send">
		</td>
        </tr>
	</form>

   </table><br>
			<div class="fl" style="text-align:left;float:left;margin-left:62px;">
				<a href="#" class="admin_button_major" style="margin:0px;" id="" onclick="javascript: document.fmess.submit();">{$lang.button.send}<span>&nbsp;</span></a>
			</div>
<div class="fl" style="text-align:left;float:left;margin-left:50px;margin-top:5px;">
	<a href="#" style="margin:0px;" id="" onclick="javascript: window.close();opener.focus();">{$lang.button.close}<span>&nbsp;</span></a>
</div>
</center>
</body>
</html>
