Vergleich calendar.php - 1.8.8 - 1.8.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 20Zeile 20
require_once "./global.php";
require_once MYBB_ROOT."inc/functions_calendar.php";
require_once MYBB_ROOT."inc/functions_post.php";

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

 
require_once MYBB_ROOT."inc/functions_time.php";

require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;


require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;


Zeile 798Zeile 799
	}

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

	}

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

 
	$event['timezone'] = (float)$event['timezone'];


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

Zeile 1535Zeile 1537

if($event['ignoretimezone'] == 0)
{


if($event['ignoretimezone'] == 0)
{

		$offset = $event['timezone'];

		$offset = (float)$event['timezone'];

	}
else
{

	}
else
{

		$offset = $mybb->user['timezone'];

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

	}

$event['starttime_user'] = $event['starttime']+$offset*3600;

	}

$event['starttime_user'] = $event['starttime']+$offset*3600;

Zeile 1549Zeile 1551
	if($event['endtime'] > 0 && $event['endtime'] != $event['starttime'])
{
$event['endtime_user'] = $event['endtime']+$offset*3600;

	if($event['endtime'] > 0 && $event['endtime'] != $event['starttime'])
{
$event['endtime_user'] = $event['endtime']+$offset*3600;

		$start_day = gmmktime(0, 0, 0, gmdate("n", $event['starttime_user']), gmdate("j", $event['starttime_user']), gmdate("Y", $event['starttime_user']));
$end_day = gmmktime(0, 0, 0, gmdate("n", $event['endtime_user']), gmdate("j", $event['endtime_user']), gmdate("Y", $event['endtime_user']));

		$start_day = adodb_gmmktime(0, 0, 0, gmdate("n", $event['starttime_user']), gmdate("j", $event['starttime_user']), gmdate("Y", $event['starttime_user']));
$end_day = adodb_gmmktime(0, 0, 0, gmdate("n", $event['endtime_user']), gmdate("j", $event['endtime_user']), gmdate("Y", $event['endtime_user']));

		$start_time = gmdate("Hi", $event['starttime_user']);
$end_time = gmdate("Hi", $event['endtime_user']);


		$start_time = gmdate("Hi", $event['starttime_user']);
$end_time = gmdate("Hi", $event['endtime_user']);


Zeile 1663Zeile 1665
	}

// Incoming year?

	}

// Incoming year?

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

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


	{

	{

		$year = $mybb->input['year'];

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

	}
else
{

	}
else
{

Zeile 1686Zeile 1687

// And day?
$mybb->input['day'] = $mybb->get_input('day', MyBB::INPUT_INT);


// And day?
$mybb->input['day'] = $mybb->get_input('day', MyBB::INPUT_INT);

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

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

	{
$day = $mybb->input['day'];
}

	{
$day = $mybb->input['day'];
}

Zeile 1744Zeile 1745
		}
if($birthday_list)
{

		}
if($birthday_list)
{

			$bdaydate = my_date($mybb->settings['dateformat'], gmmktime(0, 0, 0, $month, $day, $year), 0, 0);

			$bdaydate = my_date($mybb->settings['dateformat'], adodb_gmmktime(0, 0, 0, $month, $day, $year), 0, 0);

			$lang->birthdays_on_day = $lang->sprintf($lang->birthdays_on_day, $bdaydate);
eval("\$birthdays = \"".$templates->get("calendar_dayview_birthdays", 1, 0)."\";");
}
}

// So now we fetch events for this month

			$lang->birthdays_on_day = $lang->sprintf($lang->birthdays_on_day, $bdaydate);
eval("\$birthdays = \"".$templates->get("calendar_dayview_birthdays", 1, 0)."\";");
}
}

// So now we fetch events for this month

	$start_timestamp = gmmktime(0, 0, 0, $month, $day, $year);
$end_timestamp = gmmktime(23, 59, 59, $month, $day, $year);

	$start_timestamp = adodb_gmmktime(0, 0, 0, $month, $day, $year);
$end_timestamp = adodb_gmmktime(23, 59, 59, $month, $day, $year);


$events_cache = get_events($calendar, $start_timestamp, $end_timestamp, $calendar_permissions['canmoderateevents']);



$events_cache = get_events($calendar, $start_timestamp, $end_timestamp, $calendar_permissions['canmoderateevents']);


Zeile 1875Zeile 1876

if($event['ignoretimezone'] == 0)
{


if($event['ignoretimezone'] == 0)
{

				$offset = $event['timezone'];

				$offset = (float)$event['timezone'];

			}
else
{

			}
else
{

				$offset = $mybb->user['timezone'];

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

			}

$event['starttime_user'] = $event['starttime']+$offset*3600;

			}

$event['starttime_user'] = $event['starttime']+$offset*3600;

