Vergleich moderation.php - 1.2.3 - 1.2.14

  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: moderation.php 2475 2006-12-01 04:58:21Z Tikitiki $

 * $Id: moderation.php 3641 2008-02-09 16:51:41Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 81Zeile 81

if($fid)
{


if($fid)
{

	// Password protected forums ......... yhummmmy!
check_forum_password($fid, $forum['password']);

	// Check if this forum is password protected and we have a valid password
check_forum_password($forum['fid']);

}

if($mybb->user['uid'] != 0)

}

if($mybb->user['uid'] != 0)

Zeile 99Zeile 99
{
// Open or close a thread
case "openclosethread":

{
// Open or close a thread
case "openclosethread":

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


		if(is_moderator($fid, "canopenclosethreads") != "yes")

		if(is_moderator($fid, "canopenclosethreads") != "yes")

		{

		{

			error_no_permission();

			error_no_permission();

		}

$plugins->run_hooks("moderation_openclosethread");


		}

$plugins->run_hooks("moderation_openclosethread");


		if($thread['closed'] == "yes")

		if($thread['closed'] == "yes")

		{

		{

			$openclose = $lang->opened;
$redirect = $lang->redirect_openthread;
$moderation->open_threads($tid);

			$openclose = $lang->opened;
$redirect = $lang->redirect_openthread;
$moderation->open_threads($tid);

Zeile 117Zeile 120
			$openclose = $lang->closed;
$redirect = $lang->redirect_closethread;
$moderation->close_threads($tid);

			$openclose = $lang->closed;
$redirect = $lang->redirect_closethread;
$moderation->close_threads($tid);

		}

$lang->mod_process = sprintf($lang->mod_process, $openclose);


		}

$lang->mod_process = sprintf($lang->mod_process, $openclose);


		log_moderator_action($modlogdata, $lang->mod_process);

redirect("showthread.php?tid=$tid", $redirect);

		log_moderator_action($modlogdata, $lang->mod_process);

redirect("showthread.php?tid=$tid", $redirect);

Zeile 128Zeile 131

// Stick or unstick that post to the top bab!
case "stick";


// Stick or unstick that post to the top bab!
case "stick";

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


		if(is_moderator($fid, "canmanagethreads") != "yes")

		if(is_moderator($fid, "canmanagethreads") != "yes")

		{

		{

			error_no_permission();

			error_no_permission();

		}

		}


$plugins->run_hooks("moderation_stick");



$plugins->run_hooks("moderation_stick");


Zeile 142Zeile 148
			$moderation->unstick_threads($tid);
}
else

			$moderation->unstick_threads($tid);
}
else

		{

		{

			$stuckunstuck = $lang->stuck;
$redirect = $lang->redirect_stickthread;
$moderation->stick_threads($tid);

			$stuckunstuck = $lang->stuck;
$redirect = $lang->redirect_stickthread;
$moderation->stick_threads($tid);

Zeile 150Zeile 156

$lang->mod_process = sprintf($lang->mod_process, $stuckunstuck);



$lang->mod_process = sprintf($lang->mod_process, $stuckunstuck);


		log_moderator_action($modlogdata, $lang->mod_process);


		log_moderator_action($modlogdata, $lang->mod_process);


		redirect("showthread.php?tid=$tid", $redirect);
break;

// Remove redirects to a specific thread
case "removeredirects":

		redirect("showthread.php?tid=$tid", $redirect);
break;

// Remove redirects to a specific thread
case "removeredirects":

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


		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

Zeile 192Zeile 202

// Delete the actual thread here
case "do_deletethread":


// Delete the actual thread here
case "do_deletethread":

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


		if(is_moderator($fid, "candeleteposts") != "yes")
{
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid'])

		if(is_moderator($fid, "candeleteposts") != "yes")
{
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid'])

Zeile 208Zeile 222
		$thread['subject'] = $db->escape_string($thread['subject']);
$lang->thread_deleted = sprintf($lang->thread_deleted, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_deleted);

		$thread['subject'] = $db->escape_string($thread['subject']);
$lang->thread_deleted = sprintf($lang->thread_deleted, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_deleted);





		$moderation->delete_thread($tid);

		$moderation->delete_thread($tid);





		mark_reports($tid, "thread");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_threaddeleted);
break;

		mark_reports($tid, "thread");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_threaddeleted);
break;





	// Delete the poll from a thread confirmation page
case "deletepoll":
add_breadcrumb($lang->nav_deletepoll);

	// Delete the poll from a thread confirmation page
case "deletepoll":
add_breadcrumb($lang->nav_deletepoll);


if(is_moderator($fid, "candeleteposts") != "yes")
{
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid'])
{
error_no_permission();
}
}

$plugins->run_hooks("moderation_deletepoll");

$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'");
$poll = $db->fetch_array($query);


if(is_moderator($fid, "candeleteposts") != "yes")
{
if($permissions['candeletethreads'] != "yes" || $mybb->user['uid'] != $thread['uid'])
{
error_no_permission();
}
}

$plugins->run_hooks("moderation_deletepoll");

$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'");
$poll = $db->fetch_array($query);

		if(!$poll['pid'])
{
error($lang->error_invalidpoll);

		if(!$poll['pid'])
{
error($lang->error_invalidpoll);

Zeile 242Zeile 256

// Delete the actual poll here!
case "do_deletepoll":


// Delete the actual poll here!
case "do_deletepoll":

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


		if(!$mybb->input['delete'])
{
error($lang->redirect_pollnotdeleted);

		if(!$mybb->input['delete'])
{
error($lang->redirect_pollnotdeleted);

Zeile 252Zeile 269
			{
error_no_permission();
}

			{
error_no_permission();
}

		}

		}

		$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'");
$poll = $db->fetch_array($query);
if(!$poll['pid'])

		$query = $db->simple_select(TABLE_PREFIX."polls", "*", "tid='$tid'");
$poll = $db->fetch_array($query);
if(!$poll['pid'])

		{

		{

			error($lang->error_invalidpoll);
}

			error($lang->error_invalidpoll);
}





		$plugins->run_hooks("moderation_do_deletepoll");

		$plugins->run_hooks("moderation_do_deletepoll");





		$lang->poll_deleted = sprintf($lang->poll_deleted, $thread['subject']);
log_moderator_action($modlogdata, $lang->poll_deleted);

		$lang->poll_deleted = sprintf($lang->poll_deleted, $thread['subject']);
log_moderator_action($modlogdata, $lang->poll_deleted);





		$moderation->delete_poll($poll['pid']);

		$moderation->delete_poll($poll['pid']);





		redirect("showthread.php?tid=$tid", $lang->redirect_polldeleted);
break;

// Approve a thread
case "approvethread":

		redirect("showthread.php?tid=$tid", $lang->redirect_polldeleted);
break;

// Approve a thread
case "approvethread":

		if(is_moderator($fid, "canopenclosethreads") != "yes")
{




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

if(is_moderator($fid, "canopenclosethreads") != "yes")
{

			error_no_permission();
}
$query = $db->simple_select(TABLE_PREFIX."threads", "*", "tid='$tid'");
$thread = $db->fetch_array($query);


			error_no_permission();
}
$query = $db->simple_select(TABLE_PREFIX."threads", "*", "tid='$tid'");
$thread = $db->fetch_array($query);


		$plugins->run_hooks("moderation_approvethread");


		$plugins->run_hooks("moderation_approvethread");


		$lang->thread_approved = sprintf($lang->thread_approved, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_approved);


		$lang->thread_approved = sprintf($lang->thread_approved, $thread['subject']);
log_moderator_action($modlogdata, $lang->thread_approved);


Zeile 291Zeile 311

// Unapprove a thread
case "unapprovethread":


// Unapprove a thread
case "unapprovethread":

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


		if(is_moderator($fid, "canopenclosethreads") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "canopenclosethreads") != "yes")
{
error_no_permission();

Zeile 311Zeile 334
	// Delete selective posts in a thread
case "deleteposts":
add_breadcrumb($lang->nav_deleteposts);

	// Delete selective posts in a thread
case "deleteposts":
add_breadcrumb($lang->nav_deleteposts);

		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();
}
$posts = "";
$query = $db->query("
SELECT p.*, u.*

		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();
}
$posts = "";
$query = $db->query("
SELECT p.*, u.*

			FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
WHERE tid='$tid'

			FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (p.uid=u.uid)
WHERE tid='$tid'

			ORDER BY dateline ASC
");
$altbg = "trow1";
while($post = $db->fetch_array($query))
{
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $post['dateline']);

$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_smilies" => $forum['allowsmilies'],
"allow_imgcode" => $forum['allowimgcode']
);
if($post['smilieoff'] == "yes")
{
$parser_options['allow_smilies'] = "no";
}


			ORDER BY dateline ASC
");
$altbg = "trow1";
while($post = $db->fetch_array($query))
{
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $post['dateline']);

$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_smilies" => $forum['allowsmilies'],
"allow_imgcode" => $forum['allowimgcode']
);
if($post['smilieoff'] == "yes")
{
$parser_options['allow_smilies'] = "no";
}


			$message = $parser->parse_message($post['message'], $parser_options);
eval("\$posts .= \"".$templates->get("moderation_deleteposts_post")."\";");
$altbg = alt_trow();
}


			$message = $parser->parse_message($post['message'], $parser_options);
eval("\$posts .= \"".$templates->get("moderation_deleteposts_post")."\";");
$altbg = alt_trow();
}


		$plugins->run_hooks("moderation_deleteposts");


		$plugins->run_hooks("moderation_deleteposts");


		eval("\$deleteposts = \"".$templates->get("moderation_deleteposts")."\";");
