{template header}
<!--{if empty($infloat)}-->
	{subtemplate header_nofloat}
<!--{/if}-->
<div class="float">
<div class="floatbox">
	<h3 class="float_ctrl">
		<em id="return_$handlekey">{lang pay_attachment}</em>
		<span>
			<!--{if !empty($infloat)}--><a href="javascript:;" class="float_close" onclick="floatwin('close_$handlekey')" title="{lang close}">{lang close}</a><!--{/if}-->
		</span>
	</h3>
	<form id="attachpayform" method="post" action="misc.php?action=attachpay{if !empty($infloat)}&paysubmit=yes&infloat=yes" onsubmit="ajaxpost('attachpayform', 'return_$handlekey', 'return_$handlekey', 'onerror');return false;"{else}"{/if}>
	<input type="hidden" name="formhash" value="{FORMHASH}" />
	<input type="hidden" name="referer" value="$referer" />
	<input type="hidden" name="aid" value="$aid" />
	<!--{if !empty($infloat)}--><input type="hidden" name="handlekey" value="$handlekey" /><!--{/if}-->
	<table class="list" cellspacing="0" cellpadding="0">
		<tr>
			<td width="120">{lang author}</td>
			<td><a href="space.php?uid=$attach[uid]">$attach[author]</a></td>
		</tr>
		<tr>
			<td>{lang attachment}</td>
			<td><div style="overflow:hidden;width:435px;">$attach[filename] <!--{if $attach['description']}-->($attach[description])<!--{/if}--></div></td>
		</tr>
		<tr>
			<td>{lang price}({$extcredits[$creditstransextra[1]][title]})</td>
			<td>$attach[price] {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr>
			<td>{lang pay_author_income}({$extcredits[$creditstransextra[1]][title]})</td>
			<td>$attach[netprice] {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr>
			<td>{lang pay_balance}({$extcredits[$creditstransextra[1]][title]})</td>
			<td>$balance {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr class="btns">
			<td>&nbsp;</td>
			<td><button class="submit" type="submit" name="paysubmit" value="true">{lang submit}</button></td>
		</tr>
	</table>
	</form>
</div>
</div>

<!--{if !empty($infloat)}-->
<script type="text/javascript" reload="1">
function submithandle_$handlekey(locationhref) {
	ajaxget('viewthread.php?tid=$attach[tid]&viewpid=$attach[pid]', 'post_$attach[pid]');
	floatwinreset = 1;
	floatwin('close_$handlekey');
}
</script>
<!--{/if}-->

<!--{if empty($infloat)}-->
	{subtemplate footer_nofloat}
<!--{/if}-->
{template footer}