Vergleich calendar.php - 1.8.14 - 1.8.38

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

						$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:
$repeats_1_days = 1;
$repeats_3_weeks = $repeats['weeks'];

					case 3:
$repeats_1_days = 1;
$repeats_3_weeks = $repeats['weeks'];

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 1197Zeile 1197
	}

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

	}

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

	{
error_no_permission();
}

	{
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?
$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 1272Zeile 1272
	}

if($calendar_permissions[$mybb->input['new_calendar']]['canviewcalendar'] != 1)

	}

if($calendar_permissions[$mybb->input['new_calendar']]['canviewcalendar'] != 1)

	{

	{

		error_no_permission();
}

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

		error_no_permission();
}

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





	$plugins->run_hooks("calendar_do_move_start");

	$plugins->run_hooks("calendar_do_move_start");





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

	$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)
{
error_no_permission();
}

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


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

$plugins->run_hooks("calendar_approve_start");


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

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

$plugins->run_hooks("calendar_approve_end");

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

if(!$event)

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

if(!$event)

	{

	{

		error($lang->error_invalidevent);
}


		error($lang->error_invalidevent);
}


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

if(!$event || ($event['private'] == 1 && $event['uid'] != $mybb->user['uid']))

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

if(!$event || ($event['private'] == 1 && $event['uid'] != $mybb->user['uid']))

	{

	{

		error($lang->error_invalidevent);
}


		error($lang->error_invalidevent);
}


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

Zeile 1445Zeile 1445
	$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 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 1690Zeile 1699
	if($mybb->input['day'] && $mybb->input['day'] <= gmdate("t", adodb_gmmktime(0, 0, 0, $month, 1, $year)))
{
$day = $mybb->input['day'];

	if($mybb->input['day'] && $mybb->input['day'] <= gmdate("t", adodb_gmmktime(0, 0, 0, $month, 1, $year)))
{
$day = $mybb->input['day'];

	}

	}

	else
{
$day = my_date("j");

	else
{
$day = my_date("j");

Zeile 1763Zeile 1772
		foreach($events_cache["$day-$month-$year"] as $event)
{
$event['name'] = htmlspecialchars_uni($event['name']);

		foreach($events_cache["$day-$month-$year"] as $event)
{
$event['name'] = htmlspecialchars_uni($event['name']);





			$event_parser_options = array(
"allow_html" => $calendar['allowhtml'],
"allow_mycode" => $calendar['allowmycode'],

			$event_parser_options = array(
"allow_html" => $calendar['allowhtml'],
"allow_mycode" => $calendar['allowmycode'],

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)
{
$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['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)
{
$event_parser_options['allow_imgcode'] = 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 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 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;
}