Vergleich calendar.php - 1.8.10 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 11Zeile 11
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'calendar.php');


define("IN_MYBB", 1);
define('THIS_SCRIPT', 'calendar.php');


$templatelist = "calendar_weekdayheader,calendar_weekrow_day,calendar_weekrow,calendar,calendar_addevent,calendar_year,calendar_day,calendar_select,calendar_repeats,calendar_weekview_day_event_time";
$templatelist .= ",calendar_weekview_day,calendar_weekview_day_event,calendar_mini_weekdayheader,calendar_mini_weekrow_day,calendar_mini_weekrow,calendar_mini,calendar_mini_weekrow_day_link,calendar_move";
$templatelist .= ",calendar_event_editbutton,calendar_event_modoptions,calendar_dayview_event,calendar_dayview,codebuttons,calendar_weekrow_day_events,calendar_weekview_month,calendar_addeventlink";
$templatelist .= ",calendar_jump,calendar_jump_option,calendar_editevent,calendar_dayview_birthdays_bday,calendar_dayview_birthdays,calendar_dayview_noevents,calendar_addevent_calendarselect_hidden";
$templatelist .= ",calendar_weekrow_day_birthdays,calendar_weekview_day_birthdays,calendar_year_sel,calendar_event_userstar,calendar_addevent_calendarselect,calendar_eventbit,calendar_event,calendar_weekview";

$templatelist = "calendar_weekdayheader,calendar_weekrow_day,calendar_weekrow,calendar,calendar_addevent,calendar_year,calendar_day,calendar_select,calendar_repeats,calendar_weekview_day_event_time,calendar_weekview_nextlink";
$templatelist .= ",calendar_weekview_day,calendar_weekview_day_event,calendar_mini_weekdayheader,calendar_mini_weekrow_day,calendar_mini_weekrow,calendar_mini,calendar_mini_weekrow_day_link,calendar_weekview_prevlink";
$templatelist .= ",calendar_event_editbutton,calendar_event_modoptions,calendar_dayview_event,calendar_dayview,codebuttons,calendar_weekrow_day_events,calendar_weekview_month,calendar_addeventlink,calendar_weekview";
$templatelist .= ",calendar_jump,calendar_jump_option,calendar_editevent,calendar_dayview_birthdays_bday,calendar_dayview_birthdays,calendar_dayview_noevents,calendar_addevent_calendarselect_hidden,calendar_nextlink";
$templatelist .= ",calendar_weekrow_day_birthdays,calendar_weekview_day_birthdays,calendar_year_sel,calendar_event_userstar,calendar_addevent_calendarselect,calendar_eventbit,calendar_event,calendar_move,calendar_prevlink";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_calendar.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_calendar.php";

Zeile 227Zeile 227
	$calendar = $db->fetch_array($query);

// Invalid calendar?

	$calendar = $db->fetch_array($query);

// Invalid calendar?

	if(!$calendar['cid'])

	if(!$calendar)

	{
error($lang->invalid_calendar);

	{
error($lang->invalid_calendar);

	}

	}


// Do we have permission to view this calendar or post events?
$calendar_permissions = get_calendar_permissions($calendar['cid']);
if($calendar_permissions['canviewcalendar'] != 1 || $calendar_permissions['canaddevents'] != 1)


// Do we have permission to view this calendar or post events?
$calendar_permissions = get_calendar_permissions($calendar['cid']);
if($calendar_permissions['canviewcalendar'] != 1 || $calendar_permissions['canaddevents'] != 1)

	{

	{

		error_no_permission();
}

		error_no_permission();
}





	add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid']));
add_breadcrumb($lang->nav_addevent);

	add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid']));
add_breadcrumb($lang->nav_addevent);





	$plugins->run_hooks("calendar_addevent_start");

// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter.

	$plugins->run_hooks("calendar_addevent_start");

// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter.

