<?php include_once tpl('header');?>
<card title="留言列表 - <?php echo setting('webname');?>">
<p align="left">
日志:<?php echo ilink($this->filter($diary['subject']),url('system',array('s'=>'member','c'=>'diary','a'=>'read','id'=>$diary['id'])));?>
<br/>
-----------
<br/>
<?php if (!$diary['iscomment']):?>
	留言已关闭<br/>
<?php else:?>
	<?php if (!empty($comments)):?>
		<?php foreach ($comments as $comment):?>
			[<?php echo $floor--;?>楼]<?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','id'=>$comment['id'])));?>]<?php endif;?><br/>
		<?php endforeach;?>
		[共<?php echo $pageObj->getTotalRecord();?>条留言 <?php echo $pageObj->getCurrentPage();?>/<?php echo $pageObj->getTotalPage();?>]
	<br/>
	<?php echo $pageObj->show();?>
	<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','f'=>1,'id'=>$diary['id']));?>' accept-charset='utf-8' method='post'><postfield name='comment' value='$(comment)'/></go>留言</anchor><br/>
<?php endif;?>

<?php include_once tpl('footer');?>