<?php include_once tpl('header');?>
<card title="阅读日志 - <?php echo setting('webname');?>">
<p align="left">
标题:<?php echo $this->filter($diary['subject']);?>
<br/>
时间:<?php echo date('Y-m-d H:i:s', $diary['createdate']);?>
<br/>
人气:<?php echo $diary['views'];?>
<br/>
---------------
<br/>
<?php echo iUbbCode($this->filter($diary['content']));?>
<br/>
---------------
<br/>
<?php if ($diary['uid'] == $this->uid() || isGM()):?>
	[<?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'])));?>]<br/>
<?php endif;?>
<br/>
=书友留言=
<br/>
<?php if (!$diary['iscomment']):?>
	留言已关闭<br/>
<?php else:?>
	<?php if (!empty($comments)):?>
		<?php $count = $diary['comments'];?>
		<?php foreach ($comments as $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']));?> (<?php echo date('y-m-d H:i:s', $comment['createdate']);?>)<?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;?><br/>
		<?php endforeach;?>
		<?php echo ilink('查看更多留言('.$count.')&gt;&gt;',url('system',array('s'=>'member','c'=>'diary','a'=>'comments','id'=>$diary['id'])));?><br/>
	<?php else:?>
		暂无留言<br/>
	<?php endif;?>
	<input name='comment' size='4' type='text' /><anchor><go href='<?php echo url('system',array('s'=>'member','c'=>'diary','a'=>'comment','id'=>$diary['id']));?>' accept-charset='utf-8' method='post'><postfield name='comment' value='$(comment)'/></go>留言</anchor><br/>
<?php endif;?>
<br/>
返回<?php echo ilink('日志',url('system',array('s'=>'member','c'=>'diary','uid'=>$diary['uid'])));?>.<?php echo memberLink();?>
<br/>
<?php include_once tpl('footer');?>