Zeile 249Zeile 249
	{
$codebuttons = build_mycode_inserter("message", $calendar['allowsmilies']);
if($calendar['allowsmilies'] == 1)

	{
$codebuttons = build_mycode_inserter("message", $calendar['allowsmilies']);
if($calendar['allowsmilies'] == 1)

		{

		{

			$smilieinserter = build_clickable_smilies();
}
}

			$smilieinserter = build_clickable_smilies();
}
}

Zeile 257Zeile 257
	// Previous selections
$name = $description = '';
if(isset($mybb->input['name']))

	// Previous selections
$name = $description = '';
if(isset($mybb->input['name']))

	{

	{

		$name = htmlspecialchars_uni($mybb->get_input('name'));

		$name = htmlspecialchars_uni($mybb->get_input('name'));

	}


	}


	if(isset($mybb->input['description']))
{
$description = htmlspecialchars_uni($mybb->get_input('description'));

	if(isset($mybb->input['description']))
{
$description = htmlspecialchars_uni($mybb->get_input('description'));

Zeile 272Zeile 272
		$single_month[$number] = $start_month[$number] = $end_month[$number] = $repeats_5_month[$number] = $repeats_5_month2[$number] = '';
}
foreach(range(1, 5) as $number)

		$single_month[$number] = $start_month[$number] = $end_month[$number] = $repeats_5_month[$number] = $repeats_5_month2[$number] = '';
}
foreach(range(1, 5) as $number)

	{

	{

		$repeats_sel[$number] = '';
}
foreach(range(0, 6) as $number)

		$repeats_sel[$number] = '';
}
foreach(range(0, 6) as $number)

Zeile 409Zeile 409
		$repeats_5_month2[1] = "selected=\"selected\"";
$repeats_5_years2 = 1;
$timezone = $mybb->user['timezone'];

		$repeats_5_month2[1] = "selected=\"selected\"";
$repeats_5_years2 = 1;
$timezone = $mybb->user['timezone'];

	}

$single_years = $start_years = $end_years = '';

// Construct option list for years
for($year = my_date('Y'); $year < (my_date('Y') + 5); ++$year)
{
if($year == $single_year)
{
$selected = "selected=\"selected\"";
eval("\$single_years .= \"".$templates->get("calendar_year")."\";");
}
else
{
$selected = "";
eval("\$single_years .= \"".$templates->get("calendar_year")."\";");
}

if($year == $start_year)
{
$selected = "selected=\"selected\"";
eval("\$start_years .= \"".$templates->get("calendar_year")."\";");
}
else
{
$selected = "";
eval("\$start_years .= \"".$templates->get("calendar_year")."\";");
}

if($year == $end_year)
{
$selected = "selected=\"selected\"";
eval("\$end_years .= \"".$templates->get("calendar_year")."\";");
}
else
{
$selected = "";
eval("\$end_years .= \"".$templates->get("calendar_year")."\";");
}
}

$single_days = $start_days = $end_days = '';

