<!--<?php
include_once PrintEot('m_header');
include_once PrintEot('user_space');
print <<<EOT
-->
<div id="content" class="fr">
	<div style="padding-top:10px;">
		<div class="cc p-info">
            <h1><strong class="f24 blue"><a href="u.php?uid=$u">$username</a></strong> <span class="f24 gray">/</span> <span class="red b f16">帖子</span> <span class="gray">( {$count}条 )</span></h1>
        </div>
        <div class="breadCrumb">
        <a href="u.php?uid=$u" class="gray">&laquo;返回首页继续浏览</a>
        </div>
	</div>
    <div id="content_main" class="fl">
		<div class="p15">
<!--
EOT;
if (empty($a)) {print<<<EOT
-->
            <div class="title_one cc">
                <span class="tab fr">
<!--
EOT;
if (empty($see)) {print<<<EOT
-->
                    <a href="javascript:;"><span>排序：</span></a> 
                    <a href="{$basename}ordertype=postdate"><span>按发表时间排序</span></a> 
                    <a href="{$basename}ordertype=lastpost"><span>回复时间</span></a>
                
<!--
EOT;
}print<<<EOT
-->
                    &nbsp;
                </span>
                <span class="tab fl">
                    <a href="{$basename}" id="a_article"><span>主题</span></a> 
                    <a href="{$basename}see=post" id="a_post"><span>回复</span></a> 
                    <a href="{$basename}see=trade" id="a_trade"><span>商品</span></a>
                </span>
            </div>
<!--
EOT;
}print <<<EOT
-->
            <div class="cc">
