<?php include_once tpl('header');?>
<card title="<?php echo $this->filter($thread['subject']);?> - 社区">
<p align="left">
<?php echo $this->nav($forum['fid']);?>
<br/>
标题:<?php echo $this->filter(sFilter($thread['subject']));?> [tid:<?php echo $tid;?>]<?php if ($thread['islock']):?><b>[已锁]</b><?php endif;?>
<br/>
楼主:<?php echo ilink($this->filter(userName($thread['uid'])),url('system',array('s'=>'member','uid'=>$thread['uid'])));?><?php if (!empty($thread['medals'])):?><?php echo implode(' ', $thread['medals']['images']);?><?php endif;?>(UID:<?php echo $thread['uid'];?>)
<br/>
时间:<?php echo date('H:i [Y-m-d]', $thread['createdate']);?>
<br/>
<?php if ($this->uid()):?><?php echo ilink('收藏', url('system', array('s'=>'bbs','a'=>'favorite','tid'=>$thread['id'])));?> <?php endif;?><?php if ($allows['leave']):?><?php echo ilink('留言',url('system',array('s'=>'bbs','c'=>'post','a'=>'leaveword','tid'=>$tid)));?> <?php endif;?><?php if ($allows['edit']):?><?php echo ilink('修改',url('system',array('s'=>'bbs','c'=>'thread','a'=>'edit','fid'=>$thread['fid'],'tid'=>$tid)));?><?php endif;?><?php if ($allows['append']):?> <?php echo ilink('续贴',url('system',array('s'=>'bbs','c'=>'post','a'=>'appendthread','tid'=>$tid)));?><?php endif;?><?php if ($allows['upload']):?> <?php echo ilink('+文件',url('system',array('s'=>'bbs','a'=>'upload','tid'=>$tid)));?><?php endif;?><?php if ($allows['delete']):?> <?php echo ilink('删除',url('system',array('s'=>'bbs','c'=>'manage','a'=>'deletethread','tid'=>$tid)));?><?php endif;?>
<br/>
--------------------------
<br/>
<?php if (!empty($thread['reward'])):?><?php echo $thread['reward'];?><br/>--------------------------<br/><?php endif;?>
<?php if (!empty($thread['polls'])):?><?php echo $thread['polls'];?><br/>--------------------------<br/><?php endif;?>
<?php if (5 == $thread['special']):?>
    【<?php echo $thread['robfloor']['header'];?><?php if ($thread['robfloor']['robstatus'] && ($thread['uid'] == $this->uid() || isGM($this->uid()))):?> <?php echo ilink('结束抢楼', url('system', array('s'=>'bbs', 'a'=>'efloor', 'tid'=>$tid)));?><?php endif;?>】<br/>
    【<?php echo $thread['robfloor']['body'];?> 截止楼层:<?php echo $thread['robfloor']['endfloor'];?>，奖励楼层:<?php echo $thread['robfloor']['awardfloors'];?> <?php echo ilink('查看中奖楼层', url('system', array('s'=>'bbs', 'c'=>'post', 'a'=>'floor','tid'=>$tid,'filter'=>'floor')));?>】<br/>
    ------------------------
    <br/>
<?php endif;?>
<?php echo sFilter($this->ubbCode($thread['content']));?>
<?php if (!empty($pageObj)):?>
	<br/>
	<?php echo ilink('全文阅读',url('system',array('s'=>'bbs','a'=>'thread','tid'=>$tid,'f'=>1)));?>(<?php echo $pageObj->getTotalPage();?>页)
	<?php echo $pageObj->show();?>
