Vergleich moderation.php - 1.8.1 - 1.8.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 12Zeile 12
define('THIS_SCRIPT', 'moderation.php');

$templatelist = 'changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move';

define('THIS_SCRIPT', 'moderation.php');

$templatelist = 'changeuserbox,loginbox,moderation_delayedmoderation_custommodtool,moderation_delayedmodaction_notes,moderation_delayedmoderation_merge,moderation_delayedmoderation_move';

$templatelist .= ',moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes';

$templatelist .= ',moderation_delayedmoderation,moderation_deletethread,moderation_deletepoll,moderation_mergeposts_post,moderation_viewthreadnotes,moderation_confirmation';

$templatelist .= ',moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_getpmip,moderation_merge';
$templatelist .= ',moderation_split_post,moderation_split,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error';
$templatelist .= ',moderation_inline_splitposts,forumjump_bit,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error,moderation_purgespammer,moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month';

$templatelist .= ',moderation_move,moderation_threadnotes_modaction,moderation_threadnotes_delayedmodaction,moderation_threadnotes,moderation_getip_modoptions,moderation_getip,moderation_getpmip,moderation_merge';
$templatelist .= ',moderation_split_post,moderation_split,moderation_inline_deletethreads,moderation_inline_movethreads,moderation_inline_deleteposts,moderation_inline_mergeposts,moderation_threadnotes_modaction_error';
$templatelist .= ',moderation_inline_splitposts,forumjump_bit,forumjump_special,forumjump_advanced,forumdisplay_password_wrongpass,forumdisplay_password,moderation_inline_moveposts,moderation_delayedmodaction_error,moderation_purgespammer,moderation_delayedmoderation_date_day,moderation_delayedmoderation_date_month';

Zeile 30Zeile 30

$plugins->run_hooks("moderation_start");



$plugins->run_hooks("moderation_start");


$tid = $mybb->get_input('tid', 1);
$pid = $mybb->get_input('pid', 1);
$fid = $mybb->get_input('fid', 1);
$pmid = $mybb->get_input('pmid', 1);

$tid = $mybb->get_input('tid', MyBB::INPUT_INT);
$pid = $mybb->get_input('pid', MyBB::INPUT_INT);
$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$pmid = $mybb->get_input('pmid', MyBB::INPUT_INT);


if($pid)
{


if($pid)
{

Zeile 67Zeile 67
	$permissions = forum_permissions($fid);
}


	$permissions = forum_permissions($fid);
}


if($pmid && $pmid > 0)

if($pmid > 0)

