<%template _header%>
<!--TheCurrent start-->
<div id="foruminfo">
	<div class="userinfo">
	<h2><a href="{config.forumurl}">{config.forumtitle}</a> <span>{forumnav}</span>
	    <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topicid},0)%>
	    <a href="{aspxrewriteurl}">{topictitle}</a> <strong>交易信息</strong></h2>
	</div>
</div>
<!--TheCurrent end-->
<%if page_err==0%>
	<!--1-->
<%if {ispost}%>
<!--2-->
<%template _msgbox%>
<%else%>
<!--3-->
<%if {buyit}==1%>
<!--4-->
<div class="ntforumbox">
		<div class="titlebar">
			<h3>购买主题</h3>
		</div>
		<div class="forumform">
   		 <form id="form1" name="form1" method="post" action="">
			<table cellpadding="0" cellspacing="0" border="0">
			<tbody>
				<tr class="list">
					<th class="formlabel">用户名:</th>
					<td class="formbody">{username} [<a href="logout.aspx?userkey={userkey}">退出登录</a>]</td>
				</tr>
			</tbody>
			<tbody>
				<tr class="list">
					<th class="formlabel">作者:</th>
					<td class="formbody">
					<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({posterid})%>
					<a href="{aspxrewriteurl}">{poster}</a></td>
				</tr>
			</tbody>
			<tbody>
				<tr class="list">
					<th class="formlabel">标题:</th>
					<td class="formbody">
					<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topicid},0)%>
					<a href="{aspxrewriteurl}">{topictitle}</a></td>
				</tr>
			</tbody>
			<tbody>
				<tr class="list">
					<th class="formlabel">售价({userextcreditsinfo.name}):</th>
					<td class="formbody">{topicprice}</td>
				</tr>
			</tbody>
			<tbody>
				<tr class="list">
					<th class="formlabel">作者所得({userextcreditsinfo.name}):</th>
					<td class="formbody">{netamount}</td>
				</tr>
			</tbody>
			<tbody>
				<tr class="list">
					<th class="formlabel">购买后余额({userextcreditsinfo.name}):</th>
					<td class="formbody">{userlastprice}</td>
				</tr>
			</tbody>
			<tbody>
				<tr class="list">
					<td colspan="2" class="formarea">
					<input class="sbutton" type="submit" name="paysubmit" value="提交">
					</td>
				</tr>
			</tbody>
			</table>
		 </form>
		</div>
</div>
<%else%>
	<!--5-->
<%if {showpayments}==1%>
		<!--6-->
		<div class="ntforumbox">
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<thead><tr>
						<th >{userextcreditsinfo.name}</th>
						<th>用户名</th>
						<th>时间</th>
				</tr></thead>
				<%loop paymentlog paymentloglist%>
				<tbody>
					<tr class="list" onmouseover="this.className='liston'" onmouseout="this.className='list'">
						<td class="topicicon">&nbsp;</td>
						<th class="topictitle">
						<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({paymentlog[uid]})%>
						<a href="{aspxrewriteurl}" target="_blank">{paymentlog[username]}</a></th>
						<td><div class="ForumBuyTopicLeft">{paymentlog[amount]}</td>
						<td>{paymentlog[buydate]}</td>
					</tr>
				</tbody>
				<%/loop%>
			</table>
		 </div>
<%/if%>
<%if {price}>0%>
	<!--7-->
		<div class="ntforumbox">
				<div class="titlebar">
					<h3>标题:{topictitle}</h3>
				</div>
				<div class="navformcommend" style="border-bottom:none;">本主题需向作者支付相应积分才能浏览，您可根据作者信誉、出售价格及已购买用户的评价确定购买与否。</div>
				<table cellpadding="0" cellspacing="0" border="0">
				<tbody>
					<tr class="list">
						<th class="formlabel">售价({userextcreditsinfo.name})</th>
						<td class="formbody">{topicprice}</td>
					</tr>
				</tbody>
				<tbody>
					<tr class="list">
						<th class="formlabel">积分交易税</th>
						<td class="formbody">{creditstax}%</td>
					</tr>
				</tbody>
				<tbody>
					<tr class="list">
				<div class="NtForumForm">
						<th class="formlabel">作者所得({userextcreditsinfo.name})</th>
						<td class="formbody">{netamount}</td>
					</tr>
				</tbody>
				<tbody>
					<tr class="list">
						<th class="formlabel">已购买人数</th>
						<td class="formbody">{buyers}</td>
					</tr>
				</tbody>
				<tbody>
					<tr class="list">
						<th class="formlabel">作者最高收入({userextcreditsinfo.name})</th>
						<td class="formbody">{maxincpertopic}</td>
					</tr>
				</tbody>
				<tbody>
					<tr class="list">
						<th class="formlabel">作者最高收入({userextcreditsinfo.name})</th>
						<td class="formbody">{maxincpertopic}</td>
					</tr>
				</tbody>
				<tbody>
					<tr class="list">
						<th class="formlabel">作者最高收入({userextcreditsinfo.name})</th>
						<td class="formbody">{maxincpertopic}</td>
					</tr>
				</tbody>
				<tbody>
					<tr class="list">
						<th class="formlabel">强制免费期限(小时)</th>
						<td class="formbody">{maxchargespan}</td>
					</tr>
				</tbody>
				<tbody>
					<tr class="list">
						<th class="formlabel">&nbsp;</th>
						<td class="formbody">
						<a href="buytopic.aspx?topicid={topicid}&showpayments=1">[查看付款记录]</a><a href="buytopic.aspx?topicid={topicid}&buyit=1">[购买主题]</a> <a href="#" onclick="history.go(-1)">[返回上一页]</a>
						</td>
					</tr>
				</tbody>
				</table>
		</div>
		<div class="ntforumbox">
			<div class="titlebar">
				<h3>最后5帖</h3>
			</div>
			<%loop lastpost lastpostlist%>
					<div class="list">
					<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({lastpost[posterid]})%>
					<a href="{aspxrewriteurl}"><strong>{lastpost[poster]}</strong></a>&nbsp;&nbsp;{lastpost[postdatetime]}</div>
					<p class="fontfamily">{lastpost[message]}</p>
			<%/loop%>
		</div>
	<%else%>
				此主题无需购买
	<%/if%>
<%/if%>
</div>
<%template _copyright%>
<%/if%>
<%else%>
<%template _errmsgbox%>
</div>
<%/if%>
<%template _footer%>
