Vergleich moderation.php - 1.2.8 - 1.2.12

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

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

 * $Id: moderation.php 3167 2007-06-28 05:34:18Z chris $

 * $Id: moderation.php 3596 2008-01-20 08:27:39Z 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

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

		{
$url = "showthread.php?tid=$tid";
mark_reports($tid, "thread");

		{
$url = "showthread.php?tid=$tid";
mark_reports($tid, "thread");

Zeile 437Zeile 463

// 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();
}


Zeile 446Zeile 475

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


$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 464Zeile 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 478Zeile 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'];


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


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

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


Zeile 577Zeile 609
		if(!$modactions)
{
$modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>";

		if(!$modactions)
{
$modactions = "<tr><td class=\"trow1\" colspan=\"4\">$lang->no_mod_options</td></tr>";

		}


		}


		$plugins->run_hooks("moderation_threadnotes");

		$plugins->run_hooks("moderation_threadnotes");





		eval("\$threadnotes = \"".$templates->get("moderation_threadnotes")."\";");
output_page($threadnotes);
break;

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

		eval("\$threadnotes = \"".$templates->get("moderation_threadnotes")."\";");
output_page($threadnotes);
break;

// 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 621Zeile 656
		if($mybb->usergroup['cancp'] == "yes" && $mybb->config['hide_admin_links'] != 1)
{
eval("\$adminoptions = \"".$templates->get("moderation_getip_adminoptions")."\";");

		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);
break;


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





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

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

Zeile 639Zeile 674

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


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

		break;

		break;


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


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

 
		// 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();
}


Zeile 656Zeile 694
		if(!empty($temp))
{
for($i = 0; $i < count($temp); $i++)

		if(!empty($temp))
{
for($i = 0; $i < count($temp); $i++)

			{

			{

				$temp2 = explode("=", $temp[$i], 2);
$parameters[$temp2[0]] = $temp2[1];
}

				$temp2 = explode("=", $temp[$i], 2);
$parameters[$temp2[0]] = $temp2[1];
}

Zeile 689Zeile 727
			error($lang->error_mergewithself);
}
if(is_moderator($mergethread['fid'], "canmanagethreads") != "yes")

			error($lang->error_mergewithself);
}
if(is_moderator($mergethread['fid'], "canmanagethreads") != "yes")

		{
error_no_permission();

		{
error_no_permission();

		}
if($mybb->input['subject'])

		}
if($mybb->input['subject'])

		{

		{

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

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

		}

		}

		else
{
$subject = $thread['subject'];

		else
{
$subject = $thread['subject'];

Zeile 706Zeile 744
		log_moderator_action($modlogdata, $lang->thread_merged);

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

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

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

		break;


		break;


	// Divorce the posts in this thread (Split!)
case "split":
add_breadcrumb($lang->nav_split);

	// Divorce the posts in this thread (Split!)
case "split":
add_breadcrumb($lang->nav_split);

Zeile 724Zeile 762
		");
$numposts = $db->num_rows($query);
if($numposts <= "1")

		");
$numposts = $db->num_rows($query);
if($numposts <= "1")

		{

		{

			error($lang->error_cantsplitonepost);
}


			error($lang->error_cantsplitonepost);
}


Zeile 759Zeile 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")
{
error_no_permission();

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

Zeile 830Zeile 871

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


// 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")

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

		{

		{

			error_no_permission();

			error_no_permission();

		}

		}

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

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

Zeile 846Zeile 890
		clearinline($fid, "forum");
mark_reports($tlist, "threads");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsdeleted);

		clearinline($fid, "forum");
mark_reports($tlist, "threads");
redirect("forumdisplay.php?fid=$fid", $lang->redirect_inline_threadsdeleted);

		break;


		break;


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

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

 
		// 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 869Zeile 916

// Close threads - Inline moderation
case "multiclosethreads":


// Close threads - Inline moderation
case "multiclosethreads":

 
		// 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 882Zeile 932
		$moderation->close_threads($threads);
$plugins->run_hooks("moderation_multiclosethreads");
log_moderator_action($modlogdata, $lang->multi_closed_threads);

		$moderation->close_threads($threads);
$plugins->run_hooks("moderation_multiclosethreads");
log_moderator_action($modlogdata, $lang->multi_closed_threads);

		clearinline($fid, "forum");

		clearinline($fid, "forum");

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

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

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

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

 
		// 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 908Zeile 961

// 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")

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

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


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


		$moderation->unapprove_threads($threads, $fid);
$plugins->run_hooks("moderation_multiunapprovethreads");
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);

		$moderation->unapprove_threads($threads, $fid);
$plugins->run_hooks("moderation_multiunapprovethreads");
log_moderator_action($modlogdata, $lang->multi_unapproved_threads);

Zeile 928Zeile 984

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


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

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




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

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

			error($lang->error_inline_nothreadsselected);
}

			error($lang->error_inline_nothreadsselected);
}





		$moderation->stick_threads($threads);
