Vergleich modcp.php - 1.6.13 - 1.6.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 226Zeile 226

$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['threadlink'] = get_thread_link($report['tid']);


$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['threadlink'] = get_thread_link($report['tid']);

 


			$report['posterlink'] = get_profile_link($report['postuid']);

			$report['posterlink'] = get_profile_link($report['postuid']);

 
			if(!$report['postuid'])
{
$report['posterlink'] = $report['postlink'];
$report['postusername'] = $lang->guest;
}


			$report['reporterlink'] = get_profile_link($report['uid']);

			$report['reporterlink'] = get_profile_link($report['uid']);

 
			if($report['uid'] > 0 && !$report['username'])
{
$report['reporterlink'] = $report['postlink'];
$report['username'] = $lang->na_deleted;
}


			$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

			$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

Zeile 335Zeile 348
			$report['posterlink'] = get_profile_link($report['postuid']);
$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['postusername'] = build_profile_link($report['postusername'], $report['postuid']);

			$report['posterlink'] = get_profile_link($report['postuid']);
$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['postusername'] = build_profile_link($report['postusername'], $report['postuid']);

 


			$report['reporterlink'] = get_profile_link($report['uid']);

			$report['reporterlink'] = get_profile_link($report['uid']);

 
			if($report['uid'] > 0 && !$report['username'])
{
$report['reporterlink'] = $report['postlink'];
$report['username'] = $lang->na_deleted;
}


$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);


$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);





			if($report['reportstatus'] == 0)
{
$trow = "trow_shaded";

			if($report['reportstatus'] == 0)
{
$trow = "trow_shaded";

			}


			}


			// No subject? Set it to N/A
if($report['threadsubject'] == '')
{
$report['threadsubject'] = $lang->na;

			// No subject? Set it to N/A
if($report['threadsubject'] == '')
{
$report['threadsubject'] = $lang->na;

			}

			}

			else
{
// Only parse bad words and sanitize subject if there is one...
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

			else
{
// Only parse bad words and sanitize subject if there is one...
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

			}

$report['threadsubject'] = "<a href=\"".get_thread_link($report['tid'])."\" target=\"_blank\">{$report['threadsubject']}</a>";


			}

$report['threadsubject'] = "<a href=\"".get_thread_link($report['tid'])."\" target=\"_blank\">{$report['threadsubject']}</a>";


			eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";");
}
}

			eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";");
}
}

Zeile 481Zeile 500
		$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
if($logitem['tsubject'])
{

		$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
if($logitem['tsubject'])
{

			$information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";

			$information = "<strong>{$lang->thread}:</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";

		}
if($logitem['fname'])
{

		}
if($logitem['fname'])
{

Zeile 492Zeile 511
			$information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";
}


			$information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";
}


		// Edited a user?

		// Edited a user or managed announcement?

		if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
{
$data = unserialize($logitem['data']);
if($data['uid'])
{
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));

		if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
{
$data = unserialize($logitem['data']);
if($data['uid'])
{
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));

 
			}
if($data['aid'])
{
$information = "<strong>{$lang->announcement}:</strong> <a href=\"".get_announcement_link($data['aid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['subject'])."</a>";

			}
}


			}
}


Zeile 508Zeile 531
	if(!$results)
{
eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");

	if(!$results)
{
eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");

	}

$plugins->run_hooks("modcp_modlogs_filter");

	}

$plugins->run_hooks("modcp_modlogs_filter");


// Fetch filter options
$sortbysel[$mybb->input['sortby']] = "selected=\"selected\"";


// Fetch filter options
$sortbysel[$mybb->input['sortby']] = "selected=\"selected\"";

Zeile 527Zeile 550
		if(!$user['username'])
{
$user['username'] = $lang->na_deleted;

		if(!$user['username'])
{
$user['username'] = $lang->na_deleted;

		}

		}


$selected = '';
if($mybb->input['uid'] == $user['uid'])


$selected = '';
if($mybb->input['uid'] == $user['uid'])

Zeile 538Zeile 561
	}

$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");

	}

$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");





	eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";");
output_page($modlogs);
}

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

	eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";");
output_page($modlogs);
}

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

