Vergleich calendar.php - 1.2.1 - 1.2.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: calendar.php 2251 2006-09-23 22:18:21Z Tikitiki $

 * $Id: calendar.php 3010 2007-04-13 22:47:49Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 41Zeile 41

// Make $eid an easy-to-use variable.
$eid = intval($mybb->input['eid']);


// Make $eid an easy-to-use variable.
$eid = intval($mybb->input['eid']);

 
$mybb->input['day'] = intval($mybb->input['day']);



/* If we are looking at an event, select the date for that event first. */



/* If we are looking at an event, select the date for that event first. */

Zeile 88Zeile 89
	}
else
{

	}
else
{

 
		

		// Make the day the last day of the month, if the user overshot the number of days in the month
if(isset($mybb->input['day']) && $mybb->input['day'] > $days)
{

		// Make the day the last day of the month, if the user overshot the number of days in the month
if(isset($mybb->input['day']) && $mybb->input['day'] > $days)
{

Zeile 124Zeile 126

// Make navigation
add_breadcrumb($lang->nav_calendar, "calendar.php");


// Make navigation
add_breadcrumb($lang->nav_calendar, "calendar.php");





if($month && $year)
{
add_breadcrumb("$monthnames[$month] $year", "calendar.php?month={$month}&year={$year}");

if($month && $year)
{
add_breadcrumb("$monthnames[$month] $year", "calendar.php?month={$month}&year={$year}");

Zeile 147Zeile 149
		FROM ".TABLE_PREFIX."events e
LEFT JOIN ".TABLE_PREFIX."users u ON (e.author=u.uid)
WHERE e.eid='$eid'

		FROM ".TABLE_PREFIX."events e
LEFT JOIN ".TABLE_PREFIX."users u ON (e.author=u.uid)
WHERE e.eid='$eid'

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

if(!$event['eid'])
{

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

if(!$event['eid'])
{

		error($lang->error_invalidevent);
}

if($event['private'] == "yes" && $event['username'] != $mybb->user['username'])
{
error_no_permission();

		error($lang->error_invalidevent);
}

if($event['private'] == "yes" && $event['username'] != $mybb->user['username'])
{
error_no_permission();

	}

	}


if(($event['author'] == $mybb->user['uid'] && $mybb->user['uid'] != 0) || $mybb->usergroup['cancp'] == "yes")
{


if(($event['author'] == $mybb->user['uid'] && $mybb->user['uid'] != 0) || $mybb->usergroup['cancp'] == "yes")
{

Zeile 178Zeile 180
	}
$eventdate = explode("-", $event['date']);
$eventdate = gmmktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);

	}
$eventdate = explode("-", $event['date']);
$eventdate = gmmktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);

	$eventdate = my_date($mybb->settings['dateformat'], $eventdate, "", 0);

	$eventdate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0);


add_breadcrumb($lang->nav_viewevent);

$plugins->run_hooks("calendar_event_end");


add_breadcrumb($lang->nav_viewevent);

$plugins->run_hooks("calendar_event_end");





	eval("\$eventpage = \"".$templates->get("calendar_event")."\";");
output_page($eventpage);
}

	eval("\$eventpage = \"".$templates->get("calendar_event")."\";");
output_page($eventpage);
}

Zeile 199Zeile 201
	{
$bday_where = "birthday LIKE '$day-$month-%' OR birthday LIKE '29-2%' OR birthday LIKE '$day-$month'";
$feb_fix = 1;

	{
$bday_where = "birthday LIKE '$day-$month-%' OR birthday LIKE '29-2%' OR birthday LIKE '$day-$month'";
$feb_fix = 1;

	}

	}

	else // Fetch only for this day
{
$bday_where = "birthday LIKE '$day-$month-%' OR birthday LIKE '$day-$month'";
$feb_fix = 0;
}

	else // Fetch only for this day
{
$bday_where = "birthday LIKE '$day-$month-%' OR birthday LIKE '$day-$month'";
$feb_fix = 0;
}

 


	$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, birthday, usergroup, displaygroup", $bday_where);

$alterbg = $theme['trow1'];

	$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, birthday, usergroup, displaygroup", $bday_where);

$alterbg = $theme['trow1'];

