<form action="my.php?item=$item$extratid$extrafid&filter=$filter" method="post">

<div class="msgtabs">
<div class="mysearch">{lang my_trade_goods_name} <input name="srchkey" value="$srchkey" size="27"> &nbsp;<button class="submit" type="submit" name="submit" value="true">{lang search}</button></div>
<strong>
<!--{if $item == 'selltrades'}-->{lang my_trade_selles} &#8212;&#8212; <!--{else}-->{lang my_trade_buys} &#8212;&#8212; <!--{/if}-->
<!--{if $filter == ''}-->{lang my_trade_trading}
<!--{elseif $filter == 'attention'}-->{lang my_trade_attention}
<!--{elseif $filter == 'eccredit'}-->{lang my_trade_eccredit}
<!--{elseif $filter == 'success'}-->{lang my_trade_success}
<!--{elseif $filter == 'closed'}-->{lang my_trade_closed}
<!--{elseif $filter == 'refund'}-->{lang my_trade_refund}
<!--{elseif $filter == 'unstart'}-->{lang my_trade_unstart}
<!--{elseif $filter == 'all'}-->{lang my_trade_all}
<!--{/if}-->
<!--{if $tid || $srchkey}-->[<a href="my.php?item=$item$extrafid&filter=$filter">{lang my_trade_view_all}</a>]<!--{/if}-->
</strong></div></form>

<table cellspacing="0" cellpadding="0" width="100%">
<thead>
<tr>
<td colspan="2">{lang my_trade_goods_name}</td>
<td>{lang my_trade_thread}</td>
<td><!--{if $item == 'selltrades'}-->{lang my_trade_buyer}<!--{else}-->{lang my_trade_seller}<!--{/if}--></td>
<td>{lang my_trade_amount}</td>
<td>{lang my_trade_status}</td>
<!--{if $filter == 'success' || $filter == 'refund' || $filter == 'eccredit'}--><td>{lang trade_rate}</td><!--{/if}-->
</tr>
</thead>
<tbody>
<!--{if $tradeloglist}-->
	<!--{loop $tradeloglist $tradelog}-->
		<tr height="80" class="row">
		<td width="80" align="center">
		<a href="viewthread.php?do=tradeinfo&tid=$tradelog[tid]&pid=$tradelog[pid]" target="_blank">
		<!--{if $tradelog['aid']}-->
			<img class="absmiddle" src="attachment.php?aid=$tradelog[aid]&amp;k={echo md5($tradelog[aid].md5($authkey).$timestamp);}&amp;t=$timestamp&noupdate=yes" onload="thumbImg(this)" width="80" height="80" alt="" border="0" />
		<!--{else}-->
			<img class="absmiddle" src="{IMGDIR}/trade_nophotosmall.gif" alt="" border="0" /></a>
		<!--{/if}-->
		</td>
		<td><a target="_blank" href="trade.php?orderid=$tradelog[orderid]">$tradelog[subject]</a></td>
		<td><a target="_blank" href="viewthread.php?do=tradeinfo&tid=$tradelog[tid]&pid=$tradelog[pid]">$tradelog[threadsubject]</a></td>
		<td>
		<!--{if $item == 'selltrades'}-->
			<!--{if $tradelog['buyerid']}--><a target="_blank" href="space.php?uid=$tradelog[buyerid]">$tradelog[buyer]</a><!--{else}-->$tradelog[buyer]<!--{/if}-->
		<!--{else}-->
			<a target="_blank" href="space.php?uid=$tradelog[sellerid]">$tradelog[seller]</a>
		<!--{/if}-->
		</td>
		<td>$tradelog[price]</td>
		<td><a target="_blank" href="trade.php?orderid=$tradelog[orderid]">
		<!--{if $tradelog['attend']}-->
			<b>$tradelog[status]</b>
		<!--{else}-->
			$tradelog[status]
		<!--{/if}-->
		</a><br />$tradelog[lastupdate]</td>
		<!--{if $filter == 'success' || $filter == 'refund' || $filter == 'eccredit'}-->
			<td align="center">
			<!--{if $tradelog[ratestatus] == 3}-->
				{lang eccredit_post_between}
			<!--{elseif ($item == 'buytrades' && $tradelog[ratestatus] == 1) || ($item == 'selltrades' && $tradelog[ratestatus] == 2)}-->
				{lang eccredit_post_waiting}
			<!--{else}-->
				<!--{if ($item == 'buytrades' && $tradelog[ratestatus] == 2) || ($item == 'selltrades' && $tradelog[ratestatus] == 1)}-->{lang eccredit_post_already}<br /><!--{/if}-->
				<!--{if $item == 'buytrades'}-->
					<a href="eccredit.php?action=rate&orderid=$tradelog[orderid]&type=0" target="_blank">{lang eccredit1}</a>
				<!--{else}-->
					<a href="eccredit.php?action=rate&orderid=$tradelog[orderid]&type=1" target="_blank">{lang eccredit1}</a>
				<!--{/if}-->
			<!--{/if}-->
			</td>
		<!--{/if}-->
		</tr>
	<!--{/loop}-->
<!--{else}-->
	<td colspan="7">{lang my_trade_nonexistence}</td></tr>
<!--{/if}-->
</tbody>
</table>