-
Notifications
You must be signed in to change notification settings - Fork 1
/
mymeeting.php
executable file
·272 lines (220 loc) · 7.83 KB
/
mymeeting.php
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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css">
<script type="text/javascript" src="./js/jquery-1.8.0.js"></script>
<link rel="stylesheet" href="./css/style.css">
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="Ajax/Ajax.js"></script>
<script>
var xmlHttp=getXmlHttpRequest();
/*
收起面板,用按钮控制
*/
$(document).ready(function()
{
$("#inform").hide();
$("#ok").click(function()
{
$("#inform").slideUp(600);
})
})
/*
退订会议
*/
function show_confirm(id)
{
var txt=confirm("您真的要退订该会议?")
if(txt==true)
{
sendRequest('./Ajax/responsPhp/ajax_unsubscribe_meeting.php',unsubscribe,'id='+id);
}
else
{
alert("会议将被保留");
}
}
function unsubscribe()
{
if(xmlHttp.readyState==4)
{
var v=xmlHttp.responseText;
alert(v);
alert("会议已退订,通知即将发下!");
document.location.href = './mymeeting.php';
}
}
/*
相应结束按钮
*/
function endMeeting(id)
{
alert(id);
sendRequest('./Ajax/responsPhp/ajax_end_meeting.php',tips,'id='+id);
}
function tips()
{
if(xmlHttp.readyState==4) {
alert("会议已结束!");
document.location.href = './mymeeting.php';
}
}
/*
刷新会议面板
*/
function refresh_board(id)
{
sendRequest('./Ajax/responsPhp/ajax_attendence_board.php',sucess,'id='+id);
}
function sucess()
{
if(xmlHttp.readyState==4) {
var response = xmlHttp.responseText;
var obj = JSON.parse(response);
//alert(response);
var num = obj.length;
// for(var i=0;i<num;i++)
// {
// for(var key in obj[i])
// {
// alert("key:="+key+",value="+obj[i][key]);
// }
// }
// var single=obj[0];
// alert(single['NAME']);
window.document.getElementById('body').innerHTML="";
for(var i=0;i<num;i++)
{
//
if(obj[i]['PERSON_STATE']==0)//收到信息
{
window.document.getElementById('body').innerHTML+='<div style="margin: 20px;float: left" ><label class="btn btn-success">'+obj[i]['REAL_NAME']+'</label></div>'
}
else{
window.document.getElementById('body').innerHTML+='<div style="margin: 20px;float: left" ><label class="btn btn-danger">'+obj[i]['REAL_NAME']+'</label></div>'
}
//
}
}
}
function show_board(id)
{
refresh_board(id);
$("#inform").slideDown(600);
}
</script>
<?php
include './parameter/mysql/DataOperat.php';
include './parameter/class/meeting.php';
/*
* 展示该用户所有的会议
*/
session_start();
if($_SESSION) {
$uid = $_SESSION['uid'];
$db = new DataOperat();
$re = $db->fetch_meeting($uid);
$num = count($re);
}
else{
echo"<script> alert('请登录!');
document.location.href='./index.html';
</script>";
}
?>
</head>
<body style="background-color: #ffffff">
<div class="container">
<div class="page-header">
<h3><strong>我的会议</strong></h3>
</div>
<table class="table table-striped">
<caption>
<h4>我预定会议</h4>
</caption>
<tr>
<th>会议名</th>
<th>会议地点</th>
<th>会议日期</th>
<th>会议时间</th>
<th>操作</th>
</tr>
<?php
$row=new meeting();
for($i=0;$i<$num;$i++)
{
$row->initMeeting($re[$i]);
?>
<tr>
<td><?php echo $row->getName(); ?></td>
<td><?php echo $row->getRid(); ?></td>
<td><?php echo $row->getDate(); ?></td>
<td><?php
if($row->getTime()==1)
{
echo "8:00-9:30";
}
elseif($row->getTime()==2)
{
echo "10:00-11:30";
}
elseif($row->getTime()==3)
{
echo "13:00-14:30";
}
elseif($row->getTime()==4)
{
echo "15:00-16:30";
}
elseif($row->getTime()==5)
{
echo "18:00-19:30";
}
else{
echo "20:00-21:30";
}
?></td>
<td>
<div class="form-group">
<label class="btn btn-default" onclick="show_confirm(<?php echo $row->getId(); ?>)" >退订</label>
<a href=<?php echo "./upload.php?mid=".$row->getId(); ?>> <label class="btn btn-default" >上传文件</label></a>
<label class="btn btn-default" onclick="show_board(this.id)" id="<?php echo $row->getId(); ?>">会议面板</label>
<?php
if($row->getState()==1)
{
?>
<label class="btn btn-primary" onclick="endMeeting(<?php echo $row->getId(); ?>)" >结束</label>
<?php
}
?>
</div>
</td>
</tr>
<?php
}
?>
</table>
<ul class="pagination pagination-sm" style="float:right;">
<li title="第一页"><a href="#">«</a></li>
<li title="上一页"><a href="#">‹</a></li>
<li title="当前页" class="active"><a href="#">1</a></li>
<li title="下一页"><a href="#">›</a></li>
<li title="最末页"><a href="#">»</a></li>
<li>
<a href="">共<strong><?php echo $num; ?></strong>条记录,<strong>1</strong>页</a>
</li>
</ul>
</div>
<div class="inform" id="inform" >
<table style="width: 80%;height: 70%; position: absolute;left: 10%;top: 10%; border: 2px solid #ffffff" >
<caption>参会人员确认信息一览
</caption>
<tbody id="body">
</tbody>
</table>
<label class="btn btn-primary " style="position: absolute;left:45%;bottom: 10px" id="ok">ok</label>
</div>
</body>
</html>