Zeile 1889Zeile 1890
			if($event['endtime'] > 0 && $event['endtime'] != $event['starttime'])
{
$event['endtime_user'] = $event['endtime']+$offset*3600;

			if($event['endtime'] > 0 && $event['endtime'] != $event['starttime'])
{
$event['endtime_user'] = $event['endtime']+$offset*3600;

				$start_day = gmmktime(0, 0, 0, gmdate("n", $event['starttime_user']), gmdate("j", $event['starttime_user']), gmdate("Y", $event['starttime_user']));
$end_day = gmmktime(0, 0, 0, gmdate("n", $event['endtime_user']), gmdate("j", $event['endtime_user']), gmdate("Y", $event['endtime_user']));

				$start_day = adodb_gmmktime(0, 0, 0, gmdate("n", $event['starttime_user']), gmdate("j", $event['starttime_user']), gmdate("Y", $event['starttime_user']));
$end_day = adodb_gmmktime(0, 0, 0, gmdate("n", $event['endtime_user']), gmdate("j", $event['endtime_user']), gmdate("Y", $event['endtime_user']));

				$start_time = gmdate("Hi", $event['starttime_user']);
$end_time = gmdate("Hi", $event['endtime_user']);


				$start_time = gmdate("Hi", $event['starttime_user']);
$end_time = gmdate("Hi", $event['endtime_user']);


Zeile 2019Zeile 2020
	if(empty($mybb->input['week']))
{
list($day, $month, $year) = explode("-", my_date("j-n-Y"));

	if(empty($mybb->input['week']))
{
list($day, $month, $year) = explode("-", my_date("j-n-Y"));

		$php_weekday = gmdate("w", gmmktime(0, 0, 0, $month, $day, $year));

		$php_weekday = gmdate("w", adodb_gmmktime(0, 0, 0, $month, $day, $year));

		$my_weekday = array_search($php_weekday, $weekdays);
// So now we have the start day of this week to show
$start_day = $day-$my_weekday;

		$my_weekday = array_search($php_weekday, $weekdays);
// So now we have the start day of this week to show
$start_day = $day-$my_weekday;

		$mybb->input['week'] = gmmktime(0, 0, 0, $month, $start_day, $year);

		$mybb->input['week'] = adodb_gmmktime(0, 0, 0, $month, $start_day, $year);

	}
else
{

	}
else
{

Zeile 2039Zeile 2040
	$week_from = explode("-", gmdate("j-n-Y", $mybb->input['week']));
$week_from_one = $week_from[1];
$friendly_week_from = gmdate($mybb->settings['dateformat'], $mybb->input['week']);

	$week_from = explode("-", gmdate("j-n-Y", $mybb->input['week']));
$week_from_one = $week_from[1];
$friendly_week_from = gmdate($mybb->settings['dateformat'], $mybb->input['week']);

	$week_to_stamp = gmmktime(0, 0, 0, $week_from[1], $week_from[0]+6, $week_from[2]);

	$week_to_stamp = adodb_gmmktime(0, 0, 0, $week_from[1], $week_from[0]+6, $week_from[2]);

	$week_to = explode("-", gmdate("j-n-Y-t", $week_to_stamp));
$friendly_week_to = gmdate($mybb->settings['dateformat'], $week_to_stamp);


	$week_to = explode("-", gmdate("j-n-Y-t", $week_to_stamp));
$friendly_week_to = gmdate($mybb->settings['dateformat'], $week_to_stamp);


Zeile 2069Zeile 2070
	}

// We load events for the entire month date range - for our mini calendars too

	}

// We load events for the entire month date range - for our mini calendars too

	$events_from = gmmktime(0, 0, 0, $week_from[1], 1, $week_from[2]);
$events_to = gmmktime(0, 0, 0, $week_to[1], $week_to[3], $week_to[2]);

	$events_from = adodb_gmmktime(0, 0, 0, $week_from[1], 1, $week_from[2]);
$events_to = adodb_gmmktime(0, 0, 0, $week_to[1], $week_to[3], $week_to[2]);


$events_cache = get_events($calendar, $events_from, $events_to, $calendar_permissions['canmoderateevents']);



$events_cache = get_events($calendar, $events_from, $events_to, $calendar_permissions['canmoderateevents']);


Zeile 2116Zeile 2117
				$time_period = '';
if($event['endtime'] > 0 && $event['endtime'] != $event['starttime'])
{

				$time_period = '';
if($event['endtime'] > 0 && $event['endtime'] != $event['starttime'])
{

					$start_day = gmmktime(0, 0, 0, gmdate("n", $event['starttime_user']), gmdate("j", $event['starttime_user']), gmdate("Y", $event['starttime_user']));
$end_day = gmmktime(0, 0, 0, gmdate("n", $event['endtime_user']), gmdate("j", $event['endtime_user']), gmdate("Y", $event['endtime_user']));

					$start_day = adodb_gmmktime(0, 0, 0, gmdate("n", $event['starttime_user']), gmdate("j", $event['starttime_user']), gmdate("Y", $event['starttime_user']));
$end_day = adodb_gmmktime(0, 0, 0, gmdate("n", $event['endtime_user']), gmdate("j", $event['endtime_user']), gmdate("Y", $event['endtime_user']));

					$start_time = gmdate("Hi", $event['starttime_user']);
$end_time = gmdate("Hi", $event['endtime_user']);
// Event only runs over one day

					$start_time = gmdate("Hi", $event['starttime_user']);
$end_time = gmdate("Hi", $event['endtime_user']);
// Event only runs over one day

Zeile 2211Zeile 2212
		}
eval("\$day_bits[$weekday_month] .= \"".$templates->get("calendar_weekview_day")."\";");
$day_events = $day_birthdays = "";

		}
eval("\$day_bits[$weekday_month] .= \"".$templates->get("calendar_weekview_day")."\";");
$day_events = $day_birthdays = "";

		$weekday_date = gmmktime(0, 0, 0, $weekday_month, $weekday_day+1, $weekday_year);

		$weekday_date = adodb_gmmktime(0, 0, 0, $weekday_month, $weekday_day+1, $weekday_year);

	}

// Now we build our month headers

	}

