'; foreach ($calendar_data['week_days'] as $day) { echo ' | ', !empty($calendar_data['short_day_titles']) ? ($smcFunc['substr']($txt['days'][$day], 0, 1)) : $txt['days'][$day], ' | '; } 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 '';
// 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'] && $calendar_data['size'] != 'small')
echo ' - ', $txt['calendar_week'], ' ', $week['number'], '';
// Are there any holidays?
if (!empty($day['holidays']))
echo '
', $txt['calendar_prompt'], ' ', implode(', ', $day['holidays']), ' ';
// Show any birthdays...
if (!empty($day['birthdays']))
{
echo '
', $txt['birthdays'], '';
/* Each of the birthdays has:
id, name (person), age (if they have one set?), and is_last. (last in list?) */
$use_js_hide = empty($context['show_all_birthdays']) && count($day['birthdays']) > 15;
$count = 0;
foreach ($day['birthdays'] as $member)
{
echo '
', $member['name'], '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '', $member['is_last'] || ($count == 10 && $use_js_hide)? '' : ', ';
// Stop at ten?
if ($count == 10 && $use_js_hide)
echo '... ';
}
// Any special posted events?
if (!empty($day['events']))
{
echo '
(', sprintf($txt['calendar_click_all'], count($day['birthdays'])), ') '; echo '
', $txt['events'], ' ';
}
}
echo '
'; /* 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 an icon they can click on.... if ($event['can_edit']) echo ' '; if ($event['can_export']) echo ' '; echo ' ', $event['link'], $event['is_last'] ? '' : ' '; } echo ' | ';
}
echo '
';
foreach ($v as $i)
echo '
'; echo ' | ';
$alt = !$alt;
}
echo '
'; foreach ($v as $i) echo ' '; echo ' | '; $alt = !$alt; } echo '|||||
Too tough for you? |
'; foreach ($v as $i) echo ' '; echo ' | '; $alt = !$alt; } echo '
'; foreach ($v as $i) echo ' '; echo ' | '; $alt = !$alt; } echo '