{
verify_post_check($mybb->input['my_post_key']);

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

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

{
verify_post_check($mybb->input['my_post_key']);

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

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

	}

$plugins->run_hooks("modcp_do_delete_announcement");

$db->delete_query("announcements", "aid='{$aid}'");

	}

$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);
}

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

	$cache->update_forumsdisplay();

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

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

{

{

	$aid = intval($mybb->input['aid']);
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");

	$aid = intval($mybb->input['aid']);
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");





	$announcement = $db->fetch_array($query);

	$announcement = $db->fetch_array($query);

	$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);


	$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);


	if(!$announcement['aid'])
{
error($lang->error_invalid_announcement);
}

if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))

	if(!$announcement['aid'])
{
error($lang->error_invalid_announcement);
}

if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))

	{
error_no_permission();
}

$plugins->run_hooks("modcp_delete_announcement");


	{
error_no_permission();
}

$plugins->run_hooks("modcp_delete_announcement");


	eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";");
output_page($announcements);
}

	eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";");
output_page($announcements);
}





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

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

{
verify_post_check($mybb->input['my_post_key']);

$announcement_fid = intval($mybb->input['fid']);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}

if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;
}

if(!trim($mybb->input['message']))
{
$errors[] = $lang->error_missing_message;
}

if(!trim($mybb->input['fid']))
{
$errors[] = $lang->error_missing_forum;
}

$startdate = @explode(" ", $mybb->input['starttime_time']);
$startdate = @explode(":", $startdate[0]);
$enddate = @explode(" ", $mybb->input['endtime_time']);
$enddate = @explode(":", $enddate[0]);

if(stristr($mybb->input['starttime_time'], "pm"))
{
$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)
{
$startdate[0] = "00";
}
}


{
verify_post_check($mybb->input['my_post_key']);

$announcement_fid = intval($mybb->input['fid']);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}

if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;
}

if(!trim($mybb->input['message']))
{
$errors[] = $lang->error_missing_message;
}

if(!trim($mybb->input['fid']))
{
$errors[] = $lang->error_missing_forum;
}

$startdate = @explode(" ", $mybb->input['starttime_time']);
$startdate = @explode(":", $startdate[0]);
$enddate = @explode(" ", $mybb->input['endtime_time']);
$enddate = @explode(":", $enddate[0]);

if(stristr($mybb->input['starttime_time'], "pm"))
{
$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)
{
$startdate[0] = "00";
}
}


	if(stristr($mybb->input['endtime_time'], "pm"))
{
$enddate[0] = 12+$enddate[0];
if($enddate[0] >= 24)
{
$enddate[0] = "00";

	if(stristr($mybb->input['endtime_time'], "pm"))
{
$enddate[0] = 12+$enddate[0];
if($enddate[0] >= 24)
{
$enddate[0] = "00";

		}

		}

	}

$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');

	}

$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');

Zeile 650Zeile 674
	if(!checkdate(intval($mybb->input['starttime_month']), intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year'])) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

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

	}

	}


