', theme_linktree(), ' '; // Show each day of the week. foreach ($context['week_days'] as $day) echo ' '; echo ' '; /* Each week in weeks contains the following: days (a list of days), number (week # in the year.) */ foreach ($context['weeks'] as $week) { echo ' '; /* Every day has the following: day (# in month), is_today (is this day *today*?), is_first_day (first day of the week?), holidays, events, birthdays. (last three are lists.) */ foreach ($week['days'] as $day) { // If this is today, make it a different color and show a border. echo ' '; } echo ' '; } echo '
', $txt['months_titles'][$context['current_month']], ' ', $context['current_year'], '
', $txt['days'][$day], '
'; // Skip it if it should be blank - it's not a day if it has no number. if (!empty($day['day'])) { // Should the day number be a link? if (!empty($modSettings['cal_daysaslink']) && $context['can_post']) echo ' ', $day['day'], ''; else echo ' ', $day['day']; // Is this the first day of the week? (and are we showing week numbers?) if ($day['is_first_day']) echo ' - ', $txt['calendar51'], ' ', $week['number'], ''; // Are there any holidays? if (!empty($day['holidays'])) echo '
', $txt['calendar5'], ' ', implode(', ', $day['holidays']), '
'; // Show any birthdays... if (!empty($day['birthdays'])) { echo '
', $txt['calendar3'], ' '; /* Each of the birthdays has: id, name (person), age (if they have one set?), and is_last. (last in list?) */ foreach ($day['birthdays'] as $member) echo ' ', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] ? '' : ', '; echo '
'; } // Any special posted events? if (!empty($day['events'])) { echo '
', $txt['calendar4'], ''; /* The events are made up of: title, href, is_last, can_edit (are they allowed to?), and modify_href. */ foreach ($day['events'] as $event) { // If they can edit the event, show a star they can click on.... if ($event['can_edit']) echo ' * '; echo ' ', $event['link'], $event['is_last'] ? '' : ', '; } echo '
'; } } echo '
'; // Is there a calendar for last month to look at? if (isset($context['previous_calendar'])) echo ' « ', $txt['months_short'][$context['previous_calendar']['month']], ' ', $context['previous_calendar']['year'], ''; echo ' '; // Show a little "post event" button? if ($context['can_post']) echo ' ', create_button('calendarpe.gif', 'calendar23', 'calendar23', 'align="middle"'), ''; echo '     '; // Show another post button just for symmetry. if ($context['can_post']) echo ' ', create_button('calendarpe.gif', 'calendar23', 'calendar23', 'align="middle"'), ''; echo ' '; // Is there a calendar for next month? if (isset($context['next_calendar'])) echo ' ' . $txt['months_short'][$context['next_calendar']['month']] . ' ' . $context['next_calendar']['year'] . ' »'; echo '
'; } // Template for posting a calendar event. function template_event_post() { global $context, $settings, $options, $txt, $scripturl, $modSettings; // Start the javascript for drop down boxes... echo '
', theme_linktree(), '
'; if (!empty($context['event']['new'])) echo ' '; // Start the main table. echo '
', $context['page_title'], '
'; if (!empty($context['post_error']['messages'])) { echo ' '; } echo ' '; // If events can span more than one day then allow the user to select how long it should last. if (!empty($modSettings['cal_allowspan'])) { echo ' '; } // If this is a new event let the user specify which board they want the linked post to be put into. if ($context['event']['new']) { echo ' '; } echo ' '; echo '
', $context['error_type'] == 'serious' ? '' . $txt['error_while_submitting'] . '' : '', '
', implode('
', $context['post_error']['messages']), '
', $txt['calendar12'], '
', $txt['calendar10'], '    ', $txt['calendar9'], '    ', $txt['calendar11'], ' 
', $txt['calendar54'], '
', $txt['calendar_link_event'], '
', $txt['calendar13'], '
'; // Delete button? if (empty($context['event']['new'])) echo ' '; echo '
'; } ?>