// Construct option list for days
for($day = 1; $day <= 31; ++$day)
{
if($day == $single_day)
{
$selected = "selected=\"selected\"";
eval("\$single_days .= \"".$templates->get("calendar_day")."\";");
}
else
{
$selected = "";
eval("\$single_days .= \"".$templates->get("calendar_day")."\";");
}

if($day == $start_day)
{
$selected = "selected=\"selected\"";
eval("\$start_days .= \"".$templates->get("calendar_day")."\";");
}
else
{
$selected = "";
eval("\$start_days .= \"".$templates->get("calendar_day")."\";");
}

if($day == $end_day)
{
$selected = "selected=\"selected\"";
eval("\$end_days .= \"".$templates->get("calendar_day")."\";");
}
else
{
$selected = "";

	}

$single_years = $start_years = $end_years = '';

// Construct option list for years
for($year = my_date('Y'); $year < (my_date('Y') + 5); ++$year)
{
if($year == $single_year)
{
$selected = "selected=\"selected\"";
eval("\$single_years .= \"".$templates->get("calendar_year")."\";");
}
else
{
$selected = "";
eval("\$single_years .= \"".$templates->get("calendar_year")."\";");
}

if($year == $start_year)
{
$selected = "selected=\"selected\"";
eval("\$start_years .= \"".$templates->get("calendar_year")."\";");
}
else
{
$selected = "";
eval("\$start_years .= \"".$templates->get("calendar_year")."\";");
}

if($year == $end_year)
{
$selected = "selected=\"selected\"";
eval("\$end_years .= \"".$templates->get("calendar_year")."\";");
}
else
{
$selected = "";
eval("\$end_years .= \"".$templates->get("calendar_year")."\";");
}
}

$single_days = $start_days = $end_days = '';

// Construct option list for days
for($day = 1; $day <= 31; ++$day)
{
if($day == $single_day)
{
$selected = "selected=\"selected\"";
eval("\$single_days .= \"".$templates->get("calendar_day")."\";");
}
else
{
$selected = "";
eval("\$single_days .= \"".$templates->get("calendar_day")."\";");
}

if($day == $start_day)
{
$selected = "selected=\"selected\"";
eval("\$start_days .= \"".$templates->get("calendar_day")."\";");
}
else
{
$selected = "";
eval("\$start_days .= \"".$templates->get("calendar_day")."\";");
}

if($day == $end_day)
{
$selected = "selected=\"selected\"";
eval("\$end_days .= \"".$templates->get("calendar_day")."\";");
}
else
{
$selected = "";

			eval("\$end_days .= \"".$templates->get("calendar_day")."\";");
}
}

			eval("\$end_days .= \"".$templates->get("calendar_day")."\";");
}
}

Zeile 780Zeile 780
		$calendar = $db->fetch_array($query);

// Invalid calendar?

		$calendar = $db->fetch_array($query);

// Invalid calendar?

		if(!$calendar['cid'])

		if(!$calendar)

		{
error($lang->invalid_calendar);
}

		{
error($lang->invalid_calendar);
}