{

{

	$query = $db->query("
SELECT *
FROM ".TABLE_PREFIX."privatemessages
WHERE pmid='{$pmid}'
");

	$query = $db->simple_select('privatemessages', 'uid, subject, ipaddress, fromid', "pmid = $pmid");






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



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


Zeile 132Zeile 128
			error_no_permission();
}


			error_no_permission();
}


		$db->delete_query("delayedmoderation", "did='".$mybb->get_input('did', 1)."'");



		$plugins->run_hooks('moderation_cancel_delayedmoderation');

$db->delete_query("delayedmoderation", "did='".$mybb->get_input('did', MyBB::INPUT_INT)."'");


if($tid == 0)
{


if($tid == 0)
{

Zeile 148Zeile 146
		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		if(!$mybb->get_input('date_day', 1))

		if(!$mybb->get_input('date_day', MyBB::INPUT_INT))

		{
$mybb->input['date_day'] = date('d', TIME_NOW);

		{
$mybb->input['date_day'] = date('d', TIME_NOW);

		}
if(!$mybb->get_input('date_month', 1))

		}
if(!$mybb->get_input('date_month', MyBB::INPUT_INT))

		{
$mybb->input['date_month'] = date('m', TIME_NOW);
}

		{
$mybb->input['date_month'] = date('m', TIME_NOW);
}

Zeile 170Zeile 168
			}
else
{

			}
else
{

				$fid = $mybb->get_input('fid', 1);

				$fid = $mybb->get_input('fid', MyBB::INPUT_INT);

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

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

Zeile 219Zeile 217
			eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";");
}


			eval("\$customthreadtools .= \"".$templates->get("moderation_delayedmoderation_custommodtool")."\";");
}


		$mybb->input['delayedmoderation'] = $mybb->get_input('delayedmoderation', 2);


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


		if($mybb->input['action'] == "do_delayedmoderation" && $mybb->request_method == "post")
{
if(!in_array($mybb->input['type'], $allowed_types))

		if($mybb->input['action'] == "do_delayedmoderation" && $mybb->request_method == "post")
{
if(!in_array($mybb->input['type'], $allowed_types))

Zeile 259Zeile 257
				$errors[] = $lang->error_delayedmoderation_invalid_date_year;
}


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


			$date_time = explode(' ', (string)$mybb->input['date_time']);

			$date_time = explode(' ', $mybb->get_input('date_time'));

			$date_time = explode(':', (string)$date_time[0]);

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

			$date_time = explode(':', (string)$date_time[0]);

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

Zeile 268Zeile 266
				if($date_time[0] >= 24)
{
$date_time[0] = '00';

				if($date_time[0] >= 24)
{
$date_time[0] = '00';

				}

				}

			}


			}


			$rundate = mktime((int)$date_time[0], (int)$date_time[1], date('s', TIME_NOW), (int)$mybb->input['date_month'], (int)$mybb->input['date_day'], (int)$mybb->input['date_year']);

			$rundate = mktime((int)$date_time[0], (int)$date_time[1], date('s', TIME_NOW), $mybb->get_input('date_month', MyBB::INPUT_INT), $mybb->get_input('date_day', MyBB::INPUT_INT), $mybb->get_input('date_year', MyBB::INPUT_INT));


if(!$errors)
{


if(!$errors)
{

Zeile 280Zeile 278
					$mybb->input['tids'] = implode(',' , $mybb->input['tids']);
}


					$mybb->input['tids'] = implode(',' , $mybb->input['tids']);
}


				$db->insert_query("delayedmoderation", array(

				$did = $db->insert_query("delayedmoderation", array(

					'type' => $db->escape_string($mybb->input['type']),
'delaydateline' => (int)$rundate,
'uid' => $mybb->user['uid'],
'tids' => $db->escape_string($mybb->input['tids']),
'fid' => $fid,
'dateline' => TIME_NOW,

					'type' => $db->escape_string($mybb->input['type']),
'delaydateline' => (int)$rundate,
'uid' => $mybb->user['uid'],
'tids' => $db->escape_string($mybb->input['tids']),
'fid' => $fid,
'dateline' => TIME_NOW,

					'inputs' => $db->escape_string(serialize($mybb->input['delayedmoderation']))

					'inputs' => $db->escape_string(my_serialize($mybb->input['delayedmoderation']))

				));

				));

 

$plugins->run_hooks('moderation_do_delayedmoderation');


$rundate_format = my_date('relative', $rundate, '', 2);
$lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);


$rundate_format = my_date('relative', $rundate, '', 2);
$lang->redirect_delayed_moderation_thread = $lang->sprintf($lang->redirect_delayed_moderation_thread, $rundate_format);

Zeile 362Zeile 362
		else
{
$display_errors = '';

		else
{
$display_errors = '';

		}

$forum_cache = $cache->read("forums");


		}