<?php endif;?>
<br/>
--------------------------
<br/>
<?php if (!empty($thread['leaveword'])):?>
	<?php $leaveWords = unserialize($thread['leaveword']);?>
	||楼主留言||
	<br/>
	<?php foreach ($leaveWords as $leave):?>
		&nbsp;&nbsp;<?php echo ilink($this->filter(Members::single()->getNameByUid($leave['uid'])),url('system',array('s'=>'member','uid'=>$leave['uid'])));?>:<?php echo $this->ubbCode($this->filter($leave['content']));?> [<?php echo date('y/m/d H:i',$leave['time']);?>]<br/>
	<?php endforeach;?>
	--------------------------
	<br/>
<?php endif;?>
<?php if (!empty($thread['attachments'])):?><?php echo $thread['attachments'];?><br/>--------------------------<br/><?php endif;?>
<?php if ($this->uid()):?>
    <?php if (!$thread['ismark'] && $allows['mark'] && $forum['forumset']['threadmark']):?>
        <?php echo ilink('已阅',url('system',array('s'=>'bbs','c'=>'manage','a'=>'mark','tid'=>$tid)));?>
    <?php endif;?>
	<?php if (!$thread['isdigest'] && $allows['digest']):?>
		<?php echo ilink('加精',url('system',array('s'=>'bbs','c'=>'manage','a'=>'digest','tid'=>$tid)));?>
	<?php elseif($thread['isdigest'] && $allows['undigest']):?>
		<?php echo ilink('取消精华',url('system',array('s'=>'bbs','c'=>'manage','a'=>'undigest','tid'=>$tid)));?>
	<?php endif;?>
	<?php if (!$thread['islock'] && $allows['lock']):?>
		<?php echo ilink('锁贴',url('system',array('s'=>'bbs','c'=>'manage','a'=>'lock','tid'=>$tid)));?>
	<?php elseif($thread['islock'] && $allows['unlock']):?>
		<?php echo ilink('解锁',url('system',array('s'=>'bbs','c'=>'manage','a'=>'unlock','tid'=>$tid)));?>
	<?php endif;?>
    <?php if ($allows['warning']):?>
        <?php echo ilink('警告',url('system',array('s'=>'bbs','c'=>'manage','a'=>'warning','tid'=>$tid,'uid'=>$thread['uid'])));?>
    <?php endif;?>
	<?php if ($allows['push']):?>
		<?php echo ilink('提前',url('system',array('s'=>'bbs','c'=>'manage','a'=>'push','tid'=>$tid)));?>
	<?php endif;?>
	<?php if ($allows['sink']):?>
		<?php echo ilink('下沉',url('system',array('s'=>'bbs','c'=>'manage','a'=>'sink','tid'=>$tid)));?>
	<?php endif;?>
	<?php if ($allows['move']):?>
		<?php echo ilink('移动',url('system',array('s'=>'bbs','c'=>'manage','a'=>'move','tid'=>$tid)));?>
	<?php endif;?>
	<?php if ($allows['ban']):?>
		<?php echo ilink('禁止',url('system',array('s'=>'bbs','c'=>'manage','a'=>'ban','tid'=>$tid,'uid'=>$thread['uid'])));?>
	<?php endif;?>
	<?php if ($thread['topped']):?>
		<?php if (1 == $thread['topped'] && $allows['top1']):?><?php echo ilink('取消置顶1',url('system',array('s'=>'bbs','c'=>'manage','a'=>'untopped','v'=>1,'tid'=>$tid)));?><?php endif;?>
		<?php if (3 == $thread['topped'] && $allows['top3']):?><?php echo ilink('取消置顶3',url('system',array('s'=>'bbs','c'=>'manage','a'=>'untopped','v'=>3,'tid'=>$tid)));?><?php endif;?>
	<?php elseif(!$thread['topped']):?>
		<?php if ($allows['top1']):?><?php echo ilink('置顶1',url('system',array('s'=>'bbs','c'=>'manage','a'=>'topped','v'=>1,'tid'=>$tid)));?><?php endif;?>
		<?php if ($allows['top3']):?><?php echo ilink('置顶3',url('system',array('s'=>'bbs','c'=>'manage','a'=>'topped','v'=>3,'tid'=>$tid)));?><?php endif;?>
	<?php endif;?>
	<?php if ($allows['rating'] && $this->uid() != $thread['uid']):?>
		<?php echo ilink('评分', url('system',array('s'=>'bbs','c'=>'post','a'=>'rating','tid'=>$tid)));?>
	<?php endif;?>
	<br/>
