{:tpl head}
<table cellpadding="0" cellspacing="1" class="table_list">
 <caption>会员组管理</caption>
  <tr>
   <td>
    <strong>管理选项：</strong>
    <a href="?c=group&a=add">增加会员组</a> | <a href="?c=group">管理会员组</a>
   </td>
  </tr>
</table>
<!--{:if $a == 'add' || $a == 'edit'}-->
<table cellpadding="0" cellspacing="1" class="table_form">
 <caption>{:if $a == 'add'}增加{:else}修改{:/if}会员组</caption>
 <form name="myform" action="?c=group&a={:$a}" method="post">
 <input type="hidden" name="info[groupid]" value="{:$data['groupid']}" />
 <input type="hidden" name="forward" value="{:$referer}" />
 <tr>
  <td align="right" width="30%">名称：</td>
  <td><input type="text" size="30" name="info[name]" value="{:$data['name']}" require="true" datatype="require" msg="名称不能为空"> <span class="fred">*</span></td>
 </tr>
 <tr>
  <td align="right">说明：</td>
  <td><textarea name="info[description]" rows="6" cols="40">{:$data['description']}</textarea></td>
 </tr>
 <tr>
  <td align="right">允许发布：</td>
  <td><input type="radio" name="info[allowpost]" value="1"{:Tag::checked($data['allowpost'],'1')}>是&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="info[allowpost]" value="0"{:Tag::checked($data['allowpost'],'0')}>否</td>
 </tr>
 <tr>
  <td align="right">允许搜索：</td>
  <td><input type="radio" name="info[allowsearch]" value="1"{:Tag::checked($data['allowsearch'],'1')}>是&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="info[allowsearch]" value="0"{:Tag::checked($data['allowsearch'],'0')}>否</td>
 </tr>
 <tr>
  <td align="right">最大短消息数：</td>
  <td><input type="text" size="4" name="info[maxmessage]" value="{:$data['maxmessage']}"> 条</td>
 </tr>
 <tr>
  <td colspan="2" align="center"><button type="submit" name="submit">提交</button> <button type="button" name="back" onclick="history.back()">返回</button></td>
 </tr>
 </form>
</table>
<script type="text/javascript" src="../../statics/js/validator.js"></script>
<script type="text/javascript"> 
$(function(){$('form').checkForm(1);});
</script>
<!--{:elseif $a == 'defaults'}-->
<table cellpadding="0" cellspacing="1" class="table_list">
 <caption>管理会员组</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="10%">名称</th>
  <th width="5%">ID</th>
  <th>说明</th>
  <th width="10%">会员数</th>
  <th width="10%">排序</th>
  <th width="5%">发布</th>
  <th width="5%">搜索</th>
  <th width="5%">系统组</th>
  <th width="20%">操作</th>
 </tr>
 {:loop $data $v}
 <tr align="center">
  <td><input name="ids" type="checkbox" value="{:$v['groupid']}" /></td>
  <td>{:$v['name']}</a></td>
  <td>{:$v['groupid']}</td>
  <td align="left">{:$v['description']}</td>
  <td>{:$v['membernum']}</td>
  <td><input name="orderid[{:$v['groupid']}]" type="text" size="2" value="{:$v['orderid']}"></td>
  <td>{:if $v['allowpost']}<span class="fred">√</span>{:/if}</td>
  <td>{:if $v['allowsearch']}<span class="fred">√</span>{:/if}</td>
  <td>{:if $v['issystem']}<span class="fred">√</span>{:/if}</td>
  <td>
   {:if $v['membernum']}
   <a href="?c=member&groupid={:$v['groupid']}">查看</a>
   {:else}
   <span class="fgray">查看</span>
   {:/if}
   &nbsp;|&nbsp;<a href="?c=group&a=edit&groupid={:$v['groupid']}">修改</a>&nbsp;|&nbsp;
   {:if $v['issystem']}
   <span class="fgray">删除</span>
   {:else}
   <a href="?c=group&a=del&groupid={:$v['groupid']}">删除</a>
   {:/if}
  </td>
 </tr>
 {:/loop}
 <tr>
  <td height="20" colspan="10" class="align_c">
   <button name="select1" onclick="selAll(this.form.ids)" type="button">全选</button>
   <button name="select2" onclick="noSelAll(this.form.ids)" type="button">反选</button>
   <button name="order" type="button" onClick="subform(this.form,this.form.ids,'?c=group&a=order','')">排序</button>
  </td>
 </tr>
 </form>
</table>
<!--{:/if}-->
{:tpl foot}