$forum_cache = $cache->read("forums");


		$actions = array(
'openclosethread' => $lang->open_close_thread,
'softdeleterestorethread' => $lang->softdelete_restore_thread,

		$actions = array(
'openclosethread' => $lang->open_close_thread,
'softdeleterestorethread' => $lang->softdelete_restore_thread,

Zeile 397Zeile 397
		if($tid == 0)
{
// Inline thread moderation is used

		if($tid == 0)
{
// Inline thread moderation is used

			if($mybb->get_input('inlinetype') == 'search')
{
$tids = getids($mybb->get_input('searchid'), 'search');
}

			if($mybb->get_input('inlinetype') == 'search')
{
$tids = getids($mybb->get_input('searchid'), 'search');
}

			else
{
$tids = getids($fid, "forum");

			else
{
$tids = getids($fid, "forum");

Zeile 515Zeile 515
		}

$url = '';

		}

$url = '';

		if($mybb->get_input('tid', 1))

		if($mybb->get_input('tid', MyBB::INPUT_INT))

		{
$lang->threads = $lang->thread;
$threads = "<a href=\"".get_thread_link($tid)."\">{$thread['subject']}</a>";

		{
$lang->threads = $lang->thread;
$threads = "<a href=\"".get_thread_link($tid)."\">{$thread['subject']}</a>";

Zeile 548Zeile 548
		for($day = 1; $day <= 31; ++$day)
{
$selected = '';

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

			if($mybb->get_input('date_day', 1) == $day)

			if($mybb->get_input('date_day', MyBB::INPUT_INT) == $day)

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

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

Zeile 559Zeile 559
		foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month)
{
$datemonth[$month] = '';

		foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month)
{
$datemonth[$month] = '';

			if($mybb->get_input('date_month', 1) == (int)$month)

			if($mybb->get_input('date_month', MyBB::INPUT_INT) == (int)$month)

			{
$datemonth[$month] = ' selected="selected"';
}

			{
$datemonth[$month] = ' selected="selected"';
}

Zeile 661Zeile 661
	case "deletethread":

add_breadcrumb($lang->nav_deletethread);

	case "deletethread":

add_breadcrumb($lang->nav_deletethread);





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

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

Zeile 677Zeile 677
		break;

// Delete the actual thread here

		break;

// Delete the actual thread here

	case "do_deletethread":


	case "do_deletethread":


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


Zeile 693Zeile 693
		$plugins->run_hooks("moderation_do_deletethread");

// Log the subject of the deleted thread

		$plugins->run_hooks("moderation_do_deletethread");

// Log the subject of the deleted thread

		$modlogdata['thread_subject'] = $thread['subject'];


		$modlogdata['thread_subject'] = $thread['subject'];


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

		$thread['subject'] = $db->escape_string($thread['subject']);
$lang->thread_deleted = $lang->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");
moderation_redirect(get_forum_link($fid), $lang->redirect_threaddeleted);
break;

		mark_reports($tid, "thread");
moderation_redirect(get_forum_link($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, "canmanagepolls"))
{


if(!is_moderator($fid, "canmanagepolls"))
{

			if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
{
error_no_permission();

			if($permissions['candeletethreads'] != 1 || $mybb->user['uid'] != $thread['uid'])
{
error_no_permission();

Zeile 719Zeile 719

$plugins->run_hooks("moderation_deletepoll");



$plugins->run_hooks("moderation_deletepoll");


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

		$query = $db->simple_select("polls", "pid", "tid='$tid'");

		$poll = $db->fetch_array($query);
if(!$poll)
{

		$poll = $db->fetch_array($query);
if(!$poll)
{

Zeile 747Zeile 747
				error_no_permission();
}
}

				error_no_permission();
}
}

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

		$query = $db->simple_select("polls", "pid", "tid = $tid");

		$poll = $db->fetch_array($query);
if(!$poll)
{

		$poll = $db->fetch_array($query);
if(!$poll)
{

Zeile 777Zeile 777
		$thread = get_thread($tid);

$plugins->run_hooks("moderation_approvethread");

		$thread = get_thread($tid);

$plugins->run_hooks("moderation_approvethread");





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


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


Zeile 785Zeile 785

moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved);
break;


moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadapproved);
break;





	// Unapprove a thread
case "unapprovethread":


	// Unapprove a thread
case "unapprovethread":


Zeile 793Zeile 793
		verify_post_check($mybb->get_input('my_post_key'));

if(!is_moderator($fid, "canapproveunapprovethreads"))

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

if(!is_moderator($fid, "canapproveunapprovethreads"))

		{

		{

			error_no_permission();
}
$thread = get_thread($tid);

			error_no_permission();
}
$thread = get_thread($tid);

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


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


		$moderation->unapprove_threads($tid);


		$moderation->unapprove_threads($tid);


		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
break;

// Restore a thread
case "restorethread":

		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadunapproved);
break;

// Restore a thread
case "restorethread":





		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));





		if(!is_moderator($fid, "canrestorethreads"))
{
error_no_permission();

		if(!is_moderator($fid, "canrestorethreads"))
{
error_no_permission();

Zeile 824Zeile 824

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


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


$moderation->restore_threads($tid, $fid);



$moderation->restore_threads($tid, $fid);


		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored);
break;

// Soft delete a thread
case "softdeletethread":

		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadrestored);
break;

// Soft delete a thread
case "softdeletethread":





		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


Zeile 842Zeile 842
		}
$thread = get_thread($tid);


		}
$thread = get_thread($tid);


		$plugins->run_hooks("moderation_softdeletethread");


		$plugins->run_hooks("moderation_softdeletethread");


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

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





		$moderation->soft_delete_threads($tid);

		$moderation->soft_delete_threads($tid);





		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted);
break;

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

		moderation_redirect(get_thread_link($thread['tid']), $lang->redirect_threadsoftdeleted);
break;

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

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

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


$plugins->run_hooks("moderation_move");



$plugins->run_hooks("moderation_move");


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

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





	// Let's get this thing moving!
case "do_move":

// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


	// Let's get this thing moving!
case "do_move":

// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		$moveto = $mybb->get_input('moveto', 1);

		$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);

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

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





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

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

Zeile 900Zeile 900
		{
error($lang->error_movetosameforum);
}

		{
error($lang->error_movetosameforum);
}

 

$plugins->run_hooks('moderation_do_move');


$expire = 0;


$expire = 0;

		if($mybb->get_input('redirect_expire', 1) > 0)

		if($mybb->get_input('redirect_expire', MyBB::INPUT_INT) > 0)

		{

		{

			$expire = TIME_NOW + ($mybb->get_input('redirect_expire', 1) * 86400);

			$expire = TIME_NOW + ($mybb->get_input('redirect_expire', MyBB::INPUT_INT) * 86400);

		}

$the_thread = $tid;

		}

$the_thread = $tid;

Zeile 924Zeile 926
		}

moderation_redirect(get_thread_link($newtid), $lang->redirect_threadmoved);

		}

