Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: calendar.php 4037 2008-07-24 11:56:23Z ZiNgaBuRgA $
| * $Id: calendar.php 4269 2008-11-13 05:48:19Z Tikitiki $
|
*/
define("IN_MYBB", 1);
|
*/
define("IN_MYBB", 1);
|
| define('THIS_SCRIPT', 'calendar.php');
|
$templatelist = "calendar_weekdayheader,calendar_weekrow_day,calendar_weekrow,calendar_eventbit_public,calendar_eventbit_private,calendar"; $templatelist .= ",calendar_weekview_day,calendar_weekview_day_event,calendar_mini_weekdayheader,calendar_mini_weekrow_day,calendar_mini_weekrow,calendar_mini,calendar_weekview_month,calendar_weekview,calendar_eventbit,calendar_addeventlink";
|
$templatelist = "calendar_weekdayheader,calendar_weekrow_day,calendar_weekrow,calendar_eventbit_public,calendar_eventbit_private,calendar"; $templatelist .= ",calendar_weekview_day,calendar_weekview_day_event,calendar_mini_weekdayheader,calendar_mini_weekrow_day,calendar_mini_weekrow,calendar_mini,calendar_weekview_month,calendar_weekview,calendar_eventbit,calendar_addeventlink";
|
$templatelist .= ",calendar_event_editbutton,calendar_event_modoptions,calendar_event,calendar_dayview_event,calendar_dayview,codebuttons,smilieinsert,calendar_editevent";
| $templatelist .= ",calendar_event_editbutton,calendar_event_modoptions,calendar_event,calendar_dayview_event,calendar_dayview,codebuttons,smilieinsert,calendar_editevent,calendar_dayview_birthdays_bday,calendar_dayview_birthdays,calendar_dayview_noevents,calendar_dayview_noevents";
|
require_once "./global.php";
| require_once "./global.php";
|
Zeile 1792 | Zeile 1793 |
---|
// So now we have the start day of this week to show $start_day = $day-$php_weekday; $mybb->input['week'] = gmmktime(0, 0, 0, $month, $start_day, $year);
|
// So now we have the start day of this week to show $start_day = $day-$php_weekday; $mybb->input['week'] = gmmktime(0, 0, 0, $month, $start_day, $year);
|
| } else { $mybb->input['week'] = (int)str_replace("n", "-", $mybb->input['week']);
|
} // This is where we've come from and where we're headed
| } // This is where we've come from and where we're headed
|
Zeile 1803 | Zeile 1808 |
---|
add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid'])); add_breadcrumb("{$monthnames[$week_from[1]]} {$week_from[2]}", get_calendar_link($calendar['cid'], $week_from[2], $week_from[1]));
|
add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid'])); add_breadcrumb("{$monthnames[$week_from[1]]} {$week_from[2]}", get_calendar_link($calendar['cid'], $week_from[2], $week_from[1]));
|
add_breadcrumb("Weekly Overview");
| add_breadcrumb($lang->weekly_overview);
|
// Establish if we have a month ending in this week if($week_from[1] != $week_to[1])
| // Establish if we have a month ending in this week if($week_from[1] != $week_to[1])
|
Zeile 1893 | Zeile 1898 |
---|
// Event runs all day if($start_time == 0000) {
|
// Event runs all day if($start_time == 0000) {
|
$time_period = $lang->all_day; } else {
| $time_period = $lang->all_day; } else {
|
$time_period = $lang->starts.gmdate($mybb->settings['timeformat'], $event['starttime_user']); } }
| $time_period = $lang->starts.gmdate($mybb->settings['timeformat'], $event['starttime_user']); } }
|
Zeile 1921 | Zeile 1926 |
---|
} $event_time = ''; if($time_period)
|
} $event_time = ''; if($time_period)
|
{
| {
|
$event_time = "<span class=\"smalltext\"> ({$time_period})</span>"; } if($event['private'] == 1)
| $event_time = "<span class=\"smalltext\"> ({$time_period})</span>"; } if($event['private'] == 1)
|
Zeile 1946 | Zeile 1951 |
---|
{ $bday_count = count($birthdays["$weekday_day-$weekday_month"]); if($bday_count > 1)
|
{ $bday_count = count($birthdays["$weekday_day-$weekday_month"]); if($bday_count > 1)
|
{
| {
|
$day_birthdays = "<a href=\"".get_calendar_link($calendar['cid'], $weekday_year, $weekday_month, $weekday_day)."\">{$bday_count} {$lang->birthdays}</a><br />\n"; } else
| $day_birthdays = "<a href=\"".get_calendar_link($calendar['cid'], $weekday_year, $weekday_month, $weekday_day)."\">{$bday_count} {$lang->birthdays}</a><br />\n"; } else
|
Zeile 2059 | Zeile 2064 |
---|
$month_start_weekday = gmdate("w", gmmktime(0, 0, 0, $month, $calendar['startofweek']+1, $year)); // This is if we have days in the previous month to show
|
$month_start_weekday = gmdate("w", gmmktime(0, 0, 0, $month, $calendar['startofweek']+1, $year)); // This is if we have days in the previous month to show
|
if($month_start_weekday != $weekdays[0])
| if($month_start_weekday != $weekdays[0] || $calendar['startofweek'] != 0)
|
{ $day = gmdate("t", gmmktime(0, 0, 0, $prev_month['month'], 1, $prev_month['year'])); $day -= array_search(($month_start_weekday), $weekdays);
| { $day = gmdate("t", gmmktime(0, 0, 0, $prev_month['month'], 1, $prev_month['year'])); $day -= array_search(($month_start_weekday), $weekdays);
|
Zeile 2099 | Zeile 2104 |
---|
{ $weekday_name = fetch_weekday_name($weekday); eval("\$weekday_headers .= \"".$templates->get("calendar_weekdayheader")."\";");
|
{ $weekday_name = fetch_weekday_name($weekday); eval("\$weekday_headers .= \"".$templates->get("calendar_weekdayheader")."\";");
|
| } // Fix offset for Start Of Week being Saturday if($calendar_month == $prev_month['month'] && $calendar['startofweek'] > 0) { $day -= 7; // Lets make sure we don't have a whole extra column for the last month if($prev_month_days-7 >= ($day-1)) { $day += 7; }
|
}
for($row = 0; $row < 6; ++$row) // Iterate weeks (each week gets a row) { foreach($weekdays as $weekday_id => $weekday)
|
}
for($row = 0; $row < 6; ++$row) // Iterate weeks (each week gets a row) { foreach($weekdays as $weekday_id => $weekday)
|
{
| {
|
// Current month always starts on 1st row if($row == 0 && $day == $calendar['startofweek']+1) {
| // Current month always starts on 1st row if($row == 0 && $day == $calendar['startofweek']+1) {
|
Zeile 2162 | Zeile 2179 |
---|
foreach($events_cache["$day-$calendar_month-$calendar_year"] as $event) { $event['eventlink'] = get_event_link($event['eid']);
|
foreach($events_cache["$day-$calendar_month-$calendar_year"] as $event) { $event['eventlink'] = get_event_link($event['eid']);
|
$event['name'] = htmlspecialchars_uni($event['name']); $event['fullname'] = $event['name'];
| $event['fullname'] = htmlspecialchars_uni($event['name']);
|
if(my_strlen($event['name']) > 15) { $event['name'] = my_substr($event['name'], 0, 15) . "...";
|
if(my_strlen($event['name']) > 15) { $event['name'] = my_substr($event['name'], 0, 15) . "...";
|
}
| } $event['name'] = htmlspecialchars_uni($event['name']);
|
if($event['private'] == 1) { $event_class = " private_event";
| if($event['private'] == 1) { $event_class = " private_event";
|
Zeile 2182 | Zeile 2199 |
---|
} eval("\$day_events .= \"".$templates->get("calendar_eventbit")."\";"); }
|
} eval("\$day_events .= \"".$templates->get("calendar_eventbit")."\";"); }
|
}
| }
|
}
// Birthdays on this day?
| }
// Birthdays on this day?
|
Zeile 2201 | Zeile 2218 |
---|
}
$day_link = get_calendar_link($calendar['cid'], $calendar_year, $calendar_month, $day);
|
}
$day_link = get_calendar_link($calendar['cid'], $calendar_year, $calendar_month, $day);
|
|
|
// Is the current day if($day.$calendar_month.$year == $today && $month == $calendar_month) {
| // Is the current day if($day.$calendar_month.$year == $today && $month == $calendar_month) {
|