output_page($deleteposts);
break;

// Lets delete those selected posts!
case "do_deleteposts":

		eval("\$deleteposts = \"".$templates->get("moderation_deleteposts")."\";");
output_page($deleteposts);
break;

// Lets delete those selected posts!
case "do_deleteposts":

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


		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();

Zeile 380Zeile 406
		{
$moderation->delete_thread($tid);
$url = "forumdisplay.php?fid=$fid";

		{
$moderation->delete_thread($tid);
$url = "forumdisplay.php?fid=$fid";

			mark_reports($plist, "posts");
}
else
{
update_thread_count($tid);

			mark_reports($plist, "posts");
}
else
{


			$url = "showthread.php?tid=$tid";
mark_reports($tid, "thread");
}
$lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount);
log_moderator_action($modlogdata, $lang->deleted_selective_posts);

			$url = "showthread.php?tid=$tid";
mark_reports($tid, "thread");
}
$lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount);
log_moderator_action($modlogdata, $lang->deleted_selective_posts);

		update_forum_count($fid);

 
		redirect($url, $lang->redirect_postsdeleted);
break;


		redirect($url, $lang->redirect_postsdeleted);
break;


Zeile 429Zeile 453
			$message = $parser->parse_message($post['message'], $parser_options);
eval("\$posts .= \"".$templates->get("moderation_mergeposts_post")."\";");
$altbg = alt_trow();

			$message = $parser->parse_message($post['message'], $parser_options);
eval("\$posts .= \"".$templates->get("moderation_mergeposts_post")."\";");
$altbg = alt_trow();

		}

		}


