Vergleich admin/modules/tools/modlog.php - 1.8.11 - 1.8.36

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

$plugins->run_hooks("admin_tools_modlog_prune_commit");



$plugins->run_hooks("admin_tools_modlog_prune_commit");


		if(!is_array($forum_cache))

		if(!isset($forum_cache) || !is_array($forum_cache))

		{
$forum_cache = cache_forums();
}

// Log admin action

		{
$forum_cache = cache_forums();
}

// Log admin action

		log_admin_action($mybb->input['older_than'], $mybb->input['uid'], $mybb->input['fid'], $num_deleted, $forum_cache[$mybb->input['fid']]['name']);









		if(!empty($forum_cache[$mybb->get_input('fid')]['name']))
{
$name = $forum_cache[$mybb->get_input('fid')]['name'];
} else
{
$name = null;
}

log_admin_action($mybb->get_input('older_than'), $mybb->get_input('uid'), $mybb->get_input('fid'), $num_deleted, $name);


$success = $lang->success_pruned_mod_logs;
if($is_today == true && $num_deleted > 0)


$success = $lang->success_pruned_mod_logs;
if($is_today == true && $num_deleted > 0)

		{

		{

			$success .= ' '.$lang->note_logs_locked;
}
elseif($is_today == true && $num_deleted == 0)

			$success .= ' '.$lang->note_logs_locked;
}
elseif($is_today == true && $num_deleted == 0)

Zeile 89Zeile 97
	$page->add_breadcrumb_item($lang->prune_mod_logs, "index.php?module=tools-modlog&action=prune");
$page->output_header($lang->prune_mod_logs);
$page->output_nav_tabs($sub_tabs, 'prune_mod_logs');

	$page->add_breadcrumb_item($lang->prune_mod_logs, "index.php?module=tools-modlog&action=prune");
$page->output_header($lang->prune_mod_logs);
$page->output_nav_tabs($sub_tabs, 'prune_mod_logs');


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

$user_options[''] = $lang->all_moderators;
$user_options['0'] = '----------';

$query = $db->query("
SELECT DISTINCT l.uid, u.username
FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (l.uid=u.uid)


// Fetch filter options
$sortbysel[$mybb->get_input('sortby')] = 'selected="selected"';
$ordersel[$mybb->get_input('order')] = 'selected="selected"';

$user_options[''] = $lang->all_moderators;
$user_options['0'] = '----------';

$query = $db->query("
SELECT DISTINCT l.uid, u.username
FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (l.uid=u.uid)

		ORDER BY u.username ASC
");
while($user = $db->fetch_array($query))
{

		ORDER BY u.username ASC
");
while($user = $db->fetch_array($query))
{

 
		// Deleted Users
if(!$user['username'])
{
$user['username'] = htmlspecialchars_uni($lang->na_deleted);
}


		$user_options[$user['uid']] = htmlspecialchars_uni($user['username']);
}

$form = new Form("index.php?module=tools-modlog&action=prune", "post");
$form_container = new FormContainer($lang->prune_moderator_logs);

		$user_options[$user['uid']] = htmlspecialchars_uni($user['username']);
}

$form = new Form("index.php?module=tools-modlog&action=prune", "post");
$form_container = new FormContainer($lang->prune_moderator_logs);

	$form_container->output_row($lang->forum, "", $form->generate_forum_select('fid', $mybb->input['fid'], array('id' => 'fid', 'main_option' => $lang->all_forums)), 'fid');
$form_container->output_row($lang->forum_moderator, "", $form->generate_select_box('uid', $user_options, $mybb->input['uid'], array('id' => 'uid')), 'uid');
if(!$mybb->input['older_than'])

	$form_container->output_row($lang->forum, "", $form->generate_forum_select('fid', $mybb->get_input('fid'), array('id' => 'fid', 'main_option' => $lang->all_forums)), 'fid');
$form_container->output_row($lang->forum_moderator, "", $form->generate_select_box('uid', $user_options, $mybb->get_input('uid'), array('id' => 'uid')), 'uid');
if(!$mybb->get_input('older_than'))

	{
$mybb->input['older_than'] = '30';
}

	{
$mybb->input['older_than'] = '30';
}

	$form_container->output_row($lang->date_range, "", $lang->older_than.$form->generate_numeric_field('older_than', $mybb->input['older_than'], array('id' => 'older_than', 'style' => 'width: 50px', 'min' => 0)).' '.$lang->days, 'older_than');

	$form_container->output_row($lang->date_range, "", $lang->older_than.$form->generate_numeric_field('older_than', $mybb->get_input('older_than'), array('id' => 'older_than', 'style' => 'width: 50px', 'min' => 0)).' '.$lang->days, 'older_than');

	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->prune_moderator_logs);
$form->output_submit_wrapper($buttons);

	$form_container->end();
$buttons[] = $form->generate_submit_button($lang->prune_moderator_logs);
$form->output_submit_wrapper($buttons);

Zeile 140Zeile 154
		{
$mybb->settings['threadsperpage'] = 20;
}

		{
$mybb->settings['threadsperpage'] = 20;
}

		



		$perpage = $mybb->settings['threadsperpage'];
}