moderation_redirect(get_thread_link($newtid), $lang->redirect_threadmoved);

		break;


		break;


	// Viewing thread notes
case "viewthreadnotes":
if(!is_moderator($fid))
{
error_no_permission();

	// Viewing thread notes
case "viewthreadnotes":
if(!is_moderator($fid))
{
error_no_permission();

		}


		}


		// Make sure we are looking at a real thread here.
if(!$thread)
{
error($lang->error_nomember);
}

		// Make sure we are looking at a real thread here.
if(!$thread)
{
error($lang->error_nomember);
}






$plugins->run_hooks('moderation_viewthreadnotes');


		$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $thread['subject']);

$thread['notes'] = nl2br(htmlspecialchars_uni($thread['notes']));

		$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $thread['subject']);

$thread['notes'] = nl2br(htmlspecialchars_uni($thread['notes']));





		eval("\$viewthreadnotes = \"".$templates->get("moderation_viewthreadnotes", 1, 0)."\";");
echo $viewthreadnotes;
break;

		eval("\$viewthreadnotes = \"".$templates->get("moderation_viewthreadnotes", 1, 0)."\";");
echo $viewthreadnotes;
break;





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

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

Zeile 958Zeile 962
		$trow = alt_trow(1);

if(is_moderator($fid, "canviewmodlog"))

		$trow = alt_trow(1);

if(is_moderator($fid, "canviewmodlog"))

		{

		{

			$query = $db->query("
SELECT l.*, u.username, t.subject AS tsubject, f.name AS fname, p.subject AS psubject
FROM ".TABLE_PREFIX."moderatorlog l

			$query = $db->query("
SELECT l.*, u.username, t.subject AS tsubject, f.name AS fname, p.subject AS psubject
FROM ".TABLE_PREFIX."moderatorlog l

Zeile 1037Zeile 1041
					LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)
WHERE ','||d.tids||',' LIKE '%,{$tid},%'

					LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=d.uid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=d.fid)
WHERE ','||d.tids||',' LIKE '%,{$tid},%'

					ORDER BY d.dateline DESC
LIMIT 0, 20

					ORDER BY d.dateline DESC
LIMIT 0, 20

				");
break;
default:

				");
break;
default:

Zeile 1054Zeile 1058
		}
$delayedmods = '';
while($delayedmod = $db->fetch_array($query))

		}