Zeile 937Zeile 937
	{
$event_errors = '';
$mybb->input['calendar'] = $event['cid'];

	{
$event_errors = '';
$mybb->input['calendar'] = $event['cid'];

		$name = htmlspecialchars_uni($event['name']);

		$name = $event['name'];

		$description = htmlspecialchars_uni($event['description']);
if($event['private'] == 1)
{

		$description = htmlspecialchars_uni($event['description']);
if($event['private'] == 1)
{

Zeile 1254Zeile 1254
	// Do we have permission to view this calendar?
$calendar_permissions = get_calendar_permissions();
if($calendar_permissions[$calendar['cid']]['canviewcalendar'] != 1)

	// Do we have permission to view this calendar?
$calendar_permissions = get_calendar_permissions();
if($calendar_permissions[$calendar['cid']]['canviewcalendar'] != 1)

	{
error_no_permission();

	{
error_no_permission();

	}

if($calendar_permissions[$calendar['cid']]['canmoderateevents'] != 1)

	}

if($calendar_permissions[$calendar['cid']]['canmoderateevents'] != 1)

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 1267Zeile 1267
	$new_calendar = $db->fetch_array($query);

if(!$new_calendar)

	$new_calendar = $db->fetch_array($query);

if(!$new_calendar)

	{

	{

		error($lang->invalid_calendar);
}


		error($lang->invalid_calendar);
}


Zeile 1275Zeile 1275
	{
error_no_permission();
}

	{
error_no_permission();
}





	$updated_event = array(
"cid" => $new_calendar['cid']
);

	$updated_event = array(
"cid" => $new_calendar['cid']
);





	$plugins->run_hooks("calendar_do_move_start");

$db->update_query("events", $updated_event, "eid='{$event['eid']}'");

	$plugins->run_hooks("calendar_do_move_start");

$db->update_query("events", $updated_event, "eid='{$event['eid']}'");





	$plugins->run_hooks("calendar_do_move_end");

redirect(get_event_link($event['eid']), $lang->redirect_eventmoved);

	$plugins->run_hooks("calendar_do_move_end");

redirect(get_event_link($event['eid']), $lang->redirect_eventmoved);

}


}


// Approve an event
if($mybb->input['action'] == "approve")

// Approve an event
if($mybb->input['action'] == "approve")

{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

$query = $db->simple_select("events", "*", "eid='{$mybb->input['eid']}'");
$event = $db->fetch_array($query);

if(!$event)
{
error($lang->error_invalidevent);
}

$query = $db->simple_select("calendars", "*", "cid='{$event['cid']}'");
$calendar = $db->fetch_array($query);

// Invalid calendar?
if(!$calendar)
{
error($lang->invalid_calendar);
}

// Do we have permission to view this calendar?
$calendar_permissions = get_calendar_permissions($calendar['cid']);
if($calendar_permissions['canviewcalendar'] != 1)
{
error_no_permission();
}

if($calendar_permissions['canmoderateevents'] != 1)

{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

$query = $db->simple_select("events", "*", "eid='{$mybb->input['eid']}'");
$event = $db->fetch_array($query);

if(!$event)
{
error($lang->error_invalidevent);
}

$query = $db->simple_select("calendars", "*", "cid='{$event['cid']}'");
$calendar = $db->fetch_array($query);

// Invalid calendar?
if(!$calendar)
{
error($lang->invalid_calendar);
}

// Do we have permission to view this calendar?
$calendar_permissions = get_calendar_permissions($calendar['cid']);
if($calendar_permissions['canviewcalendar'] != 1)
{
error_no_permission();
}

if($calendar_permissions['canmoderateevents'] != 1)

	{
error_no_permission();
}

	{
error_no_permission();
}





	$updated_event = array(
"visible" => 1
);

	$updated_event = array(
"visible" => 1
);





	$plugins->run_hooks("calendar_approve_start");

$db->update_query("events", $updated_event, "eid='{$event['eid']}'");

	$plugins->run_hooks("calendar_approve_start");

$db->update_query("events", $updated_event, "eid='{$event['eid']}'");





	$plugins->run_hooks("calendar_approve_end");

redirect(get_event_link($event['eid']), $lang->redirect_eventapproved);

	$plugins->run_hooks("calendar_approve_end");

redirect(get_event_link($event['eid']), $lang->redirect_eventapproved);

Zeile 1347Zeile 1347
	$event = $db->fetch_array($query);

if(!$event)

	$event = $db->fetch_array($query);

if(!$event)

	{
error($lang->error_invalidevent);
}

$query = $db->simple_select("calendars", "*", "cid='{$event['cid']}'");

	{
error($lang->error_invalidevent);
}

$query = $db->simple_select("calendars", "*", "cid='{$event['cid']}'");

	$calendar = $db->fetch_array($query);

// Invalid calendar?

	$calendar = $db->fetch_array($query);

// Invalid calendar?

Zeile 1415Zeile 1415
	if($calendar_permissions['canviewcalendar'] != 1 || ($calendar_permissions['canmoderateevents'] != 1 && $event['visible'] == 0))
{
error_no_permission();

	if($calendar_permissions['canviewcalendar'] != 1 || ($calendar_permissions['canmoderateevents'] != 1 && $event['visible'] == 0))
{
error_no_permission();

	}


	}


	$event['name'] = htmlspecialchars_uni($event['name']);

	$event['name'] = htmlspecialchars_uni($event['name']);





	add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid']));
add_breadcrumb($event['name'], get_event_link($event['eid']));

	add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid']));
add_breadcrumb($event['name'], get_event_link($event['eid']));





	$plugins->run_hooks("calendar_event_start");

$event_parser_options = array(

	$plugins->run_hooks("calendar_event_start");

$event_parser_options = array(

Zeile 1431Zeile 1431
		"allow_imgcode" => $calendar['allowimgcode'],
"allow_videocode" => $calendar['allowvideocode']
);

		"allow_imgcode" => $calendar['allowimgcode'],
"allow_videocode" => $calendar['allowvideocode']
);


if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{


if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{

		$event_parser_options['allow_imgcode'] = 0;

		$event_parser_options['allow_imgcode'] = 0;

	}

if($mybb->user['showvideos'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)

	}

if($mybb->user['uid'] != 0 && $mybb->user['showvideos'] != 1 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)

	{
$event_parser_options['allow_videocode'] = 0;

	{
$event_parser_options['allow_videocode'] = 0;

	}


	}


	$event['description'] = $parser->parse_message($event['description'], $event_parser_options);

// Get the usergroup

	$event['description'] = $parser->parse_message($event['description'], $event_parser_options);

// Get the usergroup

	if($event['username'])
{
if(!$event['displaygroup'])
{
$event['displaygroup'] = $event['usergroup'];
}
$user_usergroup = $groupscache[$event['displaygroup']];
}
else

	if($event['usergroup'])









	{

	{

		$user_usergroup = $groupscache[1];


















		$user_usergroup = usergroup_permissions($event['usergroup']);
}
else
{
$user_usergroup = usergroup_permissions(1);
}

$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

if(!$event['displaygroup'])
{
$event['displaygroup'] = $event['usergroup'];
}

$display_group = usergroup_displaygroup($event['displaygroup']);
if(is_array($display_group))
{
$user_usergroup = array_merge($user_usergroup, $display_group);

	}

$titles_cache = $cache->read("usertitles");

	}

$titles_cache = $cache->read("usertitles");

Zeile 1517Zeile 1526
		if(!$event['username'])
{
$event['username'] = $lang->guest;

		if(!$event['username'])
{
$event['username'] = $lang->guest;

		}


		}


		$event['username'] = htmlspecialchars_uni($event['username']);
$event['profilelink'] = format_name($event['username'], 1);


		$event['username'] = htmlspecialchars_uni($event['username']);
$event['profilelink'] = format_name($event['username'], 1);


Zeile 1577Zeile 1586
			$time_period = gmdate($mybb->settings['dateformat'], $event['starttime_user']).", ".gmdate($mybb->settings['timeformat'], $event['starttime_user']);
$time_period .= " - ";
$time_period .= gmdate($mybb->settings['dateformat'], $event['endtime_user']).", ".gmdate($mybb->settings['timeformat'], $event['endtime_user']);

			$time_period = gmdate($mybb->settings['dateformat'], $event['starttime_user']).", ".gmdate($mybb->settings['timeformat'], $event['starttime_user']);
$time_period .= " - ";
$time_period .= gmdate($mybb->settings['dateformat'], $event['endtime_user']).", ".gmdate($mybb->settings['timeformat'], $event['endtime_user']);

		}
}
else
{

		}
}
else
{

		$time_period = gmdate($mybb->settings['dateformat'], $event['starttime_user']);
}


		$time_period = gmdate($mybb->settings['dateformat'], $event['starttime_user']);
}


Zeile 1600Zeile 1609
			{
$approve = $lang->unapprove_event;
$approve_value = "unapprove";

			{
$approve = $lang->unapprove_event;
$approve_value = "unapprove";

			}

			}

			else
{
$approve = $lang->approve_event;

			else
{
$approve = $lang->approve_event;

Zeile 1612Zeile 1621
		if($event['visible'] == 0)
{
$event_class = " trow_shaded";

		if($event['visible'] == 0)
{
$event_class = " trow_shaded";

		}

		}

	}

$month = my_date("n");

	}

$month = my_date("n");

Zeile 1665Zeile 1674
	}

