<!--{template 'head'}-->
<script>
setSubject("用户组管理");
</script>
<style type="text/css">
.item-list li{padding:3px 0}
.item-list li label{display:block;width:80px;float:left;text-align:right;padding-right:15px;}
</style>
<table cellpadding="0" cellspacing="0" border="0" align=center class="tableborder" >
	<tr>
		<td class="tablerow"><b>管理选项：</b> <a href="system.php?sys=group&action=manage">用户组管理</a> | <a href="system.php?sys=group&action=add">添加会员组</a> |  <a href="system.php?sys=group&action=cache">刷新缓存</a></td>
	</tr>
</table>
<!--{if $action=='manage'}-->
<table cellpadding="0" cellspacing="0" class="tableborder mt5" id="mytable">
	<tr>
		<th colspan=7>用户组管理</th>
	</tr>
	<tr align=center>
		<td width="5%" class="tablerowhighlight">ID</td>
		<td width="20%" class="tablerowhighlight">用户组名称</td>
		<td width="15%" class="tablerowhighlight">默认点数</td>
		<td width="15%" class="tablerowhighlight">类型</td>
		<td width="15%" class="tablerowhighlight">操作</td>
	</tr>
	<!--{loop $data $g}-->
	<tr class="item" id="item-{$g['gid']}">
		<td class="tablerowl">{$g['gid']}</td>
		<td style="padding-left:25px;">{$g['gname']}</td>
		<td style="text-align:center">{$g['point']}点</td>
		<td style="padding-left:25px;"><!--{if $g['type']==1}-->系统组<!--{else}-->自定义组<!--{/if}--></td>
		<td style="padding-left:25px;">
			<!--{if $g['gid'] > 1}-->
				<a href="system.php?sys=group&action=edit&gid={$g['gid']}">修改</a>
			<!--{/if}-->
			<!--{if $g['type'] == 0}-->
		 	  <a href="system.php?sys=group&action=delete&gid={$g['gid']}" onclick="if(!makeSure()) return false">删除</a>
			<!--{/if}-->
		</td>
	</tr>
	<!--{/loop}-->
</table>
<!--{elseif $action=='add' || $action=='edit'}-->
<script type="text/javascript">
function Check(){
	if($('gname').value.trim().length < 1){
		alert("请输入用户组名称");
		return false;
	}
	$('submit-act').disabled = true;
	return true;
}
</script>
<form method="post" name="myform" onsubmit="return Check()" action="system.php?sys=group&action={$action}&gid={$gid}">
<table cellpadding="0" cellspacing="0" class="tableborder" id="mytable">
	<tr>
		<th colspan=2><!--{if $action == 'add'}-->添加用户组<!--{else}-->修改用户组<!--{/if}--></th>
	</tr>
	<tr>
		<td width="20%" class="tablerowl">用户组名称</td>
		<td width="80%" class="tablerow"><input class="f-text" name="gname" id="gname" value="{$g['gname']}" size="30"  maxlength="50"></td>
	</tr>
	<!--{if $action == 'add'}-->
	<tr>
		<td class="tablerowl">计费方式</td>
		<td class="tablerow">
			<fieldset style="padding-left:12px;margin-bottom:12px">
				<p>默认可用点数 <input name="point" size="5" maxlength="50" value="100"> 点</p>
				<p style="color:blue;padding:6px 0">用户加入此用户组时，默认得到的点数</p>
			</fieldset>
		</td>
	</tr>
	<!--{else}-->
	<tr>
		<td class="tablerowl">计费方式</td>
		<td class="tablerow">
			<fieldset style="padding-left:12px;margin-bottom:12px">
				<p>默认可用点数 <input name="point" size="5" maxlength="10" value="{$g['point']}" /> 点</p>
				<p style="color:blue;padding:6px 0">用户加入此用户组时，默认得到的点数</p>
			</fieldset>
		</td>
	</tr>
	<!--{/if}-->
	<tr>
		<td class="tablerowl">权限</td>
		<td class="tablerow">
			<div class="item-list">
				<ul>
					<li><label for="purview_post">投稿</label><input type="checkbox" value="1" name="purview[post]" id="purview_post"<!--{if $g['purview']['post'] == 1}--> checked<!--{/if}--> /></li>
					<li><label for="purview_reply">评论</label><input type="checkbox" value="1" name="purview[reply]" id="purview_reply"<!--{if $g['purview']['reply'] == 1}--> checked<!--{/if}--> /></li>
					<li><label for="purview_upload">上传</label><input type="checkbox" value="1" name="purview[upload]" id="purview_upload"<!--{if $g['purview']['upload'] == 1}--> checked<!--{/if}--> /></li>
					<li><label for="purview_upload_ext">上传文件类型</label><input value="{$g['purview']['upload_ext']}" type="text" class="f-text" size="45" name="purview[upload_ext]" id="purview_upload_ext" /> <font color="blue">多种文件类型之间用“|”分隔</font></li>
					<li><label for="purview_upload_size">上传文件大小</label><input value="{$g['purview']['upload_size']}" type="text" class="f-text"size="10"  name="purview[upload_size]" id="purview_upload_size" /> <font color="blue">KB</font></li>
				</ul>
			</div>
		</td>
	</tr>
	<tr>
		<td class="tablerow"></td>
		<td class="tablerow">
			<input type="hidden"  name="update" value="1"/> 
			<input type="submit" class="f-button" value=" 确定 " name="submit" id="submit-act" />
		</td>
	</tr>
</table>
</form>
<!--{/if}-->
<!--{template 'foot'}-->