<?php endif;?>
评价:<?php echo ilink('顶('.$thread['dig'].')',url('system',array('s'=>'bbs','a'=>'dig','tid'=>$tid,'t'=>'dig')));?>.<?php echo ilink('踩('.$thread['fight'].')',url('system',array('s'=>'bbs','a'=>'dig','tid'=>$tid,'t'=>'fight')));?>
<br/>
<?php echo ilink('帖子评分记录('.$thread['rating'].'次'.($thread['ratings'] ? ' +'.$thread['ratings'] : '').')',url('system',array('s'=>'bbs','a'=>'rating','tid'=>$tid)));?>
<br/>
<?php if (!empty($thread['lastupdate'])):?>
    <?php $lastupdate = unserialize($thread['lastupdate']);?>
    [最后编辑:<?php echo ilink(userName($lastupdate['uid']),url('system',array('s'=>'member','uid'=>$lastupdate['uid'])));?> <?php echo date('Y-m-d H:i:s',$lastupdate['time']);?>]
    <br/>
<?php endif;?>
<?php if (!empty($thread['sign'])):?>楼主签名:<?php echo $thread['sign'];?><br/><?php endif;?>

=*您是第(<?php echo $thread['hits'];?>)位访客*=
<br/>
<b>=最新回复=</b>(<?php echo ilink($thread['replies'],url('system',array('s'=>'bbs','c'=>'post','a'=>'list','tid'=>$tid)));?>)
<br/>
<?php if (!empty($posts)):?>
	<?php $count = $thread['replies'];$hasTop = false;?>
	<?php foreach ($posts as $post):?>
		<?php if ($post['toped']):?><b>[置顶]</b><?php $hasTop = true;?><?php else:?>[<b><?php echo $post['floor'];?>楼</b>]<?php endif;?><?php echo ilink($this->filter(userName($post['uid'])),url('system',array('s'=>'bbs','c'=>'post','a'=>'to','pid'=>$post['id'])));?>:<?php echo sFilter($this->ubbCode($post['content']));?>(<?php echo date('y/m/d H:i',$post['createdate']);?>)<?php if ($this->showLite($allows)):?>[<?php echo ilink('管理', url('system', array('s'=>'bbs','c'=>'manage','a'=>'lite','pid'=>$post['id'])));?>]<?php endif;?>
		<?php if (!empty($post['reward'])):?><br/><?php echo $post['reward'];?><?php endif;?>
		<br/>
	<?php endforeach;?>
	<?php echo ilink('查看更多回复('.$count.')&gt;&gt;',url('system',array('s'=>'bbs','c'=>'post','a'=>'list','tid'=>$tid)));?>
	<br/>
<?php else:?>
	暂无回复<br/>
<?php endif;?>
<?php echo randAd();?>
<?php if ($allows['reply']):?>
<input type="text" name="content" value="" size="20" />
<br/>
<anchor title="提交">快速回复<go method="post" href="<?php echo url('system',array('s'=>'bbs','c'=>'post','a'=>'reply','tid'=>$tid));?>">
	<postfield name="content" value="$(content)"/>
</go></anchor>
<br/>
<?php endif;?>
-----------------------
<br/>
搜索:
<?php
$easou = new iEasou(array(array(4, '美图'), array(11, '网页'), array(11 , '新闻')));
echo $easou->show();
?>
<br/>
<?php echo randAd('other', '391,392,393');?>
<?php echo date('n/d H:i:s');?>
<br/>
<?php echo $this->nav($forum['fid']);?>
</p>
</card>
</wml>