<?php $title = '日志《' . $this->filter($diary['subject']) . '》-'.setting('webname');?>
<?php include_once tpl('globalHeader');;?>
<style type="text/css">.f{color: #666666;}</style>
返回<?php echo ilink('日志',url('system',array('s'=>'member','c'=>'diary','uid'=>$diary['uid'])));?>.<?php echo memberLink();?>
<div class="nav">标题:<?php echo $this->filter($diary['subject']);?></div>
时间:<span class="f"><?php echo date('Y-m-d H:i:s', $diary['createdate']);?></span>
<br/>
人气:<span class="f"><?php echo $diary['views'];?></span>
<br/>
<div class="content">
<?php echo iUbbCode($this->filter($diary['content']));?>
</div>
<?php if ($diary['uid'] == $this->uid() || isGM()):?>
	<div class="block">[<?php echo ilink('编辑',url('system',array('s'=>'member','c'=>'diary','a'=>'edit','id'=>$diary['id'])));?>][<?php echo ilink('续写',url('system',array('s'=>'member','c'=>'diary','a'=>'append','id'=>$diary['id'])));?>][<?php echo ilink('删除',url('system',array('s'=>'member','c'=>'diary','a'=>'delete','id'=>$diary['id'])));?>]</div>
<?php endif;?>

<div class="kind">=书友留言=</div>
<?php if (!$diary['iscomment']):?>
	留言已关闭
<?php else:?>
	<?php if (!empty($comments)):?>
		<?php $count = $diary['comments'];?>
		<?php foreach ($comments as $comment):?>
            <div class="comment">
			[<?php echo $diary['comments']--;?>楼]<?php echo ilink($this->filter(userName($comment['uid'])),url('system',array('s'=>'member','uid'=>$comment['uid'])));?>:<?php echo iUbbCode($this->filter($comment['content']));?> (<span class="f"><?php echo date('y-m-d H:i:s', $comment['createdate']);?></span>)<?php if (isGM() || $this->uid() == $diary['uid']):?>[<?php echo ilink('删',url('system',array('s'=>'member','c'=>'diary','a'=>'cd','f'=>1,'id'=>$comment['id'])));?>]<?php endif;?>
            </div>
		<?php endforeach;?>
		<?php echo ilink('查看更多留言('.$count.')&gt;&gt;',url('system',array('s'=>'member','c'=>'diary','a'=>'comments','id'=>$diary['id'])));?><br/>
	<?php else:?>
		暂无留言
	<?php endif;?>
    <form action="<?php echo url('system',array('s'=>'member','c'=>'diary','a'=>'comment','id'=>$diary['id']));?>" method="post">
        <textarea style="width: 99%" name="comment"></textarea>
        <br/>
        <input type="submit" value="留言" />
    </form>
<?php endif;?>

返回<?php echo ilink('日志',url('system',array('s'=>'member','c'=>'diary','uid'=>$diary['uid'])));?>.<?php echo memberLink();?>
<br/>
<?php include_once tpl('globalFooter');?>