{:tpl head}
<div class="tabshead">
 <span>评论管理</span>
 <ul class="tabs1" id="tabs_list">
  <li class="{:if $m==''}active{:/if}"><a href="?c=comment">管理首页</a></li>
  <!--{:loop $modules $k $v}-->
  <li class="{:if $m==$v['name']}active{:/if}"><a href="?{:if $v['extrcomment']}c={:$v['name']}&a=comment{:else}c=comment&m={:$v['name']}{:/if}">{:$v['title']}</a></li>
  <!--{:/loop}-->
 </ul>
</div>
<table cellpadding="0" cellspacing="1" class="table_list">
  <!--{:if empty($m)}-->
  <tr>
   <td width="20%" align="right">评论总数：</td>
   <td>{:$totle}</td>
  </tr>
  <tr>
   <td align="right">待审核评论：</td>
   <td>总数 <span class="fred">{:$totle1}</span>{:if $commentModule}，其中 {:loop $commentModule $k $v}{:if $k}，{:/if}<a href="?{:if $v['extrcomment']}c={:$v['name']}&a=comment{:else}c=comment&m={:$v['name']}{:/if}&passed=0">{:$v['title']} <span class="fred">{:$v['cnt1']}</span></a>{:/loop}{:/if}</td>
  </tr>
  <tr>
   <td align="right">已审核评论：</td>
   <td>总数 {:$totle2}{:if $commentModule}，其中 {:loop $commentModule $k $v}{:if $k}，{:/if}<a href="?{:if $v['extrcomment']}c={:$v['name']}&a=comment{:else}c=comment&m={:$v['name']}{:/if}&passed=1">{:$v['title']} {:$v['cnt2']}</a>{:/loop}{:/if}</td>
  </tr>
  <!--{:else}-->
  <tr>
   <td>
    <strong>管理选项：</strong>
    <a href="?c={:$c}&m={:$m}">已审核评论</a>&nbsp;|&nbsp;<a href="?c={:$c}&m={:$m}&passed=0">待审核评论</a>
   </td>
  </tr>
  <!--{:/if}-->
</table>
<!--{:if $a == 'edit'}-->
<form action="?c=comment&a={:$a}" method="post" name="myform">
<table cellpadding="0" cellspacing="1" class="table_form">
 <caption>修改评论</caption>
 <input type="hidden" name="info[cid]" value="{:$data['cid']}" />
 <input type="hidden" name="info[id]" value="{:$data['id']}" />
 <input type="hidden" name="info[module]" value="{:$data['module']}" />
 <input type="hidden" name="forward" value="{:$referer}" />
 <tbody id="comment">
 <tr>
  <td align="right">评论内容：</td>
  <td>
   {:Tag::editor('content', 'info[content]', $data['content'], 'comment', 300, '100%', 'normal', 'require="true" datatype="require" msg="回复不能为空" msgid="content_info"')}<br />
   <span id="content_info"></span>
  </td>
 </tr>
 <tr>
  <td align="right">审核状态：</td>
  <td>
  <input type="radio" name="info[passed]" value="1"{:Tag::checked($data['passed'],1)} />通过
  <input type="radio" name="info[passed]" value="0"{:Tag::checked($data['passed'],0)} />待审
  </td>
 </tr>
 <tr>
  <td align="right">选 项：</td>
  <td><input name="saveremote" type="checkbox" value="1">远程上传</td>
 </tr>
 <tr>
  <td colspan="2" height="30" align="center"><button type="submit" name="submit" value="submit">提交</button></td>
 </tr>
</table>
</form>
<script type="text/javascript" src="../../statics/js/validator.js"></script>
<script language="javascript" type="text/javascript">
$(function(){
	$('form').checkForm(1);
})
</script>
<!--{:elseif $a == 'defaults' && $module}-->
<table cellpadding="0" cellspacing="1" class="table_list">
 <caption>{:if $passed==1}已{:else}未{:/if}审核{:$module['title']}评论管理</caption>
 <form name="myform" method="post">
 <input type="hidden" value="" name="selids" />
 <tr align="center">
  <th width="5%"><input name="checkbox" type="checkbox" onclick="checkorno(this,this.form.ids)" /></th>
  <th width="25%">标题</th>
  <th width="10%">用户</th>
  <th width="10%">发表时间</th>
  <th width="35%">内容</th>
  <th width="15%">管理操作</th>
 </tr>
 {:loop $data $v}
 <tr align="center">
  <td><input name="ids" type="checkbox" value="{:$v['cid']}" /></td>
  <td align="left"><a href="{:Url :: getContentUrl($module['name'], $v['id'])}" target="_blank">{:$v['title']}</a></td>
  <td>{:$v['username']}</td>
  <td>{:Tag::date($v['addtime'],1)}</td>
  <td align="left">{:Tag::cut($v['content'],200,1)}</td>
  <td>{:if $passed}已审{:else}<a href="?c=comment&a=check&selids={:$v['cid']}" class="fred">审核</a>{:/if}&nbsp;|&nbsp;<a href="?c=comment&a=edit&cid={:$v['cid']}">修改</a>&nbsp;|&nbsp;<a href="?c=comment&a=del&selids={:$v['cid']}">删除</a></td>
 </tr>
 {:/loop}
 <tr>
  <td height="20" colspan="6" align="center">
   <button name="select1" onclick="selAll(this.form.ids)" type="button">全选</button>
   <button name="select2" onclick="noSelAll(this.form.ids)" type="button">反选</button>
   {:if !$passed}<button name="submitsh" type="button" onClick="subform(this.form,this.form.ids,'?c=comment&a=check','')">批量审核</button>{:/if}
   <button name="submitsc" type="button" onClick="subform(this.form,this.form.ids,'?c=comment&a=del','确认删除吗？此操作不可恢复')">删除</button>
  </td>
 </tr>
 </form>
</table>
{:if $pages}<div class="pages">{:$pages}</div>{:/if}
<!--{:/if}-->
{:tpl foot}