// Incoming year?

	}

// Incoming year?

	if(isset($mybb->input['year']) && $mybb->get_input('year', MyBB::INPUT_INT) <= my_date("Y")+5)

	if(isset($mybb->input['year']) && $mybb->get_input('year', MyBB::INPUT_INT) <= my_date("Y")+5 && $mybb->get_input('year', MyBB::INPUT_INT) >= 1901)

	{
$year = $mybb->get_input('year', MyBB::INPUT_INT);
}

	{
$year = $mybb->get_input('year', MyBB::INPUT_INT);
}

Zeile 1677Zeile 1686
	// Then the month
$mybb->input['month'] = $mybb->get_input('month', MyBB::INPUT_INT);
if($mybb->input['month'] >= 1 && $mybb->input['month'] <= 12)

	// Then the month
$mybb->input['month'] = $mybb->get_input('month', MyBB::INPUT_INT);
if($mybb->input['month'] >= 1 && $mybb->input['month'] <= 12)

	{

	{

		$month = $mybb->input['month'];
}
else

		$month = $mybb->input['month'];
}
else

Zeile 1772Zeile 1781
				"allow_videocode" => $calendar['allowvideocode']
);


				"allow_videocode" => $calendar['allowvideocode']
);


			if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)

			if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)

			{
$event_parser_options['allow_imgcode'] = 0;
}

			{
$event_parser_options['allow_imgcode'] = 0;
}