if($mybb->input['endtime_type'] == "2")
{


if($mybb->input['endtime_type'] == "2")
{

Zeile 679Zeile 703
	{
$insert_announcement = array(
'fid' => $announcement_fid,

	{
$insert_announcement = array(
'fid' => $announcement_fid,

			'uid' => $mybb->user['uid'],
'subject' => $db->escape_string($mybb->input['title']),
'message' => $db->escape_string($mybb->input['message']),

			'uid' => $mybb->user['uid'],
'subject' => $db->escape_string($mybb->input['title']),
'message' => $db->escape_string($mybb->input['message']),

			'startdate' => $startdate,
'enddate' => $enddate,
'allowhtml' => $db->escape_string($mybb->input['allowhtml']),
'allowmycode' => $db->escape_string($mybb->input['allowmycode']),
'allowsmilies' => $db->escape_string($mybb->input['allowsmilies']),
);

			'startdate' => $startdate,
'enddate' => $enddate,
'allowhtml' => $db->escape_string($mybb->input['allowhtml']),
'allowmycode' => $db->escape_string($mybb->input['allowmycode']),
'allowsmilies' => $db->escape_string($mybb->input['allowsmilies']),
);



 
		$aid = $db->insert_query("announcements", $insert_announcement);

		$aid = $db->insert_query("announcements", $insert_announcement);

 

log_moderator_action(array("aid" => $aid, "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_added);


$plugins->run_hooks("modcp_do_new_announcement_end");



$plugins->run_hooks("modcp_do_new_announcement_end");


Zeile 706Zeile 731
{
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
add_breadcrumb($lang->add_announcement, "modcp.php?action=new_announcements");

{
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
add_breadcrumb($lang->add_announcement, "modcp.php?action=new_announcements");





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

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

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

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





	// Deal with inline errors
if(is_array($errors))
{

	// Deal with inline errors
if(is_array($errors))
{

Zeile 730Zeile 755
		if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;

		if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;

		}


		}


		if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;

		if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;

Zeile 832Zeile 857
	}

if($mybb->input['allowsmilies'] || !isset($mybb->input['allowsmilies']))

	}

if($mybb->input['allowsmilies'] || !isset($mybb->input['allowsmilies']))

	{

	{

		$smilies_sel['yes'] = ' checked="checked"';

		$smilies_sel['yes'] = ' checked="checked"';

	}

	}

	else
{
$smilies_sel['no'] = ' checked="checked"';

	else
{
$smilies_sel['no'] = ' checked="checked"';

	}


	}


	if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type']))
{
$end_type_sel['infinite'] = ' checked="checked"';
}
else

	if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type']))
{
$end_type_sel['infinite'] = ' checked="checked"';
}
else

	{

	{

		$end_type_sel['finite'] = ' checked="checked"';
}


		$end_type_sel['finite'] = ' checked="checked"';
}


Zeile 870Zeile 895

// Check that it exists
if(!$announcement['aid'])


// Check that it exists
if(!$announcement['aid'])

	{

	{

		error($lang->error_invalid_announcement);
}


		error($lang->error_invalid_announcement);
}


Zeile 882Zeile 907

// Basic error checking
if(!trim($mybb->input['title']))


// Basic error checking
if(!trim($mybb->input['title']))

	{

	{

		$errors[] = $lang->error_missing_title;
}


		$errors[] = $lang->error_missing_title;
}


Zeile 969Zeile 994
		);

$db->update_query("announcements", $update_announcement, "aid='{$aid}'");

		);

$db->update_query("announcements", $update_announcement, "aid='{$aid}'");

 

log_moderator_action(array("aid" => $announcement['aid'], "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_edited);


$plugins->run_hooks("modcp_do_edit_announcement_end");



$plugins->run_hooks("modcp_do_edit_announcement_end");


Zeile 1032Zeile 1059
		$announcement['message'] = $mybb->input['message'];
$announcement['allowhtml'] = $mybb->input['allowhtml'];
$announcement['allowmycode'] = $mybb->input['allowmycode'];

		$announcement['message'] = $mybb->input['message'];
$announcement['allowhtml'] = $mybb->input['allowhtml'];
$announcement['allowmycode'] = $mybb->input['allowmycode'];

		$announcement['allowsmilies'] = $mybb->input['allowsmilies'];


		$announcement['allowsmilies'] = $mybb->input['allowsmilies'];


		$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
if(!in_array($mybb->input['starttime_month'], $months))
{

		$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
if(!in_array($mybb->input['starttime_month'], $months))
{

Zeile 1053Zeile 1080
		$enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']);
$endday = intval($mybb->input['endtime_day']);
$endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);

		$enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']);
$endday = intval($mybb->input['endtime_day']);
$endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);





		$errored = true;
}
else

		$errored = true;
}
else

Zeile 1078Zeile 1105
	for($i = 1; $i <= 31; ++$i)
{
if($startday == $i)

	for($i = 1; $i <= 31; ++$i)
{
if($startday == $i)

		{

		{

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

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

		}

		}


if($endday == $i)
{
$enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";


if($endday == $i)
{
$enddateday .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";

		}

		}

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

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

	}


	}


	$startmonthsel = $endmonthsel = array();
$startmonthsel[$startmonth] = "selected=\"selected\"";
$endmonthsel[$endmonth] = "selected=\"selected\"";

	$startmonthsel = $endmonthsel = array();
$startmonthsel[$startmonth] = "selected=\"selected\"";
$endmonthsel[$endmonth] = "selected=\"selected\"";

Zeile 1132Zeile 1159
	if($announcement['allowhtml'])
{
$html_sel['yes'] = ' checked="checked"';

	if($announcement['allowhtml'])
{
$html_sel['yes'] = ' checked="checked"';

	}
else
{

	}
else
{

		$html_sel['no'] = ' checked="checked"';
}

if($announcement['allowmycode'])
{
$mycode_sel['yes'] = ' checked="checked"';

		$html_sel['no'] = ' checked="checked"';
}

if($announcement['allowmycode'])
{
$mycode_sel['yes'] = ' checked="checked"';

	}

	}

	else
{
$mycode_sel['no'] = ' checked="checked"';

	else
{
$mycode_sel['no'] = ' checked="checked"';

Zeile 1159Zeile 1186
	if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0) || $makeshift_end == true)
{
$end_type_sel['infinite'] = ' checked="checked"';

	if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0) || $makeshift_end == true)
{
$end_type_sel['infinite'] = ' checked="checked"';

	}

	}

	else
{
$end_type_sel['finite'] = ' checked="checked"';

	else
{
$end_type_sel['finite'] = ' checked="checked"';

Zeile 1184Zeile 1211
	while($announcement = $db->fetch_array($query))
{
if($announcement['fid'] == -1)

	while($announcement = $db->fetch_array($query))
{
if($announcement['fid'] == -1)

		{

		{

			$global_announcements[$announcement['aid']] = $announcement;
continue;
}
$announcements[$announcement['fid']][$announcement['aid']] = $announcement;

			$global_announcements[$announcement['aid']] = $announcement;
continue;
}
$announcements[$announcement['fid']][$announcement['aid']] = $announcement;

	}

	}


if($mybb->usergroup['issupermod'] == 1)
{


if($mybb->usergroup['issupermod'] == 1)
{

Zeile 1207Zeile 1234
				{
$icon = "<img src=\"{$theme['imgdir']}/minion.gif\" alt=\"({$lang->active})\" title=\"{$lang->active_announcement}\" style=\"vertical-align: middle;\" /> ";
}

				{
$icon = "<img src=\"{$theme['imgdir']}/minion.gif\" alt=\"({$lang->active})\" title=\"{$lang->active_announcement}\" style=\"vertical-align: middle;\" /> ";
}





				$subject = htmlspecialchars_uni($announcement['subject']);

eval("\$announcements_global .= \"".$templates->get("modcp_announcements_announcement_global")."\";");

				$subject = htmlspecialchars_uni($announcement['subject']);

eval("\$announcements_global .= \"".$templates->get("modcp_announcements_announcement_global")."\";");

Zeile 1219Zeile 1246
			eval("\$announcements_global = \"".$templates->get("modcp_no_announcements_global")."\";");
}
eval("\$announcements_global = \"".$templates->get("modcp_announcements_global")."\";");

			eval("\$announcements_global = \"".$templates->get("modcp_no_announcements_global")."\";");
}
eval("\$announcements_global = \"".$templates->get("modcp_announcements_global")."\";");

	}

	}

	else
{
// Moderator is not super, so don't show global annnouncemnets
$announcements_global = '';

	else
{
// Moderator is not super, so don't show global annnouncemnets
$announcements_global = '';

	}


	}


	fetch_forum_announcements();

	fetch_forum_announcements();





	if(!$announcements_forum)
{
eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";");

	if(!$announcements_forum)
{
eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";");

	}

$plugins->run_hooks("modcp_announcements");


	}

