-
Notifications
You must be signed in to change notification settings - Fork 0
/
full_program.php
63 lines (46 loc) · 1.2 KB
/
full_program.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
<h1>Full Program</h1>
<?php
require_once "lib/app.php";
$db = open_db($db_address_abs);
require "data/events.php";
$fmt = 'H:i';
$cur = NULL;
$all = array_merge($presentations, $breaks);
function cmp($a, $b) {
$fmt = 'Y-m-d\TH:i:s';
return strcmp($a->start->format($fmt), $b->start->format($fmt));
}
usort($all, "cmp");
foreach($all as $p) {
#print "//{$p->id}";
#if (!$p->is_plenary) { continue; }
$day = $p->start->format('l jS \of F Y');
if (!($day==$cur)) {
if (!is_null($cur)){print "</ul>\n";}
print "<h2>$day</h2>\n";
print "<ul class='fullprog'>\n";
$cur = $day;
}
#print "<!-- " . $day . " " . $cur . "-->\n";
print <<<EOT
<li>
<span class='time'>{$p->start->format($fmt)} – {$p->end->format($fmt)}:</span>
EOT;
if (isset($p->is_no_talk) && $p->is_no_talk) {
print <<<EOT
<span class="notalk">{$p->name}</span>
EOT;
}
else {
print <<<EOT
<span class="authortitle">
<span class="author">{$p->name}</span>
—
<span class="title">{$p->presentationTitle}</span>
</span>
EOT;
}
print " </li>\n";
}
print "</ul>\n";
?>