$week = get_dbWeeks($week_id); if ($week == null || $week->get_status() == "unpublished") { echo "This week's calendar is not available for viewing."; if ($_SESSION['access_level'] >= 2) { echo "<br/> <a href='addWeek.php'>Manage weeks</a>"; } } else { ?> <div style="text-align: center"> <form method="get" action="addWeek.php"> <button type="submit">Manage weeks</button> </form> </div> <script type="text/javascript"> makeCalendar(<?php echo get_fullcalendar_json(); ?> ) </script> <!-- The fullcalendar_display() function will use Javascript to populate this div with content --> <div style="padding: 0 10%" id="calendar"></div> <!-- Bootstrap modal --> <div id="calendar-modal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <h3 id="modal-vacancies"></h3> <h3>Currently-registered volunteers:</h3> <div id="modal-persons"></div> </div>
?> <div id="content" style="text-align:center"> <?php if ($_SESSION['access_level'] < 2) { die("<p>Only managers can view the master schedule.</p>"); } $venue = $_GET['frequency']; ?> <center><h2><?php echo ucfirst($venue) . ' Calendar'; ?> </h2></center> <a onclick='jQ2("#calendar-modal").modal();'>Manage Shifts</a> <script type="text/javascript"> makeCalendar(<?php echo get_fullcalendar_json($venue); ?> ); </script> <div id="calendar"></div> </div> <!-- Bootstrap modal --> <div id="calendar-modal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> <div class="modal-dialog modal-sm"> <div class="modal-content"> <?php include_once "addMasterShiftForm.inc"; ?> </div> </div> </div>