$plugins->run_hooks("moderation_mergeposts");

eval("\$mergeposts = \"".$templates->get("moderation_mergeposts")."\";");
output_page($mergeposts);
break;


$plugins->run_hooks("moderation_mergeposts");

eval("\$mergeposts = \"".$templates->get("moderation_mergeposts")."\";");
output_page($mergeposts);
break;





	// Lets merge those selected posts!
case "do_mergeposts":

	// Lets merge those selected posts!
case "do_mergeposts":

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


		if(is_moderator($fid, "canmanagethreads") != "yes")

		if(is_moderator($fid, "canmanagethreads") != "yes")

		{

		{

			error_no_permission();

			error_no_permission();

		}

		}


$plugins->run_hooks("moderation_do_mergeposts");

$mergepost = $mybb->input['mergepost'];
if(count($mergepost) <= 1)


$plugins->run_hooks("moderation_do_mergeposts");

$mergepost = $mybb->input['mergepost'];
if(count($mergepost) <= 1)

		{
error($lang->error_nomergeposts);
}

		{
error($lang->error_nomergeposts);
}


foreach($mergepost as $pid => $yes)
{


foreach($mergepost as $pid => $yes)
{

Zeile 466Zeile 493
	// Move a thread
case "move":
add_breadcrumb($lang->nav_move);

	// Move a thread
case "move":
add_breadcrumb($lang->nav_move);

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

$plugins->run_hooks("moderation_move");


		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

$plugins->run_hooks("moderation_move");


		$forumselect = build_forum_jump("", '', 1, '', 0, '', "moveto");
eval("\$movethread = \"".$templates->get("moderation_move")."\";");
output_page($movethread);

		$forumselect = build_forum_jump("", '', 1, '', 0, '', "moveto");
eval("\$movethread = \"".$templates->get("moderation_move")."\";");
output_page($movethread);

Zeile 480Zeile 507

// Lets get this thing moving!
case "do_move":


// Lets get this thing moving!
case "do_move":

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


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

if(is_moderator($fid, "canmanagethreads") != "yes")

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

if(is_moderator($fid, "canmanagethreads") != "yes")

		{
error_no_permission();
}

		{
error_no_permission();
}

		// Check if user has moderator permission to move to destination
if(is_moderator($moveto, "canmanagethreads") != "yes" && is_moderator($fid, "canmovetononmodforum") != "yes")
{

		// Check if user has moderator permission to move to destination
if(is_moderator($moveto, "canmanagethreads") != "yes" && is_moderator($fid, "canmovetononmodforum") != "yes")
{

Zeile 494Zeile 524
		}
$newperms = forum_permissions($moveto);
if($newperms['canview'] == "no" && is_moderator($fid, "canmovetononmodforum") != "yes")

		}
$newperms = forum_permissions($moveto);
if($newperms['canview'] == "no" && is_moderator($fid, "canmovetononmodforum") != "yes")

		{

		{

			error_no_permission();

			error_no_permission();

		}

		}


$query = $db->simple_select(TABLE_PREFIX."forums", "*", "fid='$moveto'");
$newforum = $db->fetch_array($query);
if($newforum['type'] != "f")


$query = $db->simple_select(TABLE_PREFIX."forums", "*", "fid='$moveto'");
$newforum = $db->fetch_array($query);
if($newforum['type'] != "f")

		{

		{

			error($lang->error_invalidforum);

			error($lang->error_invalidforum);

		}

		}

		if($method != "copy" && $thread['fid'] == $moveto)

		if($method != "copy" && $thread['fid'] == $moveto)

		{

		{

			error($lang->error_movetosameforum);

			error($lang->error_movetosameforum);

		}


		}


		$expire = 0;
if(intval($mybb->input['redirect_expire']) > 0)
{
$expire = time() + (intval($mybb->input['redirect_expire']) * 86400);

		$expire = 0;
if(intval($mybb->input['redirect_expire']) > 0)
{
$expire = time() + (intval($mybb->input['redirect_expire']) * 86400);

		}

$the_thread = $tid;


		}

$the_thread = $tid;


		$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);

		$newtid = $moderation->move_thread($tid, $moveto, $method, $expire);

 

$plugins->run_hooks("moderation_do_move");


switch($method)
{


switch($method)
{

Zeile 530Zeile 562
				log_moderator_action($modlogdata, $lang->thread_moved);
break;
}

				log_moderator_action($modlogdata, $lang->thread_moved);
break;
}





		redirect("showthread.php?tid=$newtid", $lang->redirect_threadmoved);
break;

// Thread notes editor
case "threadnotes":
add_breadcrumb($lang->nav_threadnotes);

		redirect("showthread.php?tid=$newtid", $lang->redirect_threadmoved);
break;

// Thread notes editor
case "threadnotes":
add_breadcrumb($lang->nav_threadnotes);

		if(is_moderator($fid, "canmanagethreads") != "yes")
{

		if(is_moderator($fid, "canmanagethreads") != "yes")
{

			error_no_permission();
}
$thread['notes'] = htmlspecialchars_uni($parser->parse_badwords($thread['notes']));

			error_no_permission();
}
$thread['notes'] = htmlspecialchars_uni($parser->parse_badwords($thread['notes']));

Zeile 587Zeile 619

// Update the thread notes!
case "do_threadnotes":


// Update the thread notes!
case "do_threadnotes":

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


		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

Zeile 618Zeile 653

// Admin options
$adminoptions = "";


// Admin options
$adminoptions = "";

		if($mybb->usergroup['cancp'] == "yes")

		if($mybb->usergroup['cancp'] == "yes" && $mybb->config['hide_admin_links'] != 1)

		{
eval("\$adminoptions = \"".$templates->get("moderation_getip_adminoptions")."\";");
}

eval("\$getip = \"".$templates->get("moderation_getip")."\";");
output_page($getip);

		{
eval("\$adminoptions = \"".$templates->get("moderation_getip_adminoptions")."\";");
}

eval("\$getip = \"".$templates->get("moderation_getip")."\";");
output_page($getip);

		break;


		break;


	// Merge threads
case "merge":
add_breadcrumb($lang->nav_merge);

	// Merge threads
case "merge":
add_breadcrumb($lang->nav_merge);

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

$plugins->run_hooks("moderation_merge");


		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

$plugins->run_hooks("moderation_merge");


		eval("\$merge = \"".$templates->get("moderation_merge")."\";");
output_page($merge);
break;

		eval("\$merge = \"".$templates->get("moderation_merge")."\";");
output_page($merge);
break;





	// Lets get those threads together baby! (Merge threads)
case "do_merge":

	// Lets get those threads together baby! (Merge threads)
case "do_merge":

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

$plugins->run_hooks("moderation_do_merge");




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

if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

$plugins->run_hooks("moderation_do_merge");


// get thread to merge's tid
$splitloc = explode(".php", $mybb->input['threadurl']);
$temp = explode("&", my_substr($splitloc[1], 1));


// get thread to merge's tid
$splitloc = explode(".php", $mybb->input['threadurl']);
$temp = explode("&", my_substr($splitloc[1], 1));

		for($i = 0; $i < count($temp); $i++)

		if(!empty($temp))

		{

		{

			$temp2 = explode("=", $temp[$i], 2);









			for($i = 0; $i < count($temp); $i++)
{
$temp2 = explode("=", $temp[$i], 2);
$parameters[$temp2[0]] = $temp2[1];
}
}
else
{
$temp2 = explode("=", $splitloc[1], 2);

			$parameters[$temp2[0]] = $temp2[1];
}

			$parameters[$temp2[0]] = $temp2[1];
}

 


		if($parameters['pid'] && !$parameters['tid'])

		if($parameters['pid'] && !$parameters['tid'])

		{

		{

			$query = $db->simple_select(TABLE_PREFIX."posts", "*", "pid='".intval($parameters['pid'])."'");
$post = $db->fetch_array($query);
$mergetid = $post['tid'];

			$query = $db->simple_select(TABLE_PREFIX."posts", "*", "pid='".intval($parameters['pid'])."'");
$post = $db->fetch_array($query);
$mergetid = $post['tid'];

Zeile 672Zeile 719
		$query = $db->simple_select(TABLE_PREFIX."threads", "*", "tid='".intval($mergetid)."'");
$mergethread = $db->fetch_array($query);
if(!$mergethread['tid'])

		$query = $db->simple_select(TABLE_PREFIX."threads", "*", "tid='".intval($mergetid)."'");
$mergethread = $db->fetch_array($query);
if(!$mergethread['tid'])

		{

		{

			error($lang->error_badmergeurl);
}
if($mergetid == $tid)

			error($lang->error_badmergeurl);
}
if($mergetid == $tid)

Zeile 750Zeile 797

// Lets break them up buddy! (Do the split)
case "do_split":


// Lets break them up buddy! (Do the split)
case "do_split":

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


		if(is_moderator($fid, "canmanagethreads") != "yes")

		if(is_moderator($fid, "canmanagethreads") != "yes")

		{

		{

			error_no_permission();

			error_no_permission();

		}

$plugins->run_hooks("moderation_do_split");

		}




if(!is_array($mybb->input['splitpost']))
{
error($lang->error_nosplitposts);


if(!is_array($mybb->input['splitpost']))
{
error($lang->error_nosplitposts);

		}

		}

		$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(*) AS totalposts", "tid='".intval($mybb->input['tid'])."'");
$count = $db->fetch_array($query);

		$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(*) AS totalposts", "tid='".intval($mybb->input['tid'])."'");
$count = $db->fetch_array($query);





		if($count['totalposts'] == count($mybb->input['splitpost']))

		if($count['totalposts'] == count($mybb->input['splitpost']))

		{

		{

			error($lang->error_cantsplitall);
}
if($mybb->input['moveto'])

			error($lang->error_cantsplitall);
}
if($mybb->input['moveto'])

Zeile 773Zeile 821
			$moveto = intval($mybb->input['moveto']);
}
else

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

		{

		{

			$moveto = $fid;

			$moveto = $fid;

		}

		}

		$query = $db->simple_select(TABLE_PREFIX."forums", "fid", "fid='$moveto'", array('limit' => 1));
if($db->num_rows($query) == 0)
{
error($lang->error_invalidforum);
}

		$query = $db->simple_select(TABLE_PREFIX."forums", "fid", "fid='$moveto'", array('limit' => 1));
if($db->num_rows($query) == 0)
{
error($lang->error_invalidforum);
}

 

$plugins->run_hooks("moderation_do_split");


// move the selected posts over
$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='$tid'");


// move the selected posts over
$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='$tid'");

Zeile 803Zeile 853
	// Delete Threads - Inline moderation
case "multideletethreads":
add_breadcrumb($lang->nav_multi_deletethreads);

	// Delete Threads - Inline moderation
case "multideletethreads":
add_breadcrumb($lang->nav_multi_deletethreads);

		if(is_moderator($fid, "candeleteposts") != "yes")

		if(is_moderator($fid, "candeleteposts") != "yes")

		{
error_no_permission();
}

		{
error_no_permission();
}

Zeile 814Zeile 864
		}
$inlineids = implode("|", $threads);
clearinline($fid, "forum");

		}