$plugins->run_hooks("modcp_announcements");


	eval("\$announcements = \"".$templates->get("modcp_announcements")."\";");
output_page($announcements);
}

	eval("\$announcements = \"".$templates->get("modcp_announcements")."\";");
output_page($announcements);
}

Zeile 1434Zeile 1461
			output_page($threadqueue);
}
$type = 'threads';

			output_page($threadqueue);
}
$type = 'threads';

	}


	}


	if($mybb->input['type'] == "posts" || (!$mybb->input['type'] && !$threadqueue))
{
$forum_cache = $cache->read("forums");

	if($mybb->input['type'] == "posts" || (!$mybb->input['type'] && !$threadqueue))
{
$forum_cache = $cache->read("forums");

Zeile 1536Zeile 1563
			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$postqueue = \"".$templates->get("modcp_modqueue_posts")."\";");
output_page($postqueue);

			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$postqueue = \"".$templates->get("modcp_modqueue_posts")."\";");
output_page($postqueue);

		}

		}

	}

if($mybb->input['type'] == "attachments" || (!$mybb->input['type'] && !$postqueue && !$threadqueue))

	}

if($mybb->input['type'] == "attachments" || (!$mybb->input['type'] && !$postqueue && !$threadqueue))

Zeile 1637Zeile 1664
	if(!$threadqueue && !$postqueue && !$attachmentqueue)
{
add_breadcrumb($lang->mcp_nav_modqueue, "modcp.php?action=modqueue");

	if(!$threadqueue && !$postqueue && !$attachmentqueue)
{
add_breadcrumb($lang->mcp_nav_modqueue, "modcp.php?action=modqueue");





		$plugins->run_hooks("modcp_modqueue_end");

eval("\$queue = \"".$templates->get("modcp_modqueue_empty")."\";");

		$plugins->run_hooks("modcp_modqueue_end");

eval("\$queue = \"".$templates->get("modcp_modqueue_empty")."\";");

Zeile 1653Zeile 1680
	$user = get_user($mybb->input['uid']);
if(!$user['uid'])
{

	$user = get_user($mybb->input['uid']);
if(!$user['uid'])
{

		error($lang->invalid_user);

		error($lang->error_nomember);

	}

// Check if the current user has permission to edit this user

	}

// Check if the current user has permission to edit this user

Zeile 1789Zeile 1816
							$extra_user_updates[$option['update_length']] = 0;
}
elseif($suspend_length && $suspend_length != "-1")

							$extra_user_updates[$option['update_length']] = 0;
}
elseif($suspend_length && $suspend_length != "-1")

						{

						{

							// Temporary ban on action
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
}

							// Temporary ban on action
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;
}