$delayedmods = '';
while($delayedmod = $db->fetch_array($query))

		{

		{

			$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];

			$delayedmod['dateline'] = my_date("jS M Y, G:i", $delayedmod['delaydateline']);
$delayedmod['profilelink'] = build_profile_link($delayedmod['username'], $delayedmod['uid']);
$delayedmod['action'] = $actions[$delayedmod['type']];

Zeile 1071Zeile 1075
			if($delayedmod['fname'])
{
$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";

			if($delayedmod['fname'])
{
$info .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($delayedmod['fid'])."\">".htmlspecialchars_uni($delayedmod['fname'])."</a><br />";

			}

			}

			$delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);

if($delayedmod['type'] == 'move')

			$delayedmod['inputs'] = my_unserialize($delayedmod['inputs']);

if($delayedmod['type'] == 'move')

			{

			{

				$info .= "<strong>{$lang->new_forum}</strong>  <a href=\"".get_forum_link($delayedmod['inputs']['new_forum'])."\">".htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name'])."</a><br />";
if($delayedmod['inputs']['method'] == "redirect")
{
$info .= "<strong>{$lang->leave_redirect_for}</strong> ".(int)$delayedmod['inputs']['redirect_expire']." {$lang->days}<br />";
}

				$info .= "<strong>{$lang->new_forum}</strong>  <a href=\"".get_forum_link($delayedmod['inputs']['new_forum'])."\">".htmlspecialchars_uni($forum_cache[$delayedmod['inputs']['new_forum']]['name'])."</a><br />";
if($delayedmod['inputs']['method'] == "redirect")
{
$info .= "<strong>{$lang->leave_redirect_for}</strong> ".(int)$delayedmod['inputs']['redirect_expire']." {$lang->days}<br />";
}

			}

			}

			else if($delayedmod['type'] == 'merge')
{
$info .= "<strong>{$lang->new_subject}</strong> ".htmlspecialchars_uni($delayedmod['inputs']['subject'])."<br />";
$info .= "<strong>{$lang->thread_to_merge_with}</strong> <a href=\"".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."\">".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."</a><br />";
}

			else if($delayedmod['type'] == 'merge')
{
$info .= "<strong>{$lang->new_subject}</strong> ".htmlspecialchars_uni($delayedmod['inputs']['subject'])."<br />";
$info .= "<strong>{$lang->thread_to_merge_with}</strong> <a href=\"".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."\">".htmlspecialchars_uni($delayedmod['inputs']['threadurl'])."</a><br />";
}





			eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";");
$trow = alt_trow();
}

			eval("\$delayedmods .= \"".$templates->get("moderation_threadnotes_delayedmodaction")."\";");
$trow = alt_trow();
}

Zeile 1135Zeile 1139
		$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress']));
$hostname = @gethostbyaddr($post['ipaddress']);
if(!$hostname || $hostname == $post['ipaddress'])

		$post['ipaddress'] = my_inet_ntop($db->unescape_binary($post['ipaddress']));
$hostname = @gethostbyaddr($post['ipaddress']);
if(!$hostname || $hostname == $post['ipaddress'])

		{

		{

			$hostname = $lang->resolve_fail;

			$hostname = $lang->resolve_fail;

		}

$username = build_profile_link($post['username'], $post['uid']);

		}

$username = build_profile_link($post['username'], $post['uid']);


// Moderator options
$modoptions = "";


// Moderator options
$modoptions = "";

Zeile 1148Zeile 1152
			$ipaddress = $post['ipaddress'];
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
}

			$ipaddress = $post['ipaddress'];
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
}

 

