-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschedule.php
355 lines (270 loc) · 10.6 KB
/
schedule.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
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
348
349
350
351
352
353
354
355
<?php
//===============================================
// IF SUCCESSFUL PAGE CONTENT //
//===============================================
include('inc/db_conn.php');
//===========================
// pull presenters DAY 1
//===========================
$sql_presenters = "SELECT ";
$sql_presenters .= "presenters.id AS presenter_id, ";
$sql_presenters .= "talks.id AS talk_id, ";
$sql_presenters .= "schedules.id AS schedule_id, ";
$sql_presenters .= "talks.presenter_id AS pi, ";
$sql_presenters .= "last_name, ";
$sql_presenters .= "first_name, ";
$sql_presenters .= "affiliation, ";
$sql_presenters .= "bio, ";
$sql_presenters .= "title, ";
$sql_presenters .= "track, ";
$sql_presenters .= "authors, ";
$sql_presenters .= "location_id, ";
$sql_presenters .= "start_time, ";
$sql_presenters .= "name, ";
$sql_presenters .= "DATE_FORMAT(start_time, '%h:%i %p') AS start_time_f, ";
$sql_presenters .= "DATE_FORMAT(end_time, '%h:%i %p') AS end_time_f ";
$sql_presenters .= "FROM schedules ";
$sql_presenters .= "LEFT JOIN talks ";
$sql_presenters .= "ON schedules.talk_id = talks.id ";
$sql_presenters .= "LEFT JOIN presenters ";
$sql_presenters .= "ON presenter_id = presenters.id ";
$sql_presenters .= "LEFT JOIN license_types ";
$sql_presenters .= "ON license_type_id = license_types.id ";
$sql_presenters .= "LEFT JOIN locations ";
$sql_presenters .= "ON location_id = locations.id ";
$sql_presenters .= "WHERE schedules.start_time < '2013-06-27 00:00:00' ";
$sql_presenters .= "AND schedules.start_time > '2013-06-26 00:00:00' ";
$sql_presenters .= "ORDER BY start_time, location_id";
$total_presenters = @mysql_query($sql_presenters, $connection) or die("Error #". mysql_errno() . ": " . mysql_error());
$last_start_time = '';
// first bracket
do {
// second bracket
//if ($row['title'] != '')
// {
// third bracket
if ($row['start_time'] != $last_start_time)
{
// if a new start time display new row and the time cell
$display_block .="
<tr>
<td>" . $row['start_time_f'] . " - " . $row['end_time_f'] . "</td>";
/////////////////
if ($row['track'] == '---' || $row['track'] == 'Plenary')
{
$display_block .="<td colspan=\"3\" class=\"track_atsumaru\"><span class=\"track\">s_id:". $row['schedule_id'] . "</span><br /><span class=\"bold\"><span class=\"track\">t_id:" . $row['talk_id'] . "</span> " . $row['title'] . "</span>";
if ($row['last_name'] != '')
{
$display_block .="<br /> - " . $row['last_name'] . ", " . $row['first_name'] . "</td></tr>";
}
$last_start_time = $row['start_time'];
}
// if the time resource is for room 1
elseif ($row['location_id'] == '4' && $row['track'] != '---' && $row['track'] != 'Plenary')
{
$display_block .="<td>";
// display the resource (talk) information
$display_block .= "<span class=\"track\">s_id:". $row['schedule_id'] . " /". $row['track'] . "1</span><br /><span class=\"bold\"><span class=\"track\">t_id:" . $row['talk_id'] . "</span> " . $row['title'] . "</span>";
$display_block .= "<br />" . $row['authors'] . "</td>";
$last_start_time = $row['start_time'];
}
// if the time resource is for room 2, show dashes for room 1 if no resource for it
else
{
$display_block .="
<td>---1 ". $row['schedule_id'] . "</td>";
$last_start_time = $row['start_time'];
}
// third bracket
}
if ($row['location_id'] == '5' && $row['track'] != '---' && $row['track'] != 'Plenary')
{
$display_block .="<td>";
// display the resource (talk) information
$display_block .= "<span class=\"track\">s_id:". $row['schedule_id'] . " /". $row['track'] . "2</span><br /><span class=\"bold\"><span class=\"track\">t_id:" . $row['talk_id'] . "</span> " . $row['title'] . "</span>";
$display_block .= "<br />" . $row['authors'] . "</td>";
$last_start_time = $row['start_time'];
}
// if the time resource is for room 2, show dashes for room 1 if no resource for it
elseif ($row['location'] == '6' && $row['track'] != '')
{
$display_block .="
<td>---2 ". $row['schedule_id'] . "</td>";
}
if ($row['location_id'] == '6' && $row['track'] != '---' && $row['track'] != 'Plenary')
{
$display_block .="<td>";
// display the resource (talk) information
$display_block .= "<span class=\"track\">s_id:". $row['schedule_id'] . " /". $row['track'] . "3</span><br /><span class=\"bold\"><span class=\"track\">t_id:" . $row['talk_id'] . "</span> " . $row['title'] . "</span>";
$display_block .= "<br />" . $row['authors'] . "</td></tr>";
$last_start_time = $row['start_time'];
}
// if the time resource is for room 2, show dashes for room 1 if no resource for it
elseif ($row['location'] == '6' && $row['track'] != '')
{
$display_block .="
<td>---3 ". $row['schedule_id'] . "</td></tr>";
}
// second bracket
//}
// first bracket
}
while ($row = mysql_fetch_array($total_presenters));
//===========================
// pull presenters DAY 2
//===========================
$sql_presenters_2 = "SELECT ";
$sql_presenters_2 .= "presenters.id AS presenter_id, ";
$sql_presenters_2 .= "talks.id AS talk_id, ";
$sql_presenters_2 .= "schedules.id AS schedule_id, ";
$sql_presenters_2 .= "talks.presenter_id AS pi, ";
$sql_presenters_2 .= "last_name, ";
$sql_presenters_2 .= "first_name, ";
$sql_presenters_2 .= "affiliation, ";
$sql_presenters_2 .= "bio, ";
$sql_presenters_2 .= "title, ";
$sql_presenters_2 .= "track, ";
$sql_presenters_2 .= "authors, ";
$sql_presenters_2 .= "location_id, ";
$sql_presenters_2 .= "start_time, ";
$sql_presenters_2 .= "name, ";
$sql_presenters_2 .= "DATE_FORMAT(start_time, '%h:%i %p') AS start_time_f, ";
$sql_presenters_2 .= "DATE_FORMAT(end_time, '%h:%i %p') AS end_time_f ";
$sql_presenters_2 .= "FROM schedules ";
$sql_presenters_2 .= "LEFT JOIN talks ";
$sql_presenters_2 .= "ON schedules.talk_id = talks.id ";
$sql_presenters_2 .= "LEFT JOIN presenters ";
$sql_presenters_2 .= "ON presenter_id = presenters.id ";
$sql_presenters_2 .= "LEFT JOIN license_types ";
$sql_presenters_2 .= "ON license_type_id = license_types.id ";
$sql_presenters_2 .= "LEFT JOIN locations ";
$sql_presenters_2 .= "ON location_id = locations.id ";
$sql_presenters_2 .= "WHERE schedules.start_time < '2013-06-28 00:00:00' ";
$sql_presenters_2 .= "AND schedules.start_time > '2013-06-27 00:00:00' ";
$sql_presenters_2 .= "ORDER BY start_time, location_id";
$total_presenters_2 = @mysql_query($sql_presenters_2, $connection) or die("Error #". mysql_errno() . ": " . mysql_error());
$last_start_time = '';
// first bracket
do {
// second bracket
//if ($row['title'] != '')
// {
// third bracket
if ($row['start_time'] != $last_start_time)
{
// if a new start time display new row and the time cell
$display_block_2 .="
<tr>
<td>" . $row['start_time_f'] . " - " . $row['end_time_f'] . "</td>";
/////////////////
if ($row['track'] == '---' || $row['track'] == 'Plenary')
{
$display_block_2 .="<td colspan=\"3\" class=\"track_atsumaru\"><span class=\"track\">s_id:". $row['schedule_id'] . "</span><br /><span class=\"bold\"><span class=\"track\">t_id:" . $row['talk_id'] . "</span> " . $row['title'] . "</span>";
if ($row['last_name'] != '')
{
$display_block_2 .="<br /> - " . $row['last_name'] . ", " . $row['first_name'] . "</td></tr>";
}
$last_start_time = $row['start_time'];
}
// if the time resource is for room 1
elseif ($row['location_id'] == '4' && $row['track'] != '---' && $row['track'] != 'Plenary')
{
$display_block_2 .="<td>";
// display the resource (talk) information
$display_block_2 .= "<span class=\"track\">s_id:". $row['schedule_id'] . " /". $row['track'] . "1</span><br /><span class=\"bold\"><span class=\"track\">t_id:" . $row['talk_id'] . "</span> " . $row['title'] . "</span>";
$display_block_2 .= "<br />" . $row['authors'] . "</td>";
$last_start_time = $row['start_time'];
}
// if the time resource is for room 2, show dashes for room 1 if no resource for it
else
{
$display_block_2 .="
<td>---1 ". $row['schedule_id'] . "</td>";
$last_start_time = $row['start_time'];
}
// third bracket
}
if ($row['location_id'] == '5' && $row['track'] != '---' && $row['track'] != 'Plenary')
{
$display_block_2 .="<td>";
// display the resource (talk) information
$display_block_2 .= "<span class=\"track\">s_id:". $row['schedule_id'] . " /". $row['track'] . "2</span><br /><span class=\"bold\"><span class=\"track\">t_id:" . $row['talk_id'] . "</span> " . $row['title'] . "</span>";
$display_block_2 .= "<br />" . $row['authors'] . "</td>";
$last_start_time = $row['start_time'];
}
// if the time resource is for room 2, show dashes for room 1 if no resource for it
elseif ($row['location'] == '6' && $row['track'] != '')
{
$display_block_2 .="
<td>---2 ". $row['schedule_id'] . "</td>";
}
if ($row['location_id'] == '6' && $row['track'] != '---' && $row['track'] != 'Plenary')
{
$display_block_2 .="<td>";
// display the resource (talk) information
$display_block_2 .= "<span class=\"track\">s_id:". $row['schedule_id'] . " /". $row['track'] . "3</span><br /><span class=\"bold\"><span class=\"track\">t_id:" . $row['talk_id'] . "</span> " . $row['title'] . "</span>";
$display_block_2 .= "<br />" . $row['authors'] . "</td></tr>";
$last_start_time = $row['start_time'];
}
// if the time resource is for room 2, show dashes for room 1 if no resource for it
elseif ($row['location'] == '6' && $row['track'] != '')
{
$display_block_2 .="
<td>---3 ". $row['schedule_id'] . "</td></tr>";
}
// second bracket
//}
// first bracket
}
while ($row = mysql_fetch_array($total_presenters_2));
?>
<!DOCTYPE html>
<html>
<?php $thisPage="Venue"; ?>
<head>
<?php include('inc/header.php') ?>
<link rel="shortcut icon" href="http://conference.scipy.org/scipy2013/favicon.ico" />
</head>
<body>
<div id="container">
<?php include('inc/page_headers.php') ?>
<section id="sidebar">
<?php include("inc/sponsors.php") ?>
</section>
<section id="main-content">
<h2>Conference Schedule:</h2>
<p>The Conference Schedule (July 18th & 19th) is in its final stages of confirmation. There may be changes made to the schedule between now and the conference.</p>
<table id="registrants_table" width="600">
<tr>
<th colspan="4">Day 1 - June 26th</th>
</tr>
<tr>
<th width="80">Time</th>
<th>Room 1</th>
<th>Room 2</th>
<th>Room 3</th>
</tr>
<?php echo $display_block ?>
</table>
<br />
<br />
<table id="registrants_table" width="600">
<tr>
<th colspan="4">Day 2 - June 27th</th>
</tr>
<tr>
<th width="80">Time</th>
<th>Room 1</th>
<th>Room 2</th>
<th>Room 3</th>
</tr>
<?php echo $display_block_2 ?>
</table>
</section>
<div style="clear:both;"></div>
<footer id="page_footer">
<?php include('inc/page_footer.php') ?>
</footer>
</div>
</body>
</html>