$inlineids = implode("|", $threads);
clearinline($fid, "forum");

 
		$plugins->run_hooks("moderation_multideletethreads");

		eval("\$multidelete = \"".$templates->get("moderation_inline_deletethreads")."\";");
output_page($multidelete);
break;

// Actually delete the threads - Inline moderation
case "do_multideletethreads":

		eval("\$multidelete = \"".$templates->get("moderation_inline_deletethreads")."\";");
output_page($multidelete);
break;

// Actually delete the threads - Inline moderation
case "do_multideletethreads":

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


		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();

Zeile 831Zeile 885
			$moderation->delete_thread($tid);
$tlist[] = $tid;
}

			$moderation->delete_thread($tid);
$tlist[] = $tid;
}

 
		$plugins->run_hooks("moderation_do_multideletethreads");

		log_moderator_action($modlogdata, $lang->multi_deleted_threads);
clearinline($fid, "forum");
mark_reports($tlist, "threads");

		log_moderator_action($modlogdata, $lang->multi_deleted_threads);
clearinline($fid, "forum");
mark_reports($tlist, "threads");

Zeile 839Zeile 894

// Open threads - Inline moderation
case "multiopenthreads":


// Open threads - Inline moderation
case "multiopenthreads":

		if(is_moderator($fid, "canopenclosethreads") != "yes")
{
error_no_permission();
}
$threads = getids($fid, "forum");
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);
}

