-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalendar.php
More file actions
93 lines (85 loc) · 3.44 KB
/
calendar.php
File metadata and controls
93 lines (85 loc) · 3.44 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<?php require_once('./partials/head-metas.phtml') ?>
<title>Event Calendar | Emanuel Evangelical Lutheran Church</title>
<?php require_once('./partials/head-includes.phtml') ?>
</head>
<body>
<div class="container layout-v2">
<?php require_once('./partials/masthead-top-nav.phtml') ?>
<div class="row main-content">
<div class="col-xs-12">
<h1 class="page-title">Event Calendar</h1>
<p>
<?php
$transitionDate = '2026-04-01'; // When adding next month's calendar, just update this
$pacificTimeZone = new DateTimeZone('America/Los_Angeles');
$now = new DateTime("now", $pacificTimeZone);
$beginningOfNextMonth = new DateTime($transitionDate, $pacificTimeZone);
$lastMonth = clone $beginningOfNextMonth;
$lastMonth->sub(new DateInterval('P1D'));
$monthNum = $lastMonth->format('m');
$monthName = $lastMonth->format('F');
$year = $lastMonth->format('Y');
if ($now > $beginningOfNextMonth) {
$monthNum = $beginningOfNextMonth->format('m');
$monthName = $beginningOfNextMonth->format('F');
$year = $beginningOfNextMonth->format('Y');
}
echo <<<HTML
<a href="./calendars/calendar-$year-$monthNum.pdf" target="_blank">$monthName $year printer-friendly calendar</a>
HTML;
?>
</p>
<? /* BEGIN: Embedded Google Calendar */?>
<? /* Mobile Version*/ ?>
<div class="google-container-container visible-xs-block">
<iframe
src="https://calendar.google.com/calendar/embed?src=churchinfo150%40gmail.com&ctz=America%2FLos_Angeles&mode=AGENDA"
style="border: 0"
width="100%"
height="1000"
frameborder="0"
scrolling="no">
</iframe>
</div>
<? /* Wider (Regular) Version*/ ?>
<div class="google-container-container hidden-xs">
<iframe
src="https://calendar.google.com/calendar/embed?src=churchinfo150%40gmail.com&ctz=America%2FLos_Angeles"
style="border: 0"
width="100%"
height="600"
frameborder="0"
scrolling="no">
</iframe>
</div>
<? /* END: Embedded Google Calendar */?>
<? /* Embedded calendar from Breeze ChMS seems to be blank; it has no events on it */?>
<?/* <iframe src="https://emanuellutheran.breezechms.com/embed/calendar/grid?size=medium&color=gray&calendars=srg9ErllnQBH%2BDD4NjLNQb4cUJHWej5sy5FLrtsbUc4x%2FLSC%2Fo4x2MFxxOZAJ4jli3mdvTLaVJQ5UvZ8ZI%2B31Q%3D%3D"
seamless="seamless"
width="100%"
height="910"
scrolling="auto"
frameborder="0"
style="border-width: 0px;">
</iframe> */?>
<? /* For now, just show an image of the PDF calendar */?>
<?php /*
<?php
echo <<<HTML
<div class="calendar-image-container">
<img src="images/calendars/calendar-$year-$monthNum.jpg" alt="$monthName $year Event Calendar" />
</div>
HTML;
?>
*/ ?>
</div>
</div>
<?php require_once('./partials/footer.phtml') ?>
</div>
<?php require_once('./partials/footer-includes.phtml') ?>
<script type="text/javascript" src="./js/calendar.js"></script>
</body>
</html>