-
Notifications
You must be signed in to change notification settings - Fork 11
/
series.php
74 lines (67 loc) · 2.55 KB
/
series.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
<?php
session_start();
include 'lib.php';
print_header("Event Information");
?>
<div class="grid_10 suffix_1 prefix_1">
<div id="gatherling_main" class="box">
<div class="uppertitle"> Regular Events </div>
<?php
$active_series = Series::activeNames();
foreach ($active_series as $series_name) {
if ($series_name == "Other") {
continue;
}
$series = new Series($series_name);
if (strtotime($series->mostRecentEvent()->start) + (86400 * 7 * 4) < time() && !$series->nextEvent()) {
continue;
}
?>
<div class="series">
<div class="series-name"><?php echo "$series->name";?></div>
<div class="series-logo"><?php echo Series::image_tag($series->name); ?></div>
<div class="series-stewards">
Hosted by
<ul>
<?php foreach ($series->stewards as $player) { ?>
<li><?php echo $player; ?></li>
<?php } ?>
</ul>
</div> <!-- Series-stewards -->
<div class="series-info">
<table>
<?php
$season_format_name = str_replace(' ','', $series->this_season_format);
$season_format_link = "format.php?mode=desc&id=" . $season_format_name;
?>
<tr> <th> Format </th> <td> <a href="<?php echo $season_format_link?>"> <?php echo $series->this_season_format ?></a> </td> </tr>
<?php
$start_format = "%I:%M %P";
if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") {
$start_format = str_replace('P', 'p', $start_format);
}
?>
<tr> <th> Regular Time </th> <td> <?php echo $series->start_day ?>, <?php echo strftime($start_format, strtotime($series->start_time)) ?> Eastern Time </td> </tr>
<tr> <th> Rules </th> <td> <a href="<?php echo $series->this_season_master_link ?>">Season <?php echo $series->this_season_season ?> Master Document</a> </td> </tr>
<tr> <th> Most Recent Event </th> <td> <?php echo $series->mostRecentEvent()->linkReport() ?> </td> </tr>
<?php
$nextevent = $series->nextEvent();
if ($nextevent) {
$next_format = "%B %e %I:%M %P";
if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") {
$next_format = str_replace("P", "p", $next_format);
$next_format = str_replace("e", "#d", $next_format);
}
?>
<tr> <th> Next Event </th> <td> <?php echo strftime($next_format . " registration", strtotime($nextevent->start) - minutes(30)) ?> </td> </tr>
<?php } else { ?>
<tr> <th> Next Event </th> <td> Not scheduled yet </td> </tr>
<?php } ?>
</table>
</div> <!-- Series-info -->
</div> <!-- Series -->
<?php } ?>
<div class="clear"></div>
</div> <!-- gatherling_main -->
</div> <!-- grid_10 suffix_1 prefix_1 -->
<?php print_footer(); ?>