Vergleich calendar.php - 1.2.5 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html
*

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

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

 * $Id: calendar.php 3596 2008-01-20 08:27:39Z 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']);


$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. */

if($mybb->input['action'] == "event")

if($mybb->input['action'] == "event" || $mybb->input['action'] == "editevent" || $mybb->input['action'] == "do_editevent")

{
$options = array(
"limit" => 1

{
$options = array(
"limit" => 1

Zeile 72Zeile 73
	}
// Then the month
if($mybb->input['month'] >=1 && $mybb->input['month'] <= 12)

	}
// Then the month
if($mybb->input['month'] >=1 && $mybb->input['month'] <= 12)

	{

	{

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

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

Zeile 104Zeile 105
		else
{
$day = my_date("j");

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

		}
}
}

		}
}
}


$monthnames = array(
"offset",


$monthnames = array(
"offset",

Zeile 238Zeile 239
			$alterbg = $theme['trow1'];
}
$comma = ", ";

			$alterbg = $theme['trow1'];
}
$comma = ", ";

	}

	}

	$events = '';
// Load Events
$query = $db->query("

	$events = '';
// Load Events
$query = $db->query("

Zeile 287Zeile 288
		eval("\$bdaylist = \"".$templates->get("calendar_dayview_birthdays")."\";");
}
add_breadcrumb($lang->nav_dayview);

		eval("\$bdaylist = \"".$templates->get("calendar_dayview_birthdays")."\";");
}
add_breadcrumb($lang->nav_dayview);





	$plugins->run_hooks("calendar_dayview_end");

eval("\$dayview = \"".$templates->get("calendar_dayview")."\";");

	$plugins->run_hooks("calendar_dayview_end");

eval("\$dayview = \"".$templates->get("calendar_dayview")."\";");

Zeile 297Zeile 298
// Process the adding of an event.
if($mybb->input['action'] == "do_addevent" && $mybb->request_method == "post")
{

// Process the adding of an event.
if($mybb->input['action'] == "do_addevent" && $mybb->request_method == "post")
{

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("calendar_do_addevent_start");

// Set up eventhandler.
require_once MYBB_ROOT."inc/datahandler.php";
require_once MYBB_ROOT."inc/datahandlers/event.php";
$eventhandler = new EventDataHandler("insert");

	$plugins->run_hooks("calendar_do_addevent_start");

// Set up eventhandler.
require_once MYBB_ROOT."inc/datahandler.php";
require_once MYBB_ROOT."inc/datahandlers/event.php";
$eventhandler = new EventDataHandler("insert");





	// Prepare an array for the eventhandler.
$event = array(
"subject" => $mybb->input['subject'],

	// Prepare an array for the eventhandler.
$event = array(
"subject" => $mybb->input['subject'],

Zeile 325Zeile 329
		$mybb->input['action'] = "addevent";
}
else

		$mybb->input['action'] = "addevent";
}
else

	{

	{

		$details = $eventhandler->insert_event();
$plugins->run_hooks("calendar_do_addevent_end");
redirect("calendar.php?action=event&eid=".$details['eid'], $lang->redirect_eventadded);
}
}

		$details = $eventhandler->insert_event();
$plugins->run_hooks("calendar_do_addevent_end");
redirect("calendar.php?action=event&eid=".$details['eid'], $lang->redirect_eventadded);
}
}







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

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

Zeile 355Zeile 359
		$subject = htmlspecialchars_uni($mybb->input['subject']);
}
if(isset($mybb->input['description']))

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

	{

	{

		$description = htmlspecialchars_uni($mybb->input['description']);
}


		$description = htmlspecialchars_uni($mybb->input['description']);
}


Zeile 363Zeile 367
	for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)
{
if($i == $year)

	for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)
{
if($i == $year)

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

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

	}
$msel[$month] = " selected=\"selected\"";


	}
$msel[$month] = " selected=\"selected\"";


Zeile 385Zeile 389
		else
{
$dayopts .= "<option value=\"$i\">$i</option>\n";

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

		}
}

		}
}


if($mybb->input['type'] == 'private' || $mybb->input['private'] == 'yes')
{
$privatecheck = " checked=\"checked\"";
if($mybb->usergroup['canaddprivateevents'] == "no")


if($mybb->input['type'] == 'private' || $mybb->input['private'] == 'yes')
{
$privatecheck = " checked=\"checked\"";
if($mybb->usergroup['canaddprivateevents'] == "no")

		{
error_no_permission();
}

		{
error_no_permission();
}

	}
else
{

	}
else
{

Zeile 402Zeile 406
		{
error_no_permission();
}

		{
error_no_permission();
}

	}

	}

	add_breadcrumb($lang->nav_addevent);

$plugins->run_hooks("calendar_addevent_end");

	add_breadcrumb($lang->nav_addevent);

$plugins->run_hooks("calendar_addevent_end");

Zeile 414Zeile 418
// Process the editing of an event.
if($mybb->input['action'] == "do_editevent" && $mybb->request_method == "post")
{

// Process the editing of an event.
if($mybb->input['action'] == "do_editevent" && $mybb->request_method == "post")
{

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("calendar_do_editevent_start");

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

	$plugins->run_hooks("calendar_do_editevent_start");

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

Zeile 427Zeile 434
	{
error_no_permission();
}

	{
error_no_permission();
}





	// Are we going to delete this event or just edit it?
if($mybb->input['delete'] == "yes")
{

	// Are we going to delete this event or just edit it?
if($mybb->input['delete'] == "yes")
{

Zeile 435Zeile 442

// Redirect back to the main calendar view.
redirect("calendar.php", $lang->redirect_eventdeleted);


// Redirect back to the main calendar view.
redirect("calendar.php", $lang->redirect_eventdeleted);

	}

	}

	else
{
// Set up eventhandler.

	else
{
// Set up eventhandler.

Zeile 567Zeile 574
	$plugins->run_hooks("calendar_start");

$time = mktime(0, 0, 0, $month, 1, $year);

	$plugins->run_hooks("calendar_start");

$time = mktime(0, 0, 0, $month, 1, $year);

	$days = date("t", $time);

	$days = my_date("t", $time);

	$bdays = array();

// Load Birthdays

	$bdays = array();

// Load Birthdays

Zeile 620Zeile 627
	}
$daybits = "<tr>\n";
$count = 0;

	}
$daybits = "<tr>\n";
$count = 0;

	$sblanks = date("w", $time);

	$sblanks = my_date("w", $time);

	// Blank space before first day
if($sblanks)
{

	// Blank space before first day
if($sblanks)
{