// Now we build our month headers

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

// Incoming year?

	$plugins->run_hooks("calendar_main_view");

// Incoming year?

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

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


	{

	{

		$year = $mybb->input['year'];

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

	}
else
{

	}
else
{

Zeile 2310Zeile 2310

$weekdays = fetch_weekday_structure($calendar['startofweek']);



$weekdays = fetch_weekday_structure($calendar['startofweek']);


	$month_start_weekday = gmdate("w", gmmktime(0, 0, 0, $month, $calendar['startofweek']+1, $year));

	$month_start_weekday = gmdate("w", adodb_gmmktime(0, 0, 0, $month, $calendar['startofweek']+1, $year));





	$prev_month_days = gmdate("t", gmmktime(0, 0, 0, $prev_month['month'], 1, $prev_month['year']));

	$prev_month_days = gmdate("t", adodb_gmmktime(0, 0, 0, $prev_month['month'], 1, $prev_month['year']));


// This is if we have days in the previous month to show
if($month_start_weekday != $weekdays[0] || $calendar['startofweek'] != 0)
{


// This is if we have days in the previous month to show
if($month_start_weekday != $weekdays[0] || $calendar['startofweek'] != 0)
{

		$prev_days = $day = gmdate("t", gmmktime(0, 0, 0, $prev_month['month'], 1, $prev_month['year']));

		$prev_days = $day = gmdate("t", adodb_gmmktime(0, 0, 0, $prev_month['month'], 1, $prev_month['year']));

		$day -= array_search(($month_start_weekday), $weekdays);
$day += $calendar['startofweek']+1;
if($day > $prev_month_days+1)

		$day -= array_search(($month_start_weekday), $weekdays);
$day += $calendar['startofweek']+1;
if($day > $prev_month_days+1)

Zeile 2336Zeile 2336
	}

// So now we fetch events for this month (nb, cache events for past month, current month and next month for mini calendars too)

	}

// So now we fetch events for this month (nb, cache events for past month, current month and next month for mini calendars too)

	$start_timestamp = gmmktime(0, 0, 0, $calendar_month, $day, $calendar_year);
$num_days = gmdate("t", gmmktime(0, 0, 0, $month, 1, $year));

	$start_timestamp = adodb_gmmktime(0, 0, 0, $calendar_month, $day, $calendar_year);
$num_days = gmdate("t", adodb_gmmktime(0, 0, 0, $month, 1, $year));





	$month_end_weekday = gmdate("w", gmmktime(0, 0, 0, $month, $num_days, $year));

	$month_end_weekday = gmdate("w", adodb_gmmktime(0, 0, 0, $month, $num_days, $year));

	$next_days = 6-$month_end_weekday+$calendar['startofweek'];

// More than a week? Go one week back

	$next_days = 6-$month_end_weekday+$calendar['startofweek'];

// More than a week? Go one week back

Zeile 2349Zeile 2349
	}
if($next_days > 0)
{

	}
if($next_days > 0)
{

		$end_timestamp = gmmktime(23, 59, 59, $next_month['month'], $next_days, $next_month['year']);

		$end_timestamp = adodb_gmmktime(23, 59, 59, $next_month['month'], $next_days, $next_month['year']);

	}
else
{
// We don't need days from the next month

	}
else
{
// We don't need days from the next month

		$end_timestamp = gmmktime(23, 59, 59, $month, $num_days, $year);

		$end_timestamp = adodb_gmmktime(23, 59, 59, $month, $num_days, $year);

	}

$events_cache = get_events($calendar, $start_timestamp, $end_timestamp, $calendar_permissions['canmoderateevents']);

	}

$events_cache = get_events($calendar, $start_timestamp, $end_timestamp, $calendar_permissions['canmoderateevents']);

Zeile 2410Zeile 2410

if($weekday_id == 0)
{


if($weekday_id == 0)
{

				$week_stamp = gmmktime(0, 0, 0, $calendar_month, $day, $calendar_year);

				$week_stamp = adodb_gmmktime(0, 0, 0, $calendar_month, $day, $calendar_year);

				$week_link = get_calendar_week_link($calendar['cid'], $week_stamp);
}


				$week_link = get_calendar_week_link($calendar['cid'], $week_stamp);
}