$moderation->open_threads($threads);

log_moderator_action($modlogdata, $lang->multi_opened_threads);
clearinline($fid, "forum");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsopened);
break;

// Close threads - Inline moderation
case "multiclosethreads":
if(is_moderator($fid, "canmanagethreads") != "yes")
{

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

if(is_moderator($fid, "canopenclosethreads") != "yes")
{

















			error_no_permission();

			error_no_permission();

		}

		}

		$threads = getids($fid, "forum");
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);
}


		$threads = getids($fid, "forum");
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);
}


		$moderation->close_threads($threads);






		$moderation->open_threads($threads);

log_moderator_action($modlogdata, $lang->multi_opened_threads);
clearinline($fid, "forum");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsopened);
break;





 
	// Close threads - Inline moderation
case "multiclosethreads":
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}
$threads = getids($fid, "forum");
if(count($threads) < 1)
{
error($lang->error_inline_nothreadsselected);
}

$moderation->close_threads($threads);
$plugins->run_hooks("moderation_multiclosethreads");

		log_moderator_action($modlogdata, $lang->multi_closed_threads);
clearinline($fid, "forum");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsclosed);

		log_moderator_action($modlogdata, $lang->multi_closed_threads);
clearinline($fid, "forum");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsclosed);

Zeile 877Zeile 938

// Approve threads - Inline moderation
case "multiapprovethreads":


// Approve threads - Inline moderation
case "multiapprovethreads":

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


		if(is_moderator($fid, "canmanagethreads") != "yes")

		if(is_moderator($fid, "canmanagethreads") != "yes")

		{

		{

			error_no_permission();

			error_no_permission();

		}

		}

		$threads = getids($fid, "forum");
if(count($threads) < 1)
{

		$threads = getids($fid, "forum");
if(count($threads) < 1)
{

Zeile 888Zeile 952
		}

$moderation->approve_threads($threads, $fid);

		}

$moderation->approve_threads($threads, $fid);



		$plugins->run_hooks("moderation_multiapprovethreads");

		log_moderator_action($modlogdata, $lang->multi_approved_threads);

		log_moderator_action($modlogdata, $lang->multi_approved_threads);

		clearinline($fid, "forum");
$cache->updatestats();

		clearinline($fid, "forum");
$cache->updatestats();

		redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsapproved);
break;

		redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsapproved);
break;





	// Unapprove threads - Inline moderation
case "multiunapprovethreads":

	// Unapprove threads - Inline moderation
case "multiunapprovethreads":

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


		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

		}

		}

		$threads = getids($fid, "forum");
if(count($threads) < 1)
{

		$threads = getids($fid, "forum");
if(count($threads) < 1)
{

Zeile 908Zeile 975
		}

$moderation->unapprove_threads($threads, $fid);

		}

$moderation->unapprove_threads($threads, $fid);



		$plugins->run_hooks("moderation_multiunapprovethreads");

		log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
clearinline($fid, "forum");
$cache->updatestats();
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsunapproved);

		log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
clearinline($fid, "forum");
$cache->updatestats();
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsunapproved);

		break;

		break;


// Stick threads - Inline moderation
case "multistickthreads":


// Stick threads - Inline moderation
case "multistickthreads":

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


		if(is_moderator($fid, "canopenclosethreads") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "canopenclosethreads") != "yes")
{
error_no_permission();

Zeile 928Zeile 998
		}

$moderation->stick_threads($threads);

		}

$moderation->stick_threads($threads);



		$plugins->run_hooks("moderation_multistickthreads");

		log_moderator_action($modlogdata, $lang->multi_stuck_threads);
clearinline($fid, "forum");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsstuck);

		log_moderator_action($modlogdata, $lang->multi_stuck_threads);
clearinline($fid, "forum");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsstuck);

Zeile 936Zeile 1006

// Unstick threads - Inline moderaton
case "multiunstickthreads":


// Unstick threads - Inline moderaton
case "multiunstickthreads":

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


		if(is_moderator($fid, "canopenclosethreads") != "yes")

		if(is_moderator($fid, "canopenclosethreads") != "yes")

		{

		{

			error_no_permission();
}
$threads = getids($fid, "forum");

			error_no_permission();
}
$threads = getids($fid, "forum");

