Vergleich calendar.php - 1.8.15 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
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

	}

$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")."\";");

		{
$selected = "";
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 987Zeile 987
				{
case 1:
$repeats_1_days = $repeats['days'];

				{
case 1:
$repeats_1_days = $repeats['days'];

						$repeats_3_weeks = 1;
$repeats_4_type[1] = "checked=\"checked\"";
$repeats_4_day = 1;
$repeats_4_months = 1;
$repeats_4_months2 = 1;
$repeats_5_type[1] = "checked=\"checked\"";
$repeats_5_day = 1;
$repeats_5_years = $repeats_5_years2 = 1;

						$repeats_3_weeks = 1;
$repeats_4_type[1] = "checked=\"checked\"";
$repeats_4_day = 1;
$repeats_4_months = 1;
$repeats_4_months2 = 1;
$repeats_5_type[1] = "checked=\"checked\"";
$repeats_5_day = 1;
$repeats_5_years = $repeats_5_years2 = 1;

						break;
case 3:

						break;
case 3:

						$repeats_1_days = 1;

						$repeats_1_days = 1;

						$repeats_3_weeks = $repeats['weeks'];
if(is_array($repeats['days']))
{

						$repeats_3_weeks = $repeats['weeks'];
if(is_array($repeats['days']))
{

Zeile 1015Zeile 1015
						$repeats_5_years = $repeats_5_years2 = 1;
break;
case 4:

						$repeats_5_years = $repeats_5_years2 = 1;
break;
case 4:

						$repeats_1_days = 1;
$repeats_3_weeks = 1;
if($repeats['day'])

						$repeats_1_days = 1;
$repeats_3_weeks = 1;
if($repeats['day'])

						{
$repeats_4_type[1] = "checked=\"checked\"";
$repeats_4_day = $repeats['day'];

						{
$repeats_4_type[1] = "checked=\"checked\"";
$repeats_4_day = $repeats['day'];

Zeile 1046Zeile 1046
						{
$repeats_5_type[1] = "checked=\"checked\"";
$repeats_5_day = $repeats['day'];

						{
$repeats_5_type[1] = "checked=\"checked\"";
$repeats_5_day = $repeats['day'];

							$repeats_5_month[$repeats['month']] = $repeats_5_month2[$repeats['month']] = "selected=\"selected\"";
$repeats_5_years = $repeats_5_years2 = $repeats['years'];

							$repeats_5_month[$repeats['month']] = $repeats_5_month2[$repeats['month']] = "selected=\"selected\"";
$repeats_5_years = $repeats_5_years2 = $repeats['years'];

						}
else
{

						}
else
{

Zeile 1103Zeile 1103
		{
$selected = "selected=\"selected\"";
eval("\$start_years .= \"".$templates->get("calendar_year")."\";");

		{
$selected = "selected=\"selected\"";
eval("\$start_years .= \"".$templates->get("calendar_year")."\";");

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

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


if($year == $end_year)
{


if($year == $end_year)
{

Zeile 1199Zeile 1199
	if($calendar_permissions[$calendar['cid']]['canmoderateevents'] != 1)
{
error_no_permission();

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

	}

	}


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



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


Zeile 1214Zeile 1214
	// Build calendar select
$query = $db->simple_select("calendars", "*", "", array("order_by" => "name", "order_dir" => "asc"));
while($calendar_option = $db->fetch_array($query))

	// Build calendar select
$query = $db->simple_select("calendars", "*", "", array("order_by" => "name", "order_dir" => "asc"));
while($calendar_option = $db->fetch_array($query))

	{

	{

		if($calendar_permissions[$calendar['cid']]['canviewcalendar'] == 1)
{
$calendar_option['name'] = htmlspecialchars_uni($calendar_option['name']);
eval("\$calendar_select .= \"".$templates->get("calendar_select")."\";");
}

		if($calendar_permissions[$calendar['cid']]['canviewcalendar'] == 1)
{
$calendar_option['name'] = htmlspecialchars_uni($calendar_option['name']);
eval("\$calendar_select .= \"".$templates->get("calendar_select")."\";");
}

	}

$plugins->run_hooks("calendar_move_end");

	}

$plugins->run_hooks("calendar_move_end");


eval("\$moveevent = \"".$templates->get("calendar_move")."\";");
output_page($moveevent);


eval("\$moveevent = \"".$templates->get("calendar_move")."\";");
output_page($moveevent);

Zeile 1230Zeile 1230

// Actually move the event
if($mybb->input['action'] == "do_move" && $mybb->request_method == "post")


// Actually move the event
if($mybb->input['action'] == "do_move" && $mybb->request_method == "post")

{
// 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);

{
// 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?

	}

// Do we have permission to view this calendar?

Zeile 1291Zeile 1291

// 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?

{
// 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)

	$calendar_permissions = get_calendar_permissions($calendar['cid']);
if($calendar_permissions['canviewcalendar'] != 1)

	{
error_no_permission();

	{
error_no_permission();

	}

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

	}

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

Zeile 1336Zeile 1336

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


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





// Unapprove an event
if($mybb->input['action'] == "unapprove")
{

// Unapprove an event
if($mybb->input['action'] == "unapprove")
{

Zeile 1344Zeile 1344
	verify_post_check($mybb->get_input('my_post_key'));

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

	verify_post_check($mybb->get_input('my_post_key'));

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

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

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


if(!$event)
{


if(!$event)
{

Zeile 1408Zeile 1408
	if(!$calendar)
{
error($lang->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 || ($calendar_permissions['canmoderateevents'] != 1 && $event['visible'] == 0))
{
error_no_permission();


// Do we have permission to view this calendar?
$calendar_permissions = get_calendar_permissions($calendar['cid']);
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']);


Zeile 1432Zeile 1432
		"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)

	}

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);


	}

$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 1509Zeile 1518
		if($event['userstars'] && $event['starimage'] && $event['stars'])
{
$event['userstars'] .= "<br />";

		if($event['userstars'] && $event['starimage'] && $event['stars'])
{
$event['userstars'] .= "<br />";

		}
}

		}
}

	// Created by a guest or an unknown user
else
{

	// Created by a guest or an unknown user
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)

			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;
}

Zeile 1785Zeile 1794
			$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['usergroup'])

			{

			{

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

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





			else
{

			else
{

				$user_usergroup = $groupscache[1];














				$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 1877Zeile 1895
			if($event['ignoretimezone'] == 0)
{
$offset = (float)$event['timezone'];

			if($event['ignoretimezone'] == 0)
{
$offset = (float)$event['timezone'];

			}
else
{

			}
else
{

				$offset = (float)$mybb->user['timezone'];
}


				$offset = (float)$mybb->user['timezone'];
}


Zeile 2025Zeile 2043
		// So now we have the start day of this week to show
$start_day = $day-$my_weekday;
$mybb->input['week'] = adodb_gmmktime(0, 0, 0, $month, $start_day, $year);

		// So now we have the start day of this week to show
$start_day = $day-$my_weekday;
$mybb->input['week'] = adodb_gmmktime(0, 0, 0, $month, $start_day, $year);

	}
else
{

	}
else
{

		$mybb->input['week'] = (int)str_replace("n", "-", $mybb->get_input('week'));
// Nothing before 1901 please ;)
if($mybb->input['week'] < -2177625600)

		$mybb->input['week'] = (int)str_replace("n", "-", $mybb->get_input('week'));
// Nothing before 1901 please ;)
if($mybb->input['week'] < -2177625600)

Zeile 2091Zeile 2109

$next_week_link = '';
if(my_date("Y", $next_week)+1 <= my_date("Y")+5)


$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")."\";");

		$next_link = get_calendar_week_link($calendar['cid'], $next_week);

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

Zeile 2153Zeile 2171
						else
{
$time_period = gmdate($mybb->settings['timeformat'], $event['starttime_user'])." - ".gmdate($mybb->settings['timeformat'], $event['endtime_user']);

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

						}
}

						}
}

					// Event starts on this day
else if($start_day == $weekday_date)

					// Event starts on this day
else if($start_day == $weekday_date)

					{
// Event runs all day

					{
// Event runs all day

						if($start_time == 0000)

						if($start_time == 0000)

						{
$time_period = $lang->all_day;
}

						{
$time_period = $lang->all_day;
}

						else
{
$time_period = $lang->starts.gmdate($mybb->settings['timeformat'], $event['starttime_user']);

						else
{
$time_period = $lang->starts.gmdate($mybb->settings['timeformat'], $event['starttime_user']);

						}

						}

					}
// Event finishes on this day
else if($end_day == $weekday_date)

					}
// Event finishes on this day
else if($end_day == $weekday_date)

					{

					{

						// Event runs all day
if($end_time == 2359)
{

						// Event runs all day
if($end_time == 2359)
{

Zeile 2186Zeile 2204
					{
$time_period = $lang->all_day;
}

					{
$time_period = $lang->all_day;
}

				}

				}

				$event_time = '';
if($time_period)
{

				$event_time = '';
if($time_period)
{

Zeile 2250Zeile 2268
		$days = $day_bits[$month[0]];

eval("\$weekday_bits .= \"".$templates->get("calendar_weekview_month")."\";");

		$days = $day_bits[$month[0]];

eval("\$weekday_bits .= \"".$templates->get("calendar_weekview_month")."\";");

	}

	}


$addevent = '';
if($mybb->usergroup['canaddevents'] == 1)


$addevent = '';
if($mybb->usergroup['canaddevents'] == 1)

	{

	{

		eval("\$addevent = \"".$templates->get("calendar_addeventlink")."\";");
}


		eval("\$addevent = \"".$templates->get("calendar_addeventlink")."\";");
}


Zeile 2270Zeile 2288
{
// Showing a particular calendar
if($mybb->input['calendar'])

{
// Showing a particular calendar
if($mybb->input['calendar'])

	{

	{

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

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

Zeile 2282Zeile 2300
	}

// Invalid calendar?

	}

// Invalid calendar?

	if(!$calendar['cid'])

	if(!$calendar)

	{
error($lang->invalid_calendar);
}

	{
error($lang->invalid_calendar);
}

Zeile 2530Zeile 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;
}