fenpei.html
5.31 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<!-- saved from url=(0050)http://localhost/cms/index.php/admin/Article/index -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台管理系统</title>
<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>
$(document).ready(function(){
$("#SelectAll").click(function(){
$("input[name='id']").checkCbx();
});
$(".YanZheng").click(function(event){
var a=$("input:checked").length;
if(a==0){
alert('您还没有请选择操作内容!');
event.preventDefault();
}
});
});
$.fn.checkCbx = function(){
return this.each(function(){
this.checked = !this.checked;
});
}
/* 审核 */
function checkArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeck&id="+qstr;
}
/* 删除审核 */
function checkArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=ischeckd&id="+qstr;
}
/* 推荐 */
function adArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbest&id="+qstr;
}
/* 删除推荐 */
function adArcd(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="/admin.php?m=Authc&a=isbestd&id="+qstr;
}
/* 删除信息 */
function delArc(aid){
if(window.confirm('您确定要删除吗?')){
var qstr=getCheckboxItem();
location="<{:U('delallfenpei','','')}>/id/"+qstr;
}
else
{
return false;
}
}
/* 修改信息属性 */
function chang_status(id,value,table)
{
var newvalue=0;
if(value == 1)
newvalue=0;
else
newvalue=1;
var submitData = {
id:id,
status:newvalue,
table:table
};
$.post("<{:U('editattr')}>",submitData,
function(data) {
if (data.success == true) {
alert(data.msg);
setTimeout('window.location.href=location.href',1000);
return;
}
else {}
}
,'json');
}
/* 获得选中文件的文件名 */
function getCheckboxItem()
{
var allSel="";
//if(document.form2.id.value) return document.form2.id.value;
if($('input[name="id"]').length == 1 && $('input[name="id"]:checked').length == 1)
{
return document.form2.id.value;
}
for(i=0;i<document.form2.id.length;i++)
{
if(document.form2.id[i].checked)
{
if(allSel=="")
allSel=document.form2.id[i].value;
else
allSel=allSel+","+document.form2.id[i].value;
}
}
return allSel;
}
$(function(){
/* $('.confirmdel').click(function(){
var url=$(this).attr('href');
if(window.confirm('你确定要删除吗?'))
{
window.location=url;
}
return false;
});
*/
/* 全选
$('#selAll').click(function(){
$('input[name="id"]').attr('checked',true);
}); */
/* 取消全选
$('#noselAll').click(function(){
$('input[name="id"]').each(function () {
$(this).attr("checked", !$(this).attr("checked"));
});
}); */
});
</script>
<style>
#colid1 {
font-family: "宋体";
}
</style>
</head>
<body style="margin: 10px 0px;">
<div style="margin:0 auto; width:98%;">
<table class="table table-condensed table-bordered table-hover">
<tbody>
<tr>
<td colspan="10" style="padding-left:10px;">
<div style="float:left">
<b>角色分配管理</b>
</div>
<div style="float:right">
[<a href="<{:U('addfenpei')}>"><u>增加分配</u></a>]
</div>
</td>
</tr>
<form name="form2" action="<{:U('form')}>" method="post">
<tr align="center">
<td width="6%" class="text_center">ID</td>
<td width="4%" class="text_center">选择</td>
<td width="20%" class="text_center">会员名称</td>
<td width="40%" class="text_center">角色</td>
<td width="30%" class="text_center">管理项</td>
</tr>
<volist name="lists" id="list">
<tr class="text_center">
<td nowrap="" class="text_center"><{$list['id']}></td>
<td class="text_center"><input name="id" type="checkbox" id="check" value="<{$list.id}>" class="np"></td>
<td class="text_center"><{$list['username']['username']}></td>
<td class="text_center">
<volist name="list.group_id" id="v">
<{$groups.$v}>、
</volist>
</td>
<td class="text_center">
<a href='<{:U('editfenpei',array('id'=>$list['id']))}>' class="btn btn-mini"><i class="icon-edit"></i> 修改</a>
<a href='<{:U('delfenpei',array('id'=>$list['id']))}>' class="btn btn-mini"><i class="icon-trash"></i> 删除</a>
</td>
</tr>
</volist>
<tr>
<td colspan="10" align="right">
<input type="hidden" value="<{$_GET['p']}>" name="p">
<a href="javascript:void(0)" class="btn btn-mini" id="SelectAll"><i class="icon-check"></i> 全选/反选</a>
<button class="btn btn-mini YanZheng" name="Delete" value=" " type="button" style="cursor:pointer;" onclick="javascript:delArc(0);"><i class="icon-trash"></i> 删除</button>
</td>
</tr>
</form>
<tr>
<td colspan="10">
<div class="pagination">
<ul><{$page}></ul>
</div>
</td>
</tr>
</tbody></table>
</div>
</body></html>