if($mybb->user['showvideos'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)
{
$event_parser_options['allow_videocode'] = 0;
}

$event['description'] = $parser->parse_message($event['description'], $event_parser_options);



if($mybb->user['uid'] != 0 && $mybb->user['showvideos'] != 1 || $mybb->settings['guestvideos'] != 1 && $mybb->user['uid'] == 0)
{
$event_parser_options['allow_videocode'] = 0;
}

$event['description'] = $parser->parse_message($event['description'], $event_parser_options);


			// Get the usergroup

			// Get the usergroup

			if($event['username'])

			if($event['usergroup'])

			{

			{

				if(!$event['displaygroup'])
{
$event['displaygroup'] = $event['usergroup'];
}
$user_usergroup = $groupscache[$event['displaygroup']];








				$user_usergroup = usergroup_permissions($event['usergroup']);
}
else
{
$user_usergroup = usergroup_permissions(1);
}

$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

if(!$event['displaygroup'])
{
$event['displaygroup'] = $event['usergroup'];

			}

			}

			else




$display_group = usergroup_displaygroup($event['displaygroup']);
if(is_array($display_group))

			{

			{

				$user_usergroup = $groupscache[1];

				$user_usergroup = array_merge($user_usergroup, $display_group);

			}

$titles_cache = $cache->read("usertitles");

			}

$titles_cache = $cache->read("usertitles");

Zeile 2029Zeile 2047
	else
{
$mybb->input['week'] = (int)str_replace("n", "-", $mybb->get_input('week'));

	else
{
$mybb->input['week'] = (int)str_replace("n", "-", $mybb->get_input('week'));

		// No negative years please ;)
if($mybb->input['week'] < -62167219200)

		// Nothing before 1901 please ;)
if($mybb->input['week'] < -2177625600)

		{

		{

			$mybb->input['week'] = -62167219200;

			$mybb->input['week'] = -2177625600;

		}
}


		}
}


Zeile 2077Zeile 2095

$today = my_date("dnY");



$today = my_date("dnY");


	$next_week = $mybb->input['week'] + 604800;
$next_link = get_calendar_week_link($calendar['cid'], $next_week);

 
	$prev_week = $mybb->input['week'] - 604800;

	$prev_week = $mybb->input['week'] - 604800;

	$prev_link = get_calendar_week_link($calendar['cid'], $prev_week);

























$prev_week_link = '';
if(my_date("Y", $prev_week) >= 1901)
{
$prev_link = get_calendar_week_link($calendar['cid'], $prev_week);

eval("\$prev_week_link = \"".$templates->get("calendar_weekview_prevlink")."\";");
}

$next_week = $mybb->input['week'] + 604800;

$next_week_link = '';
if(my_date("Y", $next_week)+1 <= my_date("Y")+5)
{
$next_link = get_calendar_week_link($calendar['cid'], $next_week);

eval("\$next_week_link = \"".$templates->get("calendar_weekview_nextlink")."\";");
}

$sep = '';
if(!empty($prev_week_link) && !empty($next_week_link))
{
$sep = " | ";
}


$weekday_date = $mybb->input['week'];



$weekday_date = $mybb->input['week'];


Zeile 2261Zeile 2300
	}

