addgroup.html 4.13 KB
<!DOCTYPE html>
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" href="__PUB__style/pp.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUB__style/bootstrap-responsive.min.css">
<script type="text/javascript" src="__PUB__js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUB__js/jquery.min.js"></script>
<script type="text/javascript" src="__PUB__js/common.js"></script>
	<script>
        /**
         *	实现全选
         *	@param fm 包裹的form表单
         */
        function selectAll(fm){
            if(fm.elements.length <= 0) {
                return;
            }else {
                for(var i in fm.elements) {
                    if(fm.elements[i].type == 'checkbox') {
                        fm.elements[i].checked = true;
                    }
                }
            }
        }

        /**
         *	取消全选
         */
        function UnSelectAll(fm) {
            if(fm.elements.length <= 0) {
                return;
            }else {
                for(var i in fm.elements) {
                    if(fm.elements[i].type == 'checkbox') {
                        fm.elements[i].checked = false;
                    }
                }
            }
        }
    </script>
    <style>
        .pp_button{padding:0px 8px; font-weight:bold; line-height:180%; font-size:13px;}
    </style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<form name="group" action="" method="post">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
	<td colspan="2" style="padding-left:10px;">
		<div style="float:left">
			<b>添加角色</b>
		</div>
		<div style="float:right">
			[<a href="<{:U('group')}>"><u>返回列表</u></a>]
		</div>
	</td>
</tr>
<tr>
	<td class="text_right_wid_90"><font color="red">角色名称:</font></td>
	<td><input name="title" type="text" value=""></td>
</tr>
<tr>
	<td class="text_right_wid_90"><font color="red">等级数:</font></td>
	<td><input name="grade" type="text" value=""> <span style="color:red">只能填写数字,如1,2,3...</span></td>
</tr>
<tr>
	<td class="text_right_wid_90"><font color="red">是否审核资料</font></td>
	<td>
		<input type="radio" name="isreview" value="1" checked="checked" />&nbsp; <input type="radio" name="isreview" value="0" />
	</td>
</tr>

<tr>
	<td class="text_right_wid_90"><font color="red">是否启用</font></td>
	<td>
		<input type="radio" name="status" value="1" checked="checked" /> 启用 &nbsp; <input type="radio" name="status" value="0" /> 关闭
	</td>
</tr>
<tr>
	<td class="text_right_wid_90"><font color="red">规则:</font></td>
	<td class="group_rule">
		<div><button class='btn btn-mini pp_button' onclick="selectAll(this.form);return false;">全 选</button>&nbsp;&nbsp;<button class='btn btn-mini pp_button' onclick="UnSelectAll(this.form);return false;">取消全选</button></div>
		<php>$empty='<a href="'.U('addrule').'">无规则,请先添加规则</a>';</php>
		<volist name="rules" id="v" empty="$empty">
		<php>
			if($catid != $v['catid'])
			{
				$catid=$v['catid'];
				$cat_true=true;
			}
			else
			{
				$cat_true=false;
			}
			if($cat_true) echo '<div class="title">'.$authcategory[$catid].'</div>';
		</php>
			<span><input name="rules[]" type="checkbox" value='<{$v.id}>' id="pp_<{$v.id}>" /> <label for="pp_<{$v.id}>" style="display:inline; font-size:12px;"><{$v.title}></label></span>
		</volist>
	</td>
</tr>
<tr>
	<td colspan="2" style="text-align:center">
		<input name="submit" type="submit" style=" background:url(__PUB__img/button_save.gif); width:60px; height:22px; border:0" value="   "> &nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="__PUB__img/button_back.gif" width="60" height="22" border="0"></a>
	</td>
</tr>   
</tbody>
</table>

</form>
</div>
</body>
</html>