<div class="yzm-comment-list-box">
{m:comment_list modelid="$modelid" catid="$catid" id="$id" limit="20"}
<div class="yzm-comment-list-top">共 {count($data)} 条评论</div>
<div class="yzm-comment-list-body">
<ul>
{loop $data $v}
<li>
<a class="user_pic" href="{U('member/myhome/init', array('userid'=>$v['userid']))}" target="blank"><img src="{if !empty($v['userpic'])}{$v[userpic]}{else}{STATIC_URL}images/default.gif{/if}" height="35" width="35"></a>
<div class="yzm-comm-right">
<a class="user_name" href="{U('member/myhome/init', array('userid'=>$v['userid']))}" target="blank">{$v[username]}</a>
<p>{nl2br($v['content'])}</p>
<p><span class="comm_time">{date('Y-m-d H:i:s',$v['inputtime'])}</span> <a href="javascript:toreply('{$v[id]}');" class="comm_a">回复</a></p>
<div id="rep_{$v[id]}" class="none">
<form action="{U('comment/index/init')}" method="post" onsubmit="return check_rep(this)">
<input type="hidden" name="modelid" value="{$modelid}">
<input type="hidden" name="catid" value="{$catid}">
<input type="hidden" name="id" value="{$id}">
<input type="hidden" name="title" value="{$title}">
<input type="hidden" name="url" value="{$url}">
<input type="hidden" name="reply" value="{$v[id]}">
<input type="hidden" name="reply_to" value="{$v[username]}">
<textarea name="content" class="textarea textarea2" placeholder="我来说两句~"></textarea>
<input type="submit" class="yzm-comment-submit static" name="dosubmit" value="提交">
</form>
</div>
</div>
</li>
{/loop}
{if empty($data)}<li>这篇文章还没有收到评论,赶紧来抢沙发吧~</li>{/if}
</ul>
</div>
</div> |