Zeile 947Zeile 1020
		}

$moderation->unstick_threads($threads);

		}

$moderation->unstick_threads($threads);



		$plugins->run_hooks("moderation_multiunstickthreads");

		log_moderator_action($modlogdata, $lang->multi_unstuck_threads);
clearinline($fid, "forum");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsunstuck);

		log_moderator_action($modlogdata, $lang->multi_unstuck_threads);
clearinline($fid, "forum");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsunstuck);

Zeile 969Zeile 1042
			error_no_permission();
}
$forumselect = build_forum_jump("", '', 1, '', 0, '', "moveto");

			error_no_permission();
}
$forumselect = build_forum_jump("", '', 1, '', 0, '', "moveto");

 

$plugins->run_hooks("moderation_multimovethreads");


		eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";");
output_page($movethread);
break;

// Actually move the threads in Inline moderation
case "do_multimovethreads":

		eval("\$movethread = \"".$templates->get("moderation_inline_movethreads")."\";");
output_page($movethread);
break;

// Actually move the threads in Inline moderation
case "do_multimovethreads":

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}




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

if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

		$moveto = intval($mybb->input['moveto']);
$threadlist = explode("|", $mybb->input['threads']);
foreach($threadlist as $tid)
{

		$moveto = intval($mybb->input['moveto']);
$threadlist = explode("|", $mybb->input['threads']);
foreach($threadlist as $tid)
{

			$tids[] = $tid;

			$tids[] = intval($tid);

		}
if(is_moderator($moveto, "canmanagethreads") != "yes" && is_moderator($fid, "canmovetononmodforum") != "yes")

		}
if(is_moderator($moveto, "canmanagethreads") != "yes" && is_moderator($fid, "canmovetononmodforum") != "yes")

		{
error_no_permission();
}

		{
error_no_permission();
}

		$newperms = forum_permissions($moveto);
if($newperms['canview'] == "no" && is_moderator($fid, "canmovetononmodforum") != "yes")
{
error_no_permission();

		$newperms = forum_permissions($moveto);
if($newperms['canview'] == "no" && is_moderator($fid, "canmovetononmodforum") != "yes")
{
error_no_permission();

		}

		}

		$query = $db->simple_select(TABLE_PREFIX."forums", "*", "fid='$moveto'");
$newforum = $db->fetch_array($query);
if($newforum['type'] != "f")

		$query = $db->simple_select(TABLE_PREFIX."forums", "*", "fid='$moveto'");
$newforum = $db->fetch_array($query);
if($newforum['type'] != "f")

Zeile 1001Zeile 1080
			error($lang->error_invalidforum);
}
if($thread['fid'] == $moveto)

			error($lang->error_invalidforum);
}
if($thread['fid'] == $moveto)

		{

		{

			error($lang->error_movetosameforum);

			error($lang->error_movetosameforum);

		}



		}

$moderation->move_threads($tids, $moveto);





		$moderation->move_threads($tids, $moveto);

		$plugins->run_hooks("moderation_do_multimovethreads");


log_moderator_action($modlogdata, $lang->multi_moved_threads);



log_moderator_action($modlogdata, $lang->multi_moved_threads);


Zeile 1015Zeile 1096
	// Delete posts - Inline moderation
case "multideleteposts":
add_breadcrumb($lang->nav_multi_deleteposts);

	// Delete posts - Inline moderation
case "multideleteposts":
add_breadcrumb($lang->nav_multi_deleteposts);

		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();
}
$posts = getids($tid, "thread");
if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected);
}

		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();
}
$posts = getids($tid, "thread");
if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected);
}

		$inlineids = implode("|", $posts);
//clearinline($pid, "post");
clearinline($tid, "thread");

		$inlineids = implode("|", $posts);
//clearinline($pid, "post");
clearinline($tid, "thread");



		$plugins->run_hooks("moderation_multideleteposts");

		eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";");
output_page($multidelete);
break;

// Actually delete the posts in inline moderation
case "do_multideleteposts":

		eval("\$multidelete = \"".$templates->get("moderation_inline_deleteposts")."\";");
output_page($multidelete);
break;

// Actually delete the posts in inline moderation
case "do_multideleteposts":

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


		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();

Zeile 1057Zeile 1141
		}
else
{

		}
else
{

			update_thread_count($tid);

 
			mark_reports($plist, "posts");
$url = "showthread.php?tid=$tid";
}

			mark_reports($plist, "posts");
$url = "showthread.php?tid=$tid";
}

 
		$plugins->run_hooks("moderation_do_multideleteposts");

		$lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount);
log_moderator_action($modlogdata, $lang->deleted_selective_posts);

		$lang->deleted_selective_posts = sprintf($lang->deleted_selective_posts, $deletecount);
log_moderator_action($modlogdata, $lang->deleted_selective_posts);

		update_forum_count($fid);

 
		redirect($url, $lang->redirect_postsdeleted);
break;

// Merge posts - Inline moderation
case "multimergeposts":
add_breadcrumb($lang->nav_multi_mergeposts);

		redirect($url, $lang->redirect_postsdeleted);
break;

// Merge posts - Inline moderation
case "multimergeposts":
add_breadcrumb($lang->nav_multi_mergeposts);

		if(is_moderator($fid, "candeleteposts") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

		}
$posts = getids($tid, "thread");
if(count($posts) < 1)

		}