$plugins->run_hooks('moderation_getip');


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


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

		break;


		break;


	// Let's look up the ip address of a PM
case "getpmip":
if($pmid <= 0)

	// Let's look up the ip address of a PM
case "getpmip":
if($pmid <= 0)

		{

		{

			error($lang->error_invalidpm);

			error($lang->error_invalidpm);

		}

		}

		add_breadcrumb($lang->nav_pms, "private.php");
$pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
add_breadcrumb($pm['subject'], "private.php?action=read&amp;pmid={$pmid}");

		add_breadcrumb($lang->nav_pms, "private.php");
$pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
add_breadcrumb($pm['subject'], "private.php?action=read&amp;pmid={$pmid}");

Zeile 1166Zeile 1172
		if(!$mybb->usergroup['issupermod'])
{
error_no_permission();

		if(!$mybb->usergroup['issupermod'])
{
error_no_permission();

		}


		}


		$pm['ipaddress'] = my_inet_ntop($db->unescape_binary($pm['ipaddress']));
$hostname = @gethostbyaddr($pm['ipaddress']);
if(!$hostname || $hostname == $pm['ipaddress'])

		$pm['ipaddress'] = my_inet_ntop($db->unescape_binary($pm['ipaddress']));
$hostname = @gethostbyaddr($pm['ipaddress']);
if(!$hostname || $hostname == $pm['ipaddress'])

		{

		{

			$hostname = $lang->resolve_fail;

			$hostname = $lang->resolve_fail;

		}

$user = get_user($pm['uid']);
$pm['username'] = $user['username'];

$username = build_profile_link($pm['username'], $pm['uid']);

		}

$name = $db->fetch_field($db->simple_select('users', 'username', "uid = {$pm['fromid']}"), 'username');
$username = build_profile_link($name, $pm['fromid']);




// Moderator options
$modoptions = "";


// Moderator options
$modoptions = "";

Zeile 1187Zeile 1191
			$ipaddress = $pm['ipaddress'];
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
}

			$ipaddress = $pm['ipaddress'];
eval("\$modoptions = \"".$templates->get("moderation_getip_modoptions")."\";");
}

 

$plugins->run_hooks('moderation_getpmip');


eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";");
output_page($getpmip);


eval("\$getpmip = \"".$templates->get("moderation_getpmip")."\";");
output_page($getpmip);

Zeile 1367Zeile 1373

$plugins->run_hooks("moderation_do_split");



$plugins->run_hooks("moderation_do_split");


		$mybb->input['splitpost'] = $mybb->get_input('splitpost', 2);

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

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

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

Zeile 1387Zeile 1393

if(!empty($mybb->input['moveto']))
{


if(!empty($mybb->input['moveto']))
{

			$moveto = $mybb->get_input('moveto', 1);

			$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);

		}
else
{

		}
else
{

Zeile 1465Zeile 1471
		$inlineids = implode("|", $threads);
if($mybb->get_input('inlinetype') == 'search')
{

		$inlineids = implode("|", $threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1496Zeile 1502
		log_moderator_action($modlogdata, $lang->multi_deleted_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_deleted_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1540Zeile 1546
		log_moderator_action($modlogdata, $lang->multi_opened_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_opened_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1582Zeile 1588
		log_moderator_action($modlogdata, $lang->multi_closed_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_closed_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1624Zeile 1630
		log_moderator_action($modlogdata, $lang->multi_approved_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_approved_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1667Zeile 1673
		log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_unapproved_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1710Zeile 1716
		log_moderator_action($modlogdata, $lang->multi_restored_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_restored_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1753Zeile 1759
		log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_soft_deleted_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1796Zeile 1802
		log_moderator_action($modlogdata, $lang->multi_stuck_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_stuck_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1838Zeile 1844
		log_moderator_action($modlogdata, $lang->multi_unstuck_threads);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_unstuck_threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1876Zeile 1882
		$inlineids = implode("|", $threads);
if($mybb->get_input('inlinetype') == 'search')
{

		$inlineids = implode("|", $threads);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 1894Zeile 1900
		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		$moveto = $mybb->get_input('moveto', 1);

		$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);

		$threadlist = explode("|", $mybb->get_input('threads'));
if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))
{

		$threadlist = explode("|", $mybb->get_input('threads'));
if(!is_moderator_by_tids($threadlist, 'canmanagethreads'))
{

Zeile 1948Zeile 1954
		$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{

		$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 2007Zeile 2013
		// Otherwise we're just deleting from showthread.php
else
{

		// Otherwise we're just deleting from showthread.php
else
{

			$query = $db->simple_select("posts", "*", "tid='$tid'");

			$query = $db->simple_select("posts", "pid", "tid = $tid");

			$numposts = $db->num_rows($query);
if(!$numposts)
{

			$numposts = $db->num_rows($query);
if(!$numposts)
{

Zeile 2104Zeile 2110
		$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{

		$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 2123Zeile 2129
		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


		$mergepost = $mybb->get_input('mergepost', 2);

		$mergepost = $mybb->get_input('mergepost', MyBB::INPUT_ARRAY);

		if(count($mergepost) <= 1)
{
error($lang->error_nomergeposts);

		if(count($mergepost) <= 1)
{
error($lang->error_nomergeposts);

Zeile 2216Zeile 2222
		$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{

		$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 2311Zeile 2317

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


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

			$moveto = $mybb->get_input('moveto', 1);

			$moveto = $mybb->get_input('moveto', MyBB::INPUT_INT);

		}
else
{

		}
else
{

Zeile 2404Zeile 2410
		$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{

		$inlineids = implode("|", $posts);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 2465Zeile 2471

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


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

			$query = $db->simple_select("posts", "*", "pid='".(int)$parameters['pid']."'");

			$query = $db->simple_select("posts", "tid", "pid='".(int)$parameters['pid']."'");

			$post = $db->fetch_array($query);
$newtid = $post['tid'];
}

			$post = $db->fetch_array($query);
$newtid = $post['tid'];
}

Zeile 2605Zeile 2611
		log_moderator_action($modlogdata, $lang->multi_approve_posts);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_approve_posts);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 2649Zeile 2655
		log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_unapprove_posts);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 2693Zeile 2699
		log_moderator_action($modlogdata, $lang->multi_restore_posts);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_restore_posts);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 2737Zeile 2743
		log_moderator_action($modlogdata, $lang->multi_soft_delete_posts);
if($mybb->get_input('inlinetype') == 'search')
{

		log_moderator_action($modlogdata, $lang->multi_soft_delete_posts);
if($mybb->get_input('inlinetype') == 'search')
{

			clearinline($mybb->get_input('searchid', 1), 'search');

			clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

		}
else
{

		}
else
{

Zeile 2810Zeile 2816
				foreach(array($user['regip'], $user['lastip']) as $ip)
{
$ip = my_inet_ntop($db->unescape_binary($ip));

				foreach(array($user['regip'], $user['lastip']) as $ip)
{
$ip = my_inet_ntop($db->unescape_binary($ip));

					$query = $db->simple_select("banfilters", "*", "type = '1' AND filter = '".$db->escape_string($ip)."'");

					$query = $db->simple_select("banfilters", "type", "type = 1 AND filter = '".$db->escape_string($ip)."'");

					if($db->num_rows($query) == 0)
{
$insert = array(

					if($db->num_rows($query) == 0)
{
$insert = array(

Zeile 2827Zeile 2833

$cache->update_banned();
$cache->update_bannedips();


$cache->update_banned();
$cache->update_bannedips();

 
				$cache->update_awaitingactivation();


// Update reports cache
$cache->update_reportedcontent();


// Update reports cache
$cache->update_reportedcontent();

Zeile 2839Zeile 2846
			// Submit the user to stop forum spam
if(!empty($mybb->settings['purgespammerapikey']))
{

			// Submit the user to stop forum spam
if(!empty($mybb->settings['purgespammerapikey']))
{

				$sfs = @fetch_remote_file("http://stopforumspam.com/add.php?username=" . urlencode($user['username']) . "&ip_addr=" . urlencode($user['lastip']) . "&email=" . urlencode($user['email']) . "&api_key=" . urlencode($mybb->settings['purgespammerapikey']));

				$sfs = @fetch_remote_file("http://stopforumspam.com/add.php?username=" . urlencode($user['username']) . "&ip_addr=" . urlencode(my_inet_ntop($db->unescape_binary($user['lastip']))) . "&email=" . urlencode($user['email']) . "&api_key=" . urlencode($mybb->settings['purgespammerapikey']));

			}

log_moderator_action(array('uid' => $uid, 'username' => $user['username']), $lang->purgespammer_modlog);

			}

log_moderator_action(array('uid' => $uid, 'username' => $user['username']), $lang->purgespammer_modlog);

Zeile 2874Zeile 2881
	default:
require_once MYBB_ROOT."inc/class_custommoderation.php";
$custommod = new CustomModeration;

	default:
require_once MYBB_ROOT."inc/class_custommoderation.php";
$custommod = new CustomModeration;

		$tool = $custommod->tool_info($mybb->get_input('action', 1));

		$tool = $custommod->tool_info($mybb->get_input('action', MyBB::INPUT_INT));

		if($tool !== false)
{
// Verify incoming POST request

		if($tool !== false)
{
// Verify incoming POST request

Zeile 2882Zeile 2889

$options = my_unserialize($tool['threadoptions']);



$options = my_unserialize($tool['threadoptions']);


			if($tool['groups'] != -1 && !is_member($tool['groups']))

			if(!is_member($tool['groups']))

			{
error_no_permission();
}

			{
error_no_permission();
}

Zeile 2930Zeile 2937
					error($lang->error_movetocategory);
}


					error($lang->error_movetocategory);
}


				$custommod->execute($mybb->get_input('action', 1), $tids);

				$custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids);

 				$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($mybb->get_input('inlinetype') == 'search')
{

 				$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($mybb->get_input('inlinetype') == 'search')
{

					clearinline($mybb->get_input('searchid', 1), 'search');

					clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

					$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
redirect($return_url, $lang->redirect_customtool_search);

					$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
redirect($return_url, $lang->redirect_customtool_search);

Zeile 2961Zeile 2968
					error($lang->error_movetocategory);
}


					error($lang->error_movetocategory);
}


				$ret = $custommod->execute($mybb->get_input('action', 1), $tid);

				$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tid);

 				$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($ret == 'forum')

 				$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($ret == 'forum')

Zeile 3008Zeile 3015
					$tids[] = $row['tid'];
}


					$tids[] = $row['tid'];
}


				$ret = $custommod->execute($mybb->get_input('action', 1), $tids, $pids);

				$ret = $custommod->execute($mybb->get_input('action', MyBB::INPUT_INT), $tids, $pids);

 				$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($mybb->get_input('inlinetype') == 'search')
{

 				$lang->custom_tool = $lang->sprintf($lang->custom_tool, $tool['name']);
log_moderator_action($modlogdata, $lang->custom_tool);
if($mybb->get_input('inlinetype') == 'search')
{

					clearinline($mybb->get_input('searchid', 1), 'search');

					clearinline($mybb->get_input('searchid', MyBB::INPUT_INT), 'search');

					$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
redirect($return_url, $lang->redirect_customtool_search);

					$lang->redirect_customtool_search = $lang->sprintf($lang->redirect_customtool_search, $tool['name']);
$return_url = htmlspecialchars_uni($mybb->get_input('url'));
redirect($return_url, $lang->redirect_customtool_search);

Zeile 3107Zeile 3114
	}
else if($type == 'search')
{

	}
else if($type == 'search')
{

		$query = $db->simple_select("searchlog", "*", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1);

		$query = $db->simple_select("searchlog", "resulttype, posts, threads", "sid='".$db->escape_string($id)."' AND uid='{$mybb->user['uid']}'", 1);

		$searchlog = $db->fetch_array($query);
if($searchlog['resulttype'] == 'posts')
{

		$searchlog = $db->fetch_array($query);
if($searchlog['resulttype'] == 'posts')
{