Vergleich modcp.php - 1.8.9 - 1.8.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 946Zeile 946
				eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";");
}
}

				eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";");
}
}

 

$plugins->run_hooks("modcp_modlogs_result");


eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";");
}


eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";");
}

Zeile 994Zeile 996
}

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

}

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

{
verify_post_check($mybb->get_input('my_post_key'));

if($mybb->usergroup['canmanageannounce'] == 0)
{
error_no_permission();
}

$aid = $mybb->get_input('aid');
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
$announcement = $db->fetch_array($query);

if(!$announcement)
{
error($lang->error_invalid_announcement);
}
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}


{
verify_post_check($mybb->get_input('my_post_key'));

if($mybb->usergroup['canmanageannounce'] == 0)
{
error_no_permission();
}

$aid = $mybb->get_input('aid');
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
$announcement = $db->fetch_array($query);

if(!$announcement)
{
error($lang->error_invalid_announcement);
}
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}


	$plugins->run_hooks("modcp_do_delete_announcement");

$db->delete_query("announcements", "aid='{$aid}'");
log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);
$cache->update_forumsdisplay();

	$plugins->run_hooks("modcp_do_delete_announcement");

$db->delete_query("announcements", "aid='{$aid}'");
log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);
$cache->update_forumsdisplay();





	redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);
}


	redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);
}


Zeile 1032Zeile 1034
	}

$aid = $mybb->get_input('aid');

	}

$aid = $mybb->get_input('aid');

	$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");


	$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");


	$announcement = $db->fetch_array($query);
$announcement['subject'] = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));


	$announcement = $db->fetch_array($query);
$announcement['subject'] = htmlspecialchars_uni($parser->parse_badwords($announcement['subject']));


Zeile 1098Zeile 1100
	{
$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)

	{
$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)

		{

		{

			$startdate[0] = "00";

			$startdate[0] = "00";

		}
}

		}
}


if(stristr($mybb->input['endtime_time'], "pm"))


if(stristr($mybb->input['endtime_time'], "pm"))

	{

	{

		$enddate[0] = 12+$enddate[0];
if($enddate[0] >= 24)
{

		$enddate[0] = 12+$enddate[0];
if($enddate[0] >= 24)
{

Zeile 1119Zeile 1121
		$mybb->input['starttime_month'] = '01';
}


		$mybb->input['starttime_month'] = '01';
}


	$localized_time_offset = $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

	$localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;





	$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) -$localized_time_offset;

	$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset;

	if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

Zeile 1261Zeile 1263
	}
else
{

	}
else
{

		$localized_time = TIME_NOW + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

		$localized_time = TIME_NOW + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;


$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time);
$endtime_time = gmdate($mybb->settings['timeformat'], $localized_time);


$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time);
$endtime_time = gmdate($mybb->settings['timeformat'], $localized_time);

Zeile 1492Zeile 1494
		$mybb->input['starttime_month'] = '01';
}


		$mybb->input['starttime_month'] = '01';
}


	$localized_time_offset = TIME_NOW + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

	$localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;


$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset;
if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)


$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset;
if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)

Zeile 1666Zeile 1668
	}
else
{

	}
else
{

		$localized_time_startdate = $announcement['startdate'] + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
$localized_time_enddate = $announcement['enddate'] + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

		$localized_time_startdate = $announcement['startdate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
$localized_time_enddate = $announcement['enddate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;


$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time_startdate);
$endtime_time = gmdate($mybb->settings['timeformat'], $localized_time_enddate);


$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time_startdate);
$endtime_time = gmdate($mybb->settings['timeformat'], $localized_time_enddate);

Zeile 2830Zeile 2832
		}
$returndatesel = $selected = '';
for($day = 1; $day <= 31; ++$day)

		}
$returndatesel = $selected = '';
for($day = 1; $day <= 31; ++$day)

		{

		{

			if($returndate[0] == $day)

			if($returndate[0] == $day)

			{

			{

				$selected = "selected=\"selected\"";
}
else
{
$selected = '';

				$selected = "selected=\"selected\"";
}
else
{
$selected = '';

			}


			}


			eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");
}

$returndatemonthsel = array();
foreach(range(1, 12) as $month)

			eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");
}

$returndatemonthsel = array();
foreach(range(1, 12) as $month)

		{

		{

			$returndatemonthsel[$month] = '';

			$returndatemonthsel[$month] = '';

		}

		}

		if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

		if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

		}


		}


		if(!isset($returndate[2]))
{
$returndate[2] = '';

		if(!isset($returndate[2]))
{
$returndate[2] = '';

Zeile 2866Zeile 2868
	// Fetch profile fields
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
$user_fields = $db->fetch_array($query);

	// Fetch profile fields
$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");
$user_fields = $db->fetch_array($query);





	$requiredfields = '';
$customfields = '';
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);

	$requiredfields = '';
$customfields = '';
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);

Zeile 2877Zeile 2879
	{
foreach($pfcache as $profilefield)
{

	{
foreach($pfcache as $profilefield)
{

			$userfield = $code = $select = $val = $options = $expoptions = $useropts = $seloptions = '';


			$userfield = $code = $select = $val = $options = $expoptions = $useropts = '';
$seloptions = array();

			$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);

			$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);

Zeile 2889Zeile 2892
			}
$field = "fid{$profilefield['fid']}";
if($errors)

			}
$field = "fid{$profilefield['fid']}";
if($errors)

			{

			{

				if(isset($mybb->input['profile_fields'][$field]))
{
$userfield = $mybb->input['profile_fields'][$field];

				if(isset($mybb->input['profile_fields'][$field]))
{
$userfield = $mybb->input['profile_fields'][$field];

Zeile 3121Zeile 3124
		"months" => $lang->expire_months,
"never" => $lang->expire_permanent
);

		"months" => $lang->expire_months,
"never" => $lang->expire_permanent
);





	$suspendsignature_info = $moderateposts_info = $suspendposting_info = '';
$action_options = $modpost_options = $suspost_options = '';
foreach($moderator_options as $option)

	$suspendsignature_info = $moderateposts_info = $suspendposting_info = '';
$action_options = $modpost_options = $suspost_options = '';
foreach($moderator_options as $option)

Zeile 3293Zeile 3296
	$page_url = 'modcp.php?action=finduser';
foreach(array('username', 'sortby', 'order') as $field)
{

	$page_url = 'modcp.php?action=finduser';
foreach(array('username', 'sortby', 'order') as $field)
{

		$mybb->input[$field] = urlencode($mybb->get_input($field));

 
		if(!empty($mybb->input[$field]))
{
$page_url .= "&amp;{$field}=".$mybb->input[$field];

		if(!empty($mybb->input[$field]))
{
$page_url .= "&amp;{$field}=".$mybb->input[$field];

		}
}

$multipage = multipage($user_count, $perpage, $page, $page_url);


		}
}

$multipage = multipage($user_count, $perpage, $page, $page_url);


	$usergroups_cache = $cache->read("usergroups");

$plugins->run_hooks("modcp_finduser_start");

	$usergroups_cache = $cache->read("usergroups");

$plugins->run_hooks("modcp_finduser_start");

Zeile 4710Zeile 4712
					eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";");
}
}

					eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";");
}
}

 

$plugins->run_hooks("modcp_modlogs_result");


eval("\$modlogresults .= \"".$templates->get("modcp_modlogs_result")."\";");
}


eval("\$modlogresults .= \"".$templates->get("modcp_modlogs_result")."\";");
}