$plugins->run_hooks("moderation_multistickthreads");
log_moderator_action($modlogdata, $lang->multi_stuck_threads);

		$moderation->stick_threads($threads);
$plugins->run_hooks("moderation_multistickthreads");
log_moderator_action($modlogdata, $lang->multi_stuck_threads);

Zeile 947Zeile 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")
{
error_no_permission();

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

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

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

		{
error($lang->error_inline_nothreadsselected);
}

		{
error($lang->error_inline_nothreadsselected);
}

Zeile 969Zeile 1031
		add_breadcrumb($lang->nav_multi_movethreads);
$threads = getids($fid, "forum");
if(count($threads) < 1)

		add_breadcrumb($lang->nav_multi_movethreads);
$threads = getids($fid, "forum");
if(count($threads) < 1)

		{

		{

			error($lang->error_inline_nothreadsselected);
}
$inlineids = implode("|", $threads);
clearinline($fid, "forum");

			error($lang->error_inline_nothreadsselected);
}
$inlineids = implode("|", $threads);
clearinline($fid, "forum");





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

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

Zeile 989Zeile 1051

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


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

			error_no_permission();
}
$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($thread['fid'] == $moveto)

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

		$plugins->run_hooks("moderation_do_multimovethreads");

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

Zeile 1031Zeile 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();

		if(is_moderator($fid, "candeleteposts") != "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);

		{
error($lang->error_inline_nopostsselected);

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

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

Zeile 1050Zeile 1115

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


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

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




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

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

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

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

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

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

		$plugins->run_hooks("moderation_do_multimergeposts");

		$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":

 
		// 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 1139Zeile 1210
		if($numposts <= "1")
{
error($lang->error_cantsplitonepost);

		if($numposts <= "1")
{
error($lang->error_cantsplitonepost);

		}
$posts = getids($tid, "thread");
if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected);
}

		}
$posts = getids($tid, "thread");
if(count($posts) < 1)
{
error($lang->error_inline_nopostsselected);
}

		$pidin = '';
$comma = '';
foreach($posts as $pid)

		$pidin = '';
$comma = '';
foreach($posts as $pid)

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

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

		$plugins->run_hooks("moderation_do_multisplitposts");

		$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 1169Zeile 1240

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


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

 
		// 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();

		}

		}

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

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

		{

		{

			$pid = intval($pid);
$plist[] = $pid;
}
if($mybb->input['moveto'])

			$pid = intval($pid);
$plist[] = $pid;
}
if($mybb->input['moveto'])

		{

		{

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

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

		}

		}

		else
{
$moveto = $fid;

		else
{
$moveto = $fid;

Zeile 1194Zeile 1268
		}
$newsubject = $mybb->input['newsubject'];


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


		$newtid = $moderation->split_posts($plist, $tid, $moveto, $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);

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





		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)
{
$pids[] = intval($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);
}





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

		$plugins->run_hooks("moderation_do_multiapproveposts");
log_moderator_action($modlogdata, $lang->multi_approve_posts);
clearinline($tid, "thread");

Zeile 1232Zeile 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 1247Zeile 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");

		$plugins->run_hooks("moderation_do_multiunapproveposts");
log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
clearinline($tid, "thread");

Zeile 1256Zeile 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 1271Zeile 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 1285Zeile 1368
		$rids = "'0','$rids'";

$plugins->run_hooks("moderation_do_reports");

		$rids = "'0','$rids'";

$plugins->run_hooks("moderation_do_reports");





		$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 1306Zeile 1389
		if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);

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

		}


		}


		$query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(rid) AS count", "reportstatus ='0'");

		$query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(rid) AS count", "reportstatus ='0'");

		$warnings = $db->fetch_field($query, "count");

