addgroup.html
4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!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" /> 是 <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" /> 启用 <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> <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=" "> <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>