Vergleich calendar.php - 1.2.3 - 1.2.13

  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 2529 2006-12-17 19:01:37Z 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']);



/* 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 172Zeile 174
	if($event['username'])
{
$eventposter = "<a href=\"member.php?action=profile&amp;uid=$event[author]\">".format_name($event['username'], $event['usergroup'], $event['displaygroup']) . "</a>";

	if($event['username'])
{
$eventposter = "<a href=\"member.php?action=profile&amp;uid=$event[author]\">".format_name($event['username'], $event['usergroup'], $event['displaygroup']) . "</a>";

	}
else

	}
else

	{
$eventposter = $lang->guest;
}

	{
$eventposter = $lang->guest;
}

Zeile 296Zeile 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.

	$plugins->run_hooks("calendar_do_addevent_start");

// Set up eventhandler.

Zeile 362Zeile 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\"";





	$dayopts = '';

//Construct option list for days
for($i = 1; $i <= 31; $i++)
{
if($i == $day)

	$dayopts = '';

//Construct option list for days
for($i = 1; $i <= 31; $i++)
{
if($i == $day)

		{

		{

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

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

		}

		}

		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
{
if($mybb->usergroup['canaddpublicevents'] == "no")

	else
{
if($mybb->usergroup['canaddpublicevents'] == "no")

Zeile 413Zeile 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}'");
$event = $db->fetch_array($query);

if(!is_numeric($event['author']))

	$plugins->run_hooks("calendar_do_editevent_start");

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

if(!is_numeric($event['author']))

	{

	{

		error($lang->error_invalidevent);
}
elseif(($event['author'] != $mybb->user['uid'] || $mybb->user['uid'] == 0) && $mybb->usergroup['cancp'] != "yes")

		error($lang->error_invalidevent);
}
elseif(($event['author'] != $mybb->user['uid'] || $mybb->user['uid'] == 0) && $mybb->usergroup['cancp'] != "yes")

Zeile 434Zeile 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

	}
else

	{
// Set up eventhandler.
require_once MYBB_ROOT."inc/datahandlers/event.php";

	{
// Set up eventhandler.
require_once MYBB_ROOT."inc/datahandlers/event.php";

Zeile 566Zeile 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 619Zeile 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)
{