$staff_members = module_user::get_staff_members(); if (count($staff_members)) { ?> <li> Individual Staff Member ical URLs are below: </li> <?php foreach ($staff_members as $staff_member) { ?> <li> Staff: <?php echo $staff_member['name'] . ' ' . $staff_member['last_name']; ?> : <a href="<?php echo module_calendar::link_calendar('full', array('staff_id' => $staff_member['user_id'], 'staff_hash' => module_calendar::staff_hash($staff_member['user_id']))); ?> " target="_blank">Copy ical URL</a> </li> <?php } } ?> </ul> <hr> <p><?php _e('Here is the URL for <strong>Your Alerts</strong> (ie: the listing from the dashbaord).'); ?> </p> <p>
* Copyright: dtbaker 2012 * Licence: Please check CodeCanyon.net for licence details. * More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca * Package Date: 2015-11-25 02:55:20 * IP Address: 67.79.165.254 */ header('Content-type: text/calendar; charset=utf-8'); header('Content-Disposition: inline; filename="calfull.ics"'); $calendar_entries = array(); $login = false; // is this a calendar event for a specific staff member? if (isset($options['staff_id']) && (int) $options['staff_id'] > 0 && isset($options['staff_hash']) && !empty($options['staff_hash'])) { // check hash matches again. even though this is already done in the external hook part of calednar.php if ($options['staff_hash'] == module_calendar::staff_hash($options['staff_id'])) { // correct! log this user in, temporarily for the query and then log them out again. module_security::user_id_temp_set($options['staff_id']); $login = true; } } // get 4 months either side of todays date. for ($x = -4; $x <= 4; $x++) { $ret = listCalendar(date('m/d/Y', strtotime('+' . $x . ' months')), 'month'); if (is_array($ret) && isset($ret['events']) && count($ret['events'])) { $calendar_entries = array_merge($calendar_entries, $ret['events']); } } if ($login) { module_security::user_id_temp_restore(); }