$posts = getids($tid, "thread");
if(count($posts) < 1)

		{

		{

			error($lang->error_inline_nopostsselected);
}
$inlineids = implode("|", $posts);
clearinline($tid, "thread");

			error($lang->error_inline_nopostsselected);
}
$inlineids = implode("|", $posts);
clearinline($tid, "thread");



		$plugins->run_hooks("moderation_multimergeposts");

		eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";");
output_page($multimerge);
break;

// Actually merge the posts - Inline moderation
case "do_multimergeposts":

		eval("\$multimerge = \"".$templates->get("moderation_inline_mergeposts")."\";");
output_page($multimerge);
break;

// Actually merge the posts - Inline moderation
case "do_multimergeposts":

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}




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

if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

		$postlist = explode("|", $mybb->input['posts']);
foreach($postlist as $pid)
{

		$postlist = explode("|", $mybb->input['posts']);
foreach($postlist as $pid)
{

Zeile 1100Zeile 1186
		}

$moderation->merge_posts($plist, $tid, $mybb->input['sep']);

		}

$moderation->merge_posts($plist, $tid, $mybb->input['sep']);



		$plugins->run_hooks("moderation_do_multimergeposts");

		mark_reports($plist, "posts");
log_moderator_action($modlogdata, $lang->merged_selective_posts);
redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsmerged);

		mark_reports($plist, "posts");
log_moderator_action($modlogdata, $lang->merged_selective_posts);
redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsmerged);

Zeile 1146Zeile 1232
		}
$inlineids = implode("|", $posts);
clearinline($tid, "thread");

		}
$inlineids = implode("|", $posts);
clearinline($tid, "thread");

 
		$plugins->run_hooks("moderation_multisplitposts");

		$forumselect = build_forum_jump("", $fid, 1, '', 0, '', "moveto");
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";");
output_page($splitposts);

		$forumselect = build_forum_jump("", $fid, 1, '', 0, '', "moveto");
eval("\$splitposts = \"".$templates->get("moderation_inline_splitposts")."\";");
output_page($splitposts);

Zeile 1153Zeile 1240

// Actually split the posts - Inline moderation
case "do_multisplitposts":


// Actually split the posts - Inline moderation
case "do_multisplitposts":

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}




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

if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}

		$postlist = explode("|", $mybb->input['posts']);
foreach($postlist as $pid)
{

		$postlist = explode("|", $mybb->input['posts']);
foreach($postlist as $pid)
{

Zeile 1179Zeile 1269
		$newsubject = $mybb->input['newsubject'];

$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);

		$newsubject = $mybb->input['newsubject'];

$newtid = $moderation->split_posts($plist, $tid, $moveto, $newsubject);

 

$plugins->run_hooks("moderation_do_multisplitposts");


$pid_list = implode(', ', $plist);
$lang->split_selective_posts = sprintf($lang->split_selective_posts, $pid_list, $newtid);
log_moderator_action($modlogdata, $lang->split_selective_posts);


$pid_list = implode(', ', $plist);
$lang->split_selective_posts = sprintf($lang->split_selective_posts, $pid_list, $newtid);
log_moderator_action($modlogdata, $lang->split_selective_posts);





		redirect("showthread.php?tid=$newtid", $lang->redirect_threadsplit);
break;

		redirect("showthread.php?tid=$newtid", $lang->redirect_threadsplit);
break;





	// Approve posts - Inline moderation
case "multiapproveposts":

	// Approve posts - Inline moderation
case "multiapproveposts":

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}
$posts = getids($tid, "thread");
if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected);
}

$pids = array();
foreach($posts as $pid)




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

if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();
}
$posts = getids($tid, "thread");
if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected);
}

$pids = array();
foreach($posts as $pid)

		{
$pids[] = intval($pid);
}


		{
$pids[] = intval($pid);
}


		$moderation->approve_posts($pids, $tid, $fid);


		$moderation->approve_posts($pids);
$plugins->run_hooks("moderation_do_multiapproveposts");

		log_moderator_action($modlogdata, $lang->multi_approve_posts);
clearinline($tid, "thread");
redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsapproved);

		log_moderator_action($modlogdata, $lang->multi_approve_posts);
clearinline($tid, "thread");
redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsapproved);

Zeile 1214Zeile 1309

// Unapprove posts - Inline moderation
case "multiunapproveposts":


// Unapprove posts - Inline moderation
case "multiunapproveposts":

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


		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

		if(is_moderator($fid, "canmanagethreads") != "yes")
{
error_no_permission();

Zeile 1229Zeile 1327
			$pids[] = intval($pid);
}


			$pids[] = intval($pid);
}


		$moderation->unapprove_posts($pids, $tid, $fid);


		$moderation->unapprove_posts($pids);
$plugins->run_hooks("moderation_do_multiunapproveposts");

		log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
clearinline($tid, "thread");
redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsunapproved);

		log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
clearinline($tid, "thread");
redirect("showthread.php?tid=$tid", $lang->redirect_inline_postsunapproved);

Zeile 1238Zeile 1336

// Manage selected reported posts
case "do_reports":