Zeile 213Zeile 216
	while($bdays = $db->fetch_array($query))
{
$bday = explode("-", $bdays['birthday']);

	while($bdays = $db->fetch_array($query))
{
$bday = explode("-", $bdays['birthday']);

 


		if($bday[2] && $bday[2] < $year)

		if($bday[2] && $bday[2] < $year)

		{

		{

			$age = $year - $bday[2];
$age = " ($age $lang->years_old)";
}

			$age = $year - $bday[2];
$age = " ($age $lang->years_old)";
}

Zeile 267Zeile 271
		}
$eventdate = explode("-", $event['date']);
$eventdate = gmmktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);

		}
$eventdate = explode("-", $event['date']);
$eventdate = gmmktime(0, 0, 0, $eventdate[1], $eventdate[0], $eventdate[2]);

		$eventdate = my_date($mybb->settings['dateformat'], $eventdate, "", 0);

		$eventdate = my_date($mybb->settings['dateformat'], $eventdate, 0, 0);

		eval("\$events .= \"".$templates->get("calendar_dayview_event")."\";");
}
if(!$events)

		eval("\$events .= \"".$templates->get("calendar_dayview_event")."\";");
}
if(!$events)

Zeile 334Zeile 338
{
$plugins->run_hooks("calendar_addevent_start");


{
$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.
if($mybb->settings['bbcodeinserter'] != "off" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
{
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();
}



// If MyCode is on for this forum and the MyCode editor is enabled inthe Admin CP, draw the code buttons and smilie inserter.
if($mybb->settings['bbcodeinserter'] != "off" && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
{
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();
}


	$yearopts = '';

// Previous selections

	$yearopts = '';

// Previous selections

Zeile 464Zeile 468
			$eventhandler->update_event();
$plugins->run_hooks("calendar_do_editevent_end");
redirect("calendar.php?action=event&eid=$eid", $lang->redirect_eventupdated);

			$eventhandler->update_event();
$plugins->run_hooks("calendar_do_editevent_end");
redirect("calendar.php?action=event&eid=$eid", $lang->redirect_eventupdated);

		}
}
}

		}
}
}


// Show the form for editing an event.
if($mybb->input['action'] == "editevent")


// Show the form for editing an event.
if($mybb->input['action'] == "editevent")

Zeile 482Zeile 486
	}

$eid = intval($mybb->input['eid']);

	}

$eid = intval($mybb->input['eid']);





	$query = $db->simple_select(TABLE_PREFIX."events", "*", "eid='{$eid}'");
$event = $db->fetch_array($query);


	$query = $db->simple_select(TABLE_PREFIX."events", "*", "eid='{$eid}'");
$event = $db->fetch_array($query);


Zeile 528Zeile 532
		if($i == $eventdate[2])
{
$yearopts .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";

		if($i == $eventdate[2])
{
$yearopts .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";

		}
else

		}
else

		{
$yearopts .= "<option value=\"$i\">$i</option>\n";
}

		{
$yearopts .= "<option value=\"$i\">$i</option>\n";
}

Zeile 537Zeile 541

$dayopts = '';
for($i = 1; $i <= 31; $i++)


$dayopts = '';
for($i = 1; $i <= 31; $i++)

	{

	{

		if($i == $eventdate[0])

		if($i == $eventdate[0])

		{

		{

			$dayopts .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
}
else
{
$dayopts .= "<option value=\"$i\">$i</option>\n";

			$dayopts .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
}
else
{
$dayopts .= "<option value=\"$i\">$i</option>\n";

		}

		}

	}

add_breadcrumb($lang->nav_editevent);

	}

add_breadcrumb($lang->nav_editevent);

Zeile 584Zeile 588
	{
$bday = explode("-", $user['birthday']);
if($feb_fix == 1 && $bday[0] == 29 && $bday[1] == 2)

	{
$bday = explode("-", $user['birthday']);
if($feb_fix == 1 && $bday[0] == 29 && $bday[1] == 2)

		{

		{

			$bdays[1]++;

			$bdays[1]++;

		}

		}

		else
{
$bdays[$bday[0]]++;
}
}

		else
{
$bdays[$bday[0]]++;
}
}

 


	$events = array();
// Load Events
$query = $db->simple_select(TABLE_PREFIX."events", "subject, private, date, eid", "date LIKE '%-{$month}-{$year}' AND ((author='{$mybb->user['uid']}' AND private='yes') OR (private!='yes'))");

	$events = array();
// Load Events
$query = $db->simple_select(TABLE_PREFIX."events", "subject, private, date, eid", "date LIKE '%-{$month}-{$year}' AND ((author='{$mybb->user['uid']}' AND private='yes') OR (private!='yes'))");