// Invalid calendar?

	}

// Invalid calendar?

	if(!$calendar['cid'])

	if(!$calendar)

	{
error($lang->invalid_calendar);
}

	{
error($lang->invalid_calendar);
}

Zeile 2277Zeile 2316
	$plugins->run_hooks("calendar_main_view");

// Incoming year?

	$plugins->run_hooks("calendar_main_view");

// Incoming year?

	if(isset($mybb->input['year']) && $mybb->get_input('year', MyBB::INPUT_INT) <= my_date("Y")+5)

	if(isset($mybb->input['year']) && $mybb->get_input('year', MyBB::INPUT_INT) <= my_date("Y")+5 && $mybb->get_input('year', MyBB::INPUT_INT) >= 1901)

	{
$year = $mybb->get_input('year', MyBB::INPUT_INT);
}

	{
$year = $mybb->get_input('year', MyBB::INPUT_INT);
}

Zeile 2300Zeile 2339
	add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid']));
add_breadcrumb("$monthnames[$month] $year", get_calendar_link($calendar['cid'], $year, $month));


	add_breadcrumb(htmlspecialchars_uni($calendar['name']), get_calendar_link($calendar['cid']));
add_breadcrumb("$monthnames[$month] $year", get_calendar_link($calendar['cid'], $year, $month));


	$next_month = get_next_month($month, $year);

 
	$prev_month = get_prev_month($month, $year);


	$prev_month = get_prev_month($month, $year);


	$prev_link = get_calendar_link($calendar['cid'], $prev_month['year'], $prev_month['month']);
$next_link = get_calendar_link($calendar['cid'], $next_month['year'], $next_month['month']);






















	$prev_month_link = '';
if($prev_month['year'] >= 1901)
{
$prev_link = get_calendar_link($calendar['cid'], $prev_month['year'], $prev_month['month']);

eval("\$prev_month_link = \"".$templates->get("calendar_prevlink")."\";");
}

$next_month = get_next_month($month, $year);

$next_month_link = '';
if($next_month['year'] <= my_date("Y")+5)
{
$next_link = get_calendar_link($calendar['cid'], $next_month['year'], $next_month['month']);

eval("\$next_month_link = \"".$templates->get("calendar_nextlink")."\";");
}

$sep = '';
if(!empty($prev_month_link) && !empty($next_month_link))
{
$sep = " | ";
}


// Start constructing the calendar



// Start constructing the calendar


Zeile 2489Zeile 2548
			// 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)
{

				$day_class = "trow_sep";

				eval("\$day_bits .= \"".$templates->get("calendar_weekrow_currentday")."\";");

			}
// Not in this month
else if($in_month == 0)
{

			}
// Not in this month
else if($in_month == 0)
{

				$day_class = "trow1";

				eval("\$day_bits .= \"".$templates->get("calendar_weekrow_day")."\";");

			}
// Just a normal day in this month
else
{

			}
// Just a normal day in this month
else
{

				$day_class = "trow2";

				eval("\$day_bits .= \"".$templates->get("calendar_weekrow_thismonth")."\";");

			}

			}

			eval("\$day_bits .= \"".$templates->get("calendar_weekrow_day")."\";");

 
			$day_birthdays = $day_events = "";
++$day;
}

			$day_birthdays = $day_events = "";
++$day;
}