if($mybb->input['rid'])
{
$query = $db->simple_select(TABLE_PREFIX."reportedposts", "COUNT(r.rid) AS count", "r.rid <= '".$mybb->input['rid']."'");
$result = $db->fetch_field($query, "count");
if(($result % $perpage) == 0)
{
$page = $result / $perpage;
}
else
{
$page = intval($result / $perpage) + 1;
}
}
$postcount = intval($warnings)+1;
$pages = $postcount / $perpage;
$pages = ceil($pages);

if($mybb->input['page'] == "last")
{
$page = $pages;
}

if($page > $pages)
{
$page = 1;
}

if($page)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;
$page = 1;

		$warnings = $db->fetch_field($query, "count");

if($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)
{
$page = $result / $perpage;
}
else
{
$page = intval($result / $perpage) + 1;
}
}
$postcount = intval($warnings)+1;
$pages = $postcount / $perpage;
$pages = ceil($pages);

if($mybb->input['page'] == "last")
{
$page = $pages;
}

if($page > $pages)
{
$page = 1;
}

if($page)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;
$page = 1;

		}
$upper = $start+$perpage;


		}
$upper = $start+$perpage;


Zeile 1353Zeile 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))
{
$forums[$forum['fid']] = $forum['name'];
}
$reports = '';
$query = $db->query("
SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject
FROM ".TABLE_PREFIX."reportedposts r
LEFT JOIN ".TABLE_PREFIX."posts p ON (r.pid=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid)

		}

$query = $db->simple_select(TABLE_PREFIX."forums", "fid,name");
while($forum = $db->fetch_array($query))
{
$forums[$forum['fid']] = $forum['name'];
}
$reports = '';
$query = $db->query("
SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject
FROM ".TABLE_PREFIX."reportedposts r
LEFT JOIN ".TABLE_PREFIX."posts p ON (r.pid=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid)

			WHERE r.reportstatus ='0'
ORDER BY r.dateline ASC
LIMIT $start, $perpage
");
while($report = $db->fetch_array($query))

			WHERE r.reportstatus ='0'
ORDER BY r.dateline ASC
LIMIT $start, $perpage
");
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']);

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

Zeile 1384Zeile 1467
		{
eval("\$reports = \"".$templates->get("moderation_reports_noreports")."\";");
}

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





		$plugins->run_hooks("moderation_reports");

eval("\$reportedposts = \"".$templates->get("moderation_reports")."\";");
output_page($reportedposts);

		$plugins->run_hooks("moderation_reports");

eval("\$reportedposts = \"".$templates->get("moderation_reports")."\";");
output_page($reportedposts);

		break;

		break;

	case "allreports":
if(is_moderator() != "yes")
{
error_no_permission();
}

	case "allreports":
if(is_moderator() != "yes")
{
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'];

Zeile 1424Zeile 1508
		$pages = ceil($pages);

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

		$pages = ceil($pages);

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

		{
$page = $pages;
}

if($page > $pages)
{
$page = 1;
}


		{
$page = $pages;
}

if($page > $pages)
{
$page = 1;
}


		if($page)
{
$start = ($page-1) * $perpage;
}
else

		if($page)
{
$start = ($page-1) * $perpage;
}
else

		{

		{

			$start = 0;
$page = 1;

			$start = 0;
$page = 1;

		}

		}

		$upper = $start+$perpage;

		$upper = $start+$perpage;





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

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

		{

		{

			eval("\$allreportspages = \"".$templates->get("moderation_allreports_multipage")."\";");
}


			eval("\$allreportspages = \"".$templates->get("moderation_allreports_multipage")."\";");
}


Zeile 1454Zeile 1538
		while($forum = $db->fetch_array($query))
{
$forums[$forum['fid']] = $forum['name'];

		while($forum = $db->fetch_array($query))
{
$forums[$forum['fid']] = $forum['name'];

		}

		}

		$reports = '';
$query = $db->query("
SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject

		$reports = '';
$query = $db->query("
SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject

Zeile 1498Zeile 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')
{

			$plugins->run_hooks("moderation_custommod");
if($tool['type'] == 't' && $mybb->input['modtype'] == 'inlinethread')
{