<!--
EOT;
if ($see != 'trade') {
print <<<EOT
-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">

<!--
EOT;
if (!empty($article)) {
foreach ($article as $key => $value) {print <<<EOT
-->
    <tr class="tr3">
        <td>
<!--
EOT;
if ($see == 'post') {print <<<EOT
-->
            <a href="job.php?action=topost&tid=$value[tid]&pid=$value[pid]" target="_blank">$value[subject]</a>		
<!--
EOT;
} else {print <<<EOT
-->
            <a href="read.php?tid=$value[tid]" target="_blank">$value[subject]</a>
<!--
EOT;
}print <<<EOT
-->
            <br /><span class="f10 gray">$value[postdate]</span>
        </td>
        <td><a href="thread.php?fid=$value[fid]" target="_blank">$value[forum]</a></td>
<!--
EOT;
if($see){print <<<EOT
-->
        <td><a href="u.php?uid=$value[authorid]">$value[author]</a></td>
<!--
EOT;
}print <<<EOT
-->
        <td class="f10">$value[replies]/$value[hits]</td>
    </tr>
<!--
EOT;
}} else {print <<<EOT
-->
    <tr>
        <td>没有主题</td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<div class="mt10">$pages</div>
<!--
EOT;
}elseif($see == 'trade'){
if (empty($job)) {print <<<EOT
-->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr class="tr3">
        <td width="13%">商品图片</td>
        <td>商品名称</td>
        <td width="13%">价格</td>
        <td width="15%">卖家</td>
        <td width="18%">交易状态</td>
    </tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
    <tr class="tr3">
        <td><img src="$value[icon]" width="40" height="40" /></td>
        <td><a href="read.php?tid=$value[tid]">$value[subject]</a></td>
        <td>$value[price]</td>
        <td><a href="u.php?uid=$value[seller]">$value[username]</a></td>
        <td>
<!--
EOT;
if ($value['ifpay'] == 4) {print <<<EOT
-->
        交易失败
<!--
EOT;
} elseif ($value['ifpay'] == 3) {print <<<EOT
-->
        交易完成
<!--
EOT;
} elseif ($value['ifpay'] == 2) {print <<<EOT
-->
        卖家已发货，<br />确认收货
<!--
EOT;
} elseif ($value['ifpay'] == 1) {print <<<EOT
-->
        买家已付款，<br />等待卖家发货
<!--
EOT;
} elseif ($value['ifpay'] == 0) {print <<<EOT
-->
        等待买家付款<br />
<!--
EOT;
}print <<<EOT
-->
            <div><a style="color:blue;" href="trade.php?action=order&oid=$value[oid]">详情</a></div>
        </td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<div class="mt10">$pages</div>
<!--
EOT;
} elseif ($job == 'onsale') {print <<<EOT
-->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr class="tr3">
        <td width="13%">商品图片</td>
        <td>商品名称</td>
        <td width="13%">价格</td>
        <td width="15%">商品数量</td>
        <td width="18%">出售数量</td>
    </tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
    <tr class="tr3">
        <td><img src="$value[icon]" width="40" height="40" /></td>
        <td><a href="read.php?tid=$value[tid]">$value[name]</a></td>
        <td>$value[price]</td>
        <td>$value[num]</td>
        <td>$value[salenum]</td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<div class="mt10">$pages</div>
<!--
EOT;
} elseif ($job == 'saled'){print <<<EOT
-->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr class="tr3">
        <td width="13%">商品图片</td>
        <td>商品名称</td>
        <td width="13%">价格</td>
        <td width="15%">买家</td>
        <td width="18%">交易状态</td>
    </tr>
<!--
EOT;
foreach ($trade as $key => $value) {print <<<EOT
-->
    <tr class="tr3">
        <td><img src="$value[icon]" width="40" height="40" /></td>
        <td><a href="read.php?tid=$value[tid]">$value[subject]</a></td>
        <td>$value[price]</td>
        <td><a href="u.php?uid=$value[buyer]">$value[username]</a></td>
        <td>
<!--
EOT;
if ($value['ifpay'] == 4) {print <<<EOT
-->
        交易失败
<!--
EOT;
} elseif ($value['ifpay'] == 3) {print <<<EOT
-->
        交易完成
<!--
EOT;
} elseif ($value['ifpay'] == 2) {print <<<EOT
-->
        卖家已发货，<br />确认收货
<!--
EOT;
} elseif ($value['ifpay'] == 1) {print <<<EOT
-->
        买家已付款，<br />等待卖家发货
<!--
EOT;
} elseif ($value['ifpay'] == 0) {print <<<EOT
-->
        等待买家付款
<!--
EOT;
}if($winduid == $u){print <<<EOT
-->
            <div><a style="color:blue;" href="trade.php?action=order&oid=$value[oid]">详情</a></div>
<!--
EOT;
}print <<<EOT
-->
        </td>
    </tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<div class="mt10">$pages</div>
<!--
EOT;
}}print <<<EOT
-->
</div>
        </div>
	</div>
<script language="javascript">setCurrent('a_$see','a_article','current');</script>
	<div class="fr" id="sidebar">
		<div class="p10 lh24">
<!--
EOT;
if ($see=='post') {
if ($p_table){print <<<EOT
-->

            <h2 class="b">选择表</h2>
            <ul>
                $p_table
            </ul>
<script language="javascript">setCurrent('up_post$ptable','up_post','current');</script>
<!--
EOT;
}
}elseif(empty($see) && empty($a)){
print <<<EOT
-->
            <h2 class="b">选择时间</h2>
            <ul>
                <li id="post_0"><a href="{$basename}posttime=0">所有主题</a></li>
                <li id="post_1"><a href="{$basename}posttime=1">1天内的主题</a></li>
                <li id="post_2"><a href="{$basename}posttime=2">2天内的主题</a></li>
                <li id="post_7"><a href="{$basename}posttime=7">1星期内的主题</a></li>
                <li id="post_30"><a href="{$basename}posttime=30">1个月内的主题</a></li>
                <li id="post_60"><a href="{$basename}posttime=60">2个月内的主题</a></li>
                <li id="post_90"><a href="{$basename}posttime=90">3个月内的主题</a></li>
                <li id="post_180"><a href="{$basename}posttime=180">6个月内的主题</a></li>
                <li id="post_365"><a href="{$basename}posttime=365">1年内的主题</a></li>
                <li id="post_366"><a href="{$basename}posttime=366">1年以上的主题</a></li>
            </ul>
<script language="javascript">setCurrent('post_$posttime','post_0','current');</script>
<!--
EOT;
} elseif ($see == 'trade') {print <<<EOT
-->
            <h2 class="b">商品</h2>
            <ul>
                <li id="uf_onsale"><a href="{$basename}see=trade&job=onsale">出售中的商品</a></li>
<!--
EOT;
if ($u == $winduid) {print <<<EOT
-->
                <li id="uf_buy"><a href="{$basename}see=trade">已买入的商品</a></li>
<!--
EOT;
}print <<<EOT
-->
                <li id="uf_saled"><a href="{$basename}see=trade&job=saled">已卖出的商品</a></li>
            </ul>
<script language="javascript">setCurrent('uf_$job','uf_buy','current');</script>
<!--
EOT;
}print <<<EOT
-->
		</div>
    </div>
</div>
<!--
EOT;
?>-->