// Manage selected reported posts
case "do_reports":

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


		if(is_moderator() != "yes")
{
error_no_permission();

		if(is_moderator() != "yes")
{
error_no_permission();

Zeile 1253Zeile 1354
		}
if($flist)
{

		}
if($flist)
{

			$flist = "AND fid IN (0$flist)";

			$flist = " AND fid IN (0$flist)";

		}
if(!is_array($mybb->input['reports']))
{

		}
if(!is_array($mybb->input['reports']))
{

Zeile 1270Zeile 1371

$sqlarray = array(
"reportstatus" => 1,


$sqlarray = array(
"reportstatus" => 1,

			);
$db->update_query(TABLE_PREFIX."reportedposts", $sqlarray, "rid IN ($rids)");

		);
$db->update_query(TABLE_PREFIX."reportedposts", $sqlarray, "rid IN ($rids){$flist}");

		$cache->updatereportedposts();
redirect("moderation.php?action=reports", $lang->redirect_reportsmarked);
break;

		$cache->updatereportedposts();
redirect("moderation.php?action=reports", $lang->redirect_reportsmarked);
break;

Zeile 1295Zeile 1396
		
if($mybb->input['rid'])
{

		
if($mybb->input['rid'])
{

			$query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(r.rid) AS count", "r.rid <= '".$mybb->input['rid']."'");

			$query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(r.rid) AS count", "r.rid <= '".intval($mybb->input['rid'])."'");

			$result = $db->fetch_field($query, "count");
if(($result % $perpage) == 0)
{

			$result = $db->fetch_field($query, "count");
if(($result % $perpage) == 0)
{

Zeile 1335Zeile 1436
		if($postcount > $perpage)
{
eval("\$reportspages = \"".$templates->get("moderation_reports_multipage")."\";");

		if($postcount > $perpage)
{
eval("\$reportspages = \"".$templates->get("moderation_reports_multipage")."\";");

		}


		}


		$query = $db->simple_select(TABLE_PREFIX."forums", "fid,name");
while($forum = $db->fetch_array($query))

		$query = $db->simple_select(TABLE_PREFIX."forums", "fid,name");
while($forum = $db->fetch_array($query))

		{

		{

			$forums[$forum['fid']] = $forum['name'];
}
$reports = '';

			$forums[$forum['fid']] = $forum['name'];
}
$reports = '';

Zeile 1357Zeile 1458
		while($report = $db->fetch_array($query))
{
$trow = alt_trow();

		while($report = $db->fetch_array($query))
{
$trow = alt_trow();

			$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']);

			$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
eval("\$reports .= \"".$templates->get("moderation_reports_report")."\";");

			$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
eval("\$reports .= \"".$templates->get("moderation_reports_report")."\";");

		}

		}

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

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

Zeile 1377Zeile 1478
		{
error_no_permission();
}

		{
error_no_permission();
}

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

		
// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];

		
// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];

		if($mybb->input['page'] != "last")

		if($mybb->input['page'] != "last")

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

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

Zeile 1423Zeile 1525
		{
$start = 0;
$page = 1;

		{
$start = 0;
$page = 1;

		}

		}

		$upper = $start+$perpage;

$multipage = multipage($postcount, $perpage, $page, "moderation.php?action=allreports");

		$upper = $start+$perpage;

$multipage = multipage($postcount, $perpage, $page, "moderation.php?action=allreports");

Zeile 1480Zeile 1582
		$tool = $custommod->tool_info(intval($mybb->input['action']));
if($tool !== false)
{

		$tool = $custommod->tool_info(intval($mybb->input['action']));
if($tool !== false)
{

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

$plugins->run_hooks("moderation_custommod");

			if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread')
{
$tids = getids($fid, "forum");

			if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread')
{
$tids = getids($fid, "forum");

 
				if(count($tids) < 1)
{
error($lang->error_inline_nothreadsselected);
}

				$custommod->execute(intval($mybb->input['action']), $tids);
$lang->custom_tool = sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
clearinline($fid, "forum");
$lang->redirect_customtool_forum = sprintf($lang->redirect_customtool_forum, $tool['name']);
redirect("forumdisplay.php?fid=$fid", $lang->redirect_customtool_forum);

				$custommod->execute(intval($mybb->input['action']), $tids);
$lang->custom_tool = sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
clearinline($fid, "forum");
$lang->redirect_customtool_forum = sprintf($lang->redirect_customtool_forum, $tool['name']);
redirect("forumdisplay.php?fid=$fid", $lang->redirect_customtool_forum);

				break;

				break;

			}
elseif($tool['type'] == 't' && $mybb->input['modtype'] == 'thread')

			}
elseif($tool['type'] == 't' && $mybb->input['modtype'] == 'thread')

			{

			{

				$ret = $custommod->execute(intval($mybb->input['action']), $tid);
$lang->custom_tool = sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($ret == 'forum')

				$ret = $custommod->execute(intval($mybb->input['action']), $tid);
$lang->custom_tool = sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($ret == 'forum')

				{

				{

					$lang->redirect_customtool_forum = sprintf($lang->redirect_customtool_forum, $tool['name']);
redirect("forumdisplay.php?fid=$fid", $lang->redirect_customtool_forum);

					$lang->redirect_customtool_forum = sprintf($lang->redirect_customtool_forum, $tool['name']);
redirect("forumdisplay.php?fid=$fid", $lang->redirect_customtool_forum);

				}

				}

				else
{
$lang->redirect_customtool_thread = sprintf($lang->redirect_customtool_thread, $tool['name']);
redirect("showthread.php?tid=$tid", $lang->redirect_customtool_thread);

				else
{
$lang->redirect_customtool_thread = sprintf($lang->redirect_customtool_thread, $tool['name']);
redirect("showthread.php?tid=$tid", $lang->redirect_customtool_thread);

				}

				}

				break;
}
elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost')
{
$pids = getids($tid, "thread");

				break;
}
elseif($tool['type'] == 'p' && $mybb->input['modtype'] == 'inlinepost')
{
$pids = getids($tid, "thread");

 
				if(count($pids) < 1)
{
error($lang->error_inline_nopostsselected);
}

				$ret = $custommod->execute(intval($mybb->input['action']), $tid, $pids);
$lang->custom_tool = sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);

				$ret = $custommod->execute(intval($mybb->input['action']), $tid, $pids);
$lang->custom_tool = sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);