-
Notifications
You must be signed in to change notification settings - Fork 0
/
t_banjixinxi.html
347 lines (335 loc) · 12.8 KB
/
t_banjixinxi.html
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>班级信息</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- 引入 Bootstrap -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" href="css/mui.min.css">
<script src="js/tool.js"></script>
<script src="js/mui.min.js"></script>
<!-- HTML5 Shim 和 Respond.js 用于让 IE8 支持 HTML5元素和媒体查询 -->
<!-- 注意: 如果通过 file:// 引入 Respond.js 文件,则该文件无法起效果 -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
function F_Open_dialog()
{
document.getElementById("btn_file").click();
}
</script>
<style >
.body
{
background-color: #EFEFF4;
}
.top
{
margin-top: 10%;
margin-left: 35%;
}
.top-inner
{
margin-left: 30%;
}
.all
{
background-image: url("images/pic.png");
margin-bottom: 5%;
padding: 1px,1px,1px,1px;
}
.top-classname
{
margin-left: 3%;
}
.row-fluid-3
{
margin-top: 5%;
background-color: #FFFFFF;
}
.row-fluid02-1
{
position: left;
}
.span6-1
{
position: right;
}
.mui-table-view{
margin-top: 5%;
}
</style>
</head>
<body>
<div style="margin-right: 5px;">
<a class="mui-icon mui-icon-left-nav mui-pull-left" style="color: #555555;margin-top: 20px;" id="back"></a>
<a style="margin-top: 20px;color: #555555;" href="#popover" class="mui-action-menu mui-icon mui-icon-bars mui-pull-right" ></a>
</div>
<div id="popover" style="width: 160px;" class="mui-popover">
<ul class="mui-table-view">
<li class="mui-table-view-cell"><a id="exit"><span style="margin-left: 10px;">退出班级</span></a></li>
<li class="mui-table-view-cell"><a id="dismissClass"><span style="margin-left: 10px;">解散班级</span></a></li>
</ul>
</div>
</div>
<div class="all">
<div class="container">
<div class="row-fluid-1" >
<div class="span12-1">
<div class="top" style="text-align: center;padding-right: 35%;">
<input type="file" id="btn_file" style="display: none">
<img width="70px" height="70px" src="images/user.png" class="img-circle" onclick="F_Open_dialog()" />
<div class="top-classname" id="classname" style="margin-top: 3%;">
</div>
<div id="classid" style="font-size:5px;">
</div>
</div>
<div class="top-inner" id="top-inner">
<!--<em>班级号:10067</em>-->
</div>
</div>
</div>
</div>
</div>
<ul class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<a id="chengyuan"><li class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<div class="mui-slider-cell">
<div class="oa-contact-cell mui-table">
<div class="oa-contact-avatar mui-table-cell" style="vertical-align:middle ;width:30%;float:left;top:8px;padding-left:8%;">
<img src="images/group8.png" width="40px"/>
</div>
<div class="oa-contact-content mui-table-cell" style="text-align:center;width:70%;float:right;top:4px;padding-right:15%;">
<div class="mui-clearfix">
<h4 class="oa-contact-name" id="classnumber" style="color:#000000;">
</h4>
</div>
<p class="oa-contact-name">班级成员</p>
</div>
</div>
</div>
</li>
</a>
<li class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<div class="mui-slider-cell">
<div class="oa-contact-cell mui-table">
<div class="oa-contact-avatar mui-table-cell" style="vertical-align:middle ;width:30%;float:left;top:8px;padding-left:8%;">
<img src="images/time_gray.png" width="40px"/>
</div>
<div class="oa-contact-content mui-table-cell" style="text-align:center;width:70%;float:right;top:4px;padding-right:15%;">
<div class="mui-clearfix">
<h4 class="oa-contact-name" id="createtime"></h4></div>
<p class="oa-contact-name">创建日期</p>
</div>
</div>
</div>
</li>
<a id="wenjian"><li class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<div class="mui-slider-cell">
<div class="oa-contact-cell mui-table">
<div class="oa-contact-avatar mui-table-cell" style="vertical-align:middle ;width:30%;float:left;top:8px;padding-left:9%;">
<img src="images/file.png" width="30px"/>
</div>
<div class="oa-contact-content mui-table-cell" style="text-align:center;width:70%;float:right;top:4px;padding-right:15%;">
<div class="mui-clearfix">
<h4 class="oa-contact-name" > </h4></div>
<p class="oa-contact-name">班级文件</p>
</div>
</div>
</div>
</li>
</a>
<a id="apply"><li class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<div class="mui-slider-cell">
<div class="oa-contact-cell mui-table">
<div class="oa-contact-avatar mui-table-cell" style="vertical-align:middle ;width:30%;float:left;top:8px;padding-left:9%;">
<img src="images/file.png" width="30px"/>
</div>
<div class="oa-contact-content mui-table-cell" style="text-align:center;width:70%;float:right;top:4px;padding-right:15%;">
<div class="mui-clearfix" >
<h4 class="oa-contact-name" ></h4>            
<span style="background-color:#BCE8F1;color:#222222;" class="mui-badge" id="count">
</span></div>
<p class="oa-contact-name">
申请消息
</p>
</div>
</div>
</div>
</li>
</a>
<a id="cVote" ><li class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<div class="mui-slider-cell">
<div class="oa-contact-cell mui-table">
<div class="oa-contact-avatar mui-table-cell" style="vertical-align:middle ;width:30%;float:left;top:8px;padding-left:9%;">
<img src="images/vote.png" width="30px"/>
</div>
<div class="oa-contact-content mui-table-cell" style="text-align:center;width:70%;float:right;top:4px;padding-right:15%;">
<div class="mui-clearfix">
<h4 class="oa-contact-name" > </h4></div>
<p class="oa-contact-name">投票</p>
</div>
</div>
</div>
</li>
</a>
<a id="graph" href="studentgraph.html"><li class="mui-table-view mui-table-view-striped mui-table-view-condensed">
<div class="mui-slider-cell">
<div class="oa-contact-cell mui-table">
<div class="oa-contact-avatar mui-table-cell" style="vertical-align:middle ;width:30%;float:left;top:8px;padding-left:9%;">
<img src="images/vote.png" width="30px"/>
</div>
<div class="oa-contact-content mui-table-cell" style="text-align:center;width:70%;float:right;top:4px;padding-right:15%;">
<div class="mui-clearfix">
<h4 class="oa-contact-name" > </h4></div>
<p class="oa-contact-name">课程知识图谱</p>
</div>
</div>
</div>
</li>
</a>
</ul>
<script src="https://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/jquery-3.2.1.min.js" type="text/javascript"></script>
<script>
var classid=UrlParm.parm("classid");
var userid = GetUseridCookie().get("userid");
document.getElementById('back').href="banji.html"
var usertype = GetUsertypeCookie().get("usertype");
if(usertype==2){
document.getElementById('back').href="t_banji.html";
}
document.getElementById('cVote').href='t_vote.html?classid='+classid;
(function($, doc) {
jQuery.noConflict();
var classnumber = document.getElementById("classnumber");
var createtime=document.getElementById("createtime");
var classname=document.getElementById("classname");
var classmember=document.getElementById("classmember");
var wenjian=document.getElementById("wenjian");
var dis = document.getElementById("dismissClass");
var exitClass = document.getElementById('exit');
var applyinfo=UrlParm.parm('applyinfo');
// dis.href="dismissclass.html?classid="+classid;
dis.onclick = function(){
disclass();
}
exitClass.onclick = function(){
exitclass();
}
wenjian.href="t_wen.html?classid="+classid;
// document.getElementById('exit').href='exitbanji.html?classid='+classid;
document.getElementById('classid').innerHTML='班级号:'+classid;
//wenjian.href="wenjian.html?classid="+classid;
var info=[];
if(applyinfo!=undefined)
{
if(applyinfo.indexOf(',')>=0)
{
info=applyinfo.split(',');
document.getElementById('count').innerHTML=''+info.length;
}
else
{
document.getElementById('count').innerHTML=''+1;
}
document.getElementById('apply').href='t_classmessage.html?applyinfo='+applyinfo+'&classid='+classid;
}
mui.ajax('http://'+url+'/jizhibackend/servlet/GetClassInfoServlet',{
data:
{
classid:classid,
},
xhrFields: {
withCredentials: true
},
crossDomain: true,
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
success: function(data) {
var create_timed=new Date(data.class.createtime);
createtime.innerHTML=create_timed.getFullYear() + "-" + (create_timed.getMonth()+1)+"-"+create_timed.getDate() ;
classnumber.innerHTML=data.class.membernum+'人';
classname.innerHTML=data.class.name;
document.getElementById('chengyuan').href='t_banjichengyuan.html?classid='+classid+'&owner='+data.class.owner;
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
}(mui,document));
function disclass(){
if(confirm("确定要解散该班级吗?")){
mui.ajax('http://'+url+'/jizhibackend/servlet/DismissClass',{
data:
{
userid:userid,
classid:classid,
},
xhrFields: {
withCredentials: true
},
crossDomain: true,
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
success: function(data) {
if (data.errcode==111) {
alert("只有创建者才有权限解散该班级!");
} else if(data.errcode==0){
mui.toast("解散班级成功!");
setTimeout("window.location = 't_banji.html'",1000);
} else if(data.errcode==104){
alert("系统错误,请重试!")
}
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
}
}
function exitclass(){
if(confirm("确定要退出该班级吗?")){
mui.ajax('http://'+url+'/jizhibackend/servlet/QuitClass',{
data:
{
userid:userid,
classid:classid,
},
xhrFields: {
withCredentials: true
},
crossDomain: true,
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
async: false,//同步
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
success: function(data) {
if(data.errcode==102){
alert("您是该班创建者,无法退出班级!");
}else if(data.errcode==0){
mui.toast("退出班级成功!")
setTimeout("back.click();",1000);
}
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
}
}
</script>
</body>
</html>