Zeile 1814Zeile 1841
		// Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting
if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])

		// Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting
if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])

		{

		{

			$errors[] = $lang->suspendmoderate_error;
}

if(is_array($errors))
{
$mybb->input['action'] = "editprofile";

			$errors[] = $lang->suspendmoderate_error;
}

if(is_array($errors))
{
$mybb->input['action'] = "editprofile";

		}

		}

		else
{
$plugins->run_hooks("modcp_do_editprofile_update");

		else
{
$plugins->run_hooks("modcp_do_editprofile_update");

Zeile 1839Zeile 1866
}

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

}

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

{

{

	add_breadcrumb($lang->mcp_nav_editprofile, "modcp.php?action=editprofile");

$user = get_user($mybb->input['uid']);
if(!$user['uid'])
{

	add_breadcrumb($lang->mcp_nav_editprofile, "modcp.php?action=editprofile");

$user = get_user($mybb->input['uid']);
if(!$user['uid'])
{

		error($lang->invalid_user);

		error($lang->error_nomember);

	}

// Check if the current user has permission to edit this user

	}

// Check if the current user has permission to edit this user

Zeile 2645Zeile 2672

// Figure out if we need to display multiple pages.
if($mybb->input['page'] != "last")


// Figure out if we need to display multiple pages.
if($mybb->input['page'] != "last")

		{

		{

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


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


Zeile 3435Zeile 3462
		$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
if($logitem['tsubject'])
{

		$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
if($logitem['tsubject'])
{

			$information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";

			$information = "<strong>{$lang->thread}:</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";

		}
if($logitem['fname'])
{

		}
if($logitem['fname'])
{

Zeile 3446Zeile 3473
			$information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";
}


			$information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";
}


		// Edited a user?

		// Edited a user or managed announcement?

		if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
{
$data = unserialize($logitem['data']);
if($data['uid'])
{
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));

		if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
{
$data = unserialize($logitem['data']);
if($data['uid'])
{
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));

 
			}
if($data['aid'])
{
$information = "<strong>{$lang->announcement}:</strong> <a href=\"".get_announcement_link($data['aid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['subject'])."</a>";

			}
}


			}
}