$where = 'WHERE 1=1';

// Searching for entries by a particular user

		$perpage = $mybb->settings['threadsperpage'];
}

$where = 'WHERE 1=1';

// Searching for entries by a particular user

	if($mybb->input['uid'])


	$mybb->input['uid'] = $mybb->get_input('uid', MyBB::INPUT_INT);
if($mybb->input['uid'] > 0)

	{

	{

		$where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";

		$where .= " AND l.uid='".$mybb->input['uid']."'";

	}

// Searching for entries in a specific forum

	}

// Searching for entries in a specific forum

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

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

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

		$where .= " AND l.fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";

		$where .= " AND l.fid='".$mybb->input['fid']."'";

	}

// Order?

	}

// Order?

 
	$mybb->input['sortby'] = $mybb->get_input('sortby');

	switch($mybb->input['sortby'])
{
case "username":

	switch($mybb->input['sortby'])
{
case "username":

Zeile 173Zeile 190
		default:
$sortby = "l.dateline";
}

		default:
$sortby = "l.dateline";
}

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

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

	if($order != "asc")
{
$order = "desc";

	if($order != "asc")
{
$order = "desc";

Zeile 187Zeile 204
	$rescount = $db->fetch_field($query, "count");

// Figure out if we need to display multiple pages.

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

// Figure out if we need to display multiple pages.

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

	if($mybb->get_input('page') != "last")

	{
$pagecnt = $mybb->get_input('page', MyBB::INPUT_INT);

	{
$pagecnt = $mybb->get_input('page', MyBB::INPUT_INT);

	}

	}


$postcount = (int)$rescount;
$pages = $postcount / $perpage;
$pages = ceil($pages);



$postcount = (int)$rescount;
$pages = $postcount / $perpage;
$pages = ceil($pages);


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

	if($mybb->get_input('page') == "last")

	{
$pagecnt = $pages;
}

	{
$pagecnt = $pages;
}

Zeile 240Zeile 257
		$logitem['action'] = htmlspecialchars_uni($logitem['action']);
$logitem['dateline'] = my_date('relative', $logitem['dateline']);
$trow = alt_trow();

		$logitem['action'] = htmlspecialchars_uni($logitem['action']);
$logitem['dateline'] = my_date('relative', $logitem['dateline']);
$trow = alt_trow();

		$username = format_name(htmlspecialchars_uni($logitem['username']), $logitem['usergroup'], $logitem['displaygroup']);
$logitem['profilelink'] = build_profile_link($username, $logitem['uid'], "_blank");








		if($logitem['username'])
{
$username = format_name(htmlspecialchars_uni($logitem['username']), $logitem['usergroup'], $logitem['displaygroup']);
$logitem['profilelink'] = build_profile_link($username, $logitem['uid'], "_blank");
}
else
{
$username = $logitem['profilelink'] = $logitem['username'] = htmlspecialchars_uni($lang->na_deleted);
}

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

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

		{

		{

			$information .= "<strong>{$lang->forum}</strong> <a href=\"../".get_forum_link($logitem['fid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['fname'])."</a><br />";
}
if($logitem['psubject'])
{
$information .= "<strong>{$lang->post}</strong> <a href=\"../".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\" target=\"_blank\">".htmlspecialchars_uni($logitem['psubject'])."</a>";

			$information .= "<strong>{$lang->forum}</strong> <a href=\"../".get_forum_link($logitem['fid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['fname'])."</a><br />";
}
if($logitem['psubject'])
{
$information .= "<strong>{$lang->post}</strong> <a href=\"../".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\" target=\"_blank\">".htmlspecialchars_uni($logitem['psubject'])."</a>";

		}


		}


		if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
{
$data = my_unserialize($logitem['data']);

		if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
{
$data = my_unserialize($logitem['data']);

			if($data['uid'])
{

			if(!empty($data['uid']))
{

				$information = "<strong>{$lang->user_info}</strong> <a href=\"../".get_profile_link($data['uid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['username'])."</a>";

				$information = "<strong>{$lang->user_info}</strong> <a href=\"../".get_profile_link($data['uid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['username'])."</a>";

			}
if($data['aid'])

			}
if(!empty($data['aid']))

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

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

 

$plugins->run_hooks("admin_tools_modlog_modlogs_result");


$table->construct_cell($logitem['profilelink']);
$table->construct_cell($logitem['dateline'], array("class" => "align_center"));


$table->construct_cell($logitem['profilelink']);
$table->construct_cell($logitem['dateline'], array("class" => "align_center"));

Zeile 291Zeile 317
	}

// Fetch filter options

	}

// Fetch filter options

	$sortbysel[$mybb->input['sortby']] = "selected=\"selected\"";
$ordersel[$mybb->input['order']] = "selected=\"selected\"";

	$sortbysel[$mybb->get_input('sortby')] = "selected=\"selected\"";
$ordersel[$mybb->get_input('order')] = "selected=\"selected\"";


$user_options[''] = $lang->all_moderators;
$user_options['0'] = '----------';


$user_options[''] = $lang->all_moderators;
$user_options['0'] = '----------';

Zeile 305Zeile 331
	");
while($user = $db->fetch_array($query))
{

	");
while($user = $db->fetch_array($query))
{

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


		$selected = '';

		$selected = '';

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

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

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

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

Zeile 327Zeile 359

$form = new Form("index.php?module=tools-modlog", "post");
$form_container = new FormContainer($lang->filter_moderator_logs);


$form = new Form("index.php?module=tools-modlog", "post");
$form_container = new FormContainer($lang->filter_moderator_logs);

	$form_container->output_row($lang->forum, "", $form->generate_forum_select('fid', $mybb->input['fid'], array('id' => 'fid', 'main_option' => $lang->all_forums)), 'fid');
$form_container->output_row($lang->forum_moderator, "", $form->generate_select_box('uid', $user_options, $mybb->input['uid'], array('id' => 'uid')), 'uid');
$form_container->output_row($lang->sort_by, "", $form->generate_select_box('sortby', $sort_by, $mybb->input['sortby'], array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $order_array, $order, array('id' => 'order'))." {$lang->order}", 'order');

	$form_container->output_row($lang->forum, "", $form->generate_forum_select('fid', $mybb->get_input('fid'), array('id' => 'fid', 'main_option' => $lang->all_forums)), 'fid');
$form_container->output_row($lang->forum_moderator, "", $form->generate_select_box('uid', $user_options, $mybb->get_input('uid'), array('id' => 'uid')), 'uid');
$form_container->output_row($lang->sort_by, "", $form->generate_select_box('sortby', $sort_by, $mybb->get_input('sortby'), array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $order_array, $order, array('id' => 'order'))." {$lang->order}", 'order');

	$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $perpage, array('id' => 'perpage', 'min' => 1)), 'perpage');

$form_container->end();

	$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $perpage, array('id' => 'perpage', 'min' => 1)), 'perpage');

$form_container->end();