Vergleich admin/modules/tools/modlog.php - 1.8.3 - 1.8.19

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 36Zeile 36
	if($mybb->request_method == 'post')
{
$is_today = false;

	if($mybb->request_method == 'post')
{
$is_today = false;

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

		if($mybb->input['older_than'] <= 0)
{
$is_today = true;
$mybb->input['older_than'] = 1;
}

		if($mybb->input['older_than'] <= 0)
{
$is_today = true;
$mybb->input['older_than'] = 1;
}

		$where = 'dateline < '.(TIME_NOW-((int)$mybb->input['older_than']*86400));

		$where = 'dateline < '.(TIME_NOW-($mybb->input['older_than']*86400));


// Searching for entries by a particular user
if($mybb->input['uid'])
{


// Searching for entries by a particular user
if($mybb->input['uid'])
{

			$where .= " AND uid='".$mybb->get_input('uid', 1)."'";

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

		}

// Searching for entries in a specific module

		}

// Searching for entries in a specific module

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

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

		$user_options[$user['uid']] = $user['username'];







		// 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&amp;action=prune", "post");

	}

$form = new Form("index.php?module=tools-modlog&amp;action=prune", "post");

Zeile 115Zeile 122
	{
$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: 30px')).' '.$lang->days, 'older_than');

	$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->end();
$buttons[] = $form->generate_submit_button($lang->prune_moderator_logs);
$form->output_submit_wrapper($buttons);
$form->end();

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





	$page->output_footer();
}

	$page->output_footer();
}





if(!$mybb->input['action'])
{
$plugins->run_hooks("admin_tools_modlog_start");

$page->output_header($lang->mod_logs);

if(!$mybb->input['action'])
{
$plugins->run_hooks("admin_tools_modlog_start");

$page->output_header($lang->mod_logs);





	$page->output_nav_tabs($sub_tabs, 'mod_logs');

	$page->output_nav_tabs($sub_tabs, 'mod_logs');


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


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

	if(!$perpage)
{
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
{
$mybb->settings['threadsperpage'] = 20;
}

	if(!$perpage)
{
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
{
$mybb->settings['threadsperpage'] = 20;
}

		



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


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


Zeile 148Zeile 155
	// Searching for entries by a particular user
if($mybb->input['uid'])
{

	// Searching for entries by a particular user
if($mybb->input['uid'])
{

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

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

	}

// Searching for entries in a specific forum
if($mybb->input['fid'] > 0)
{

	}

// Searching for entries in a specific forum
if($mybb->input['fid'] > 0)
{

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

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

	}

// Order?

	}

// Order?

Zeile 180Zeile 187

$query = $db->query("
SELECT COUNT(l.dateline) AS count


$query = $db->query("
SELECT COUNT(l.dateline) AS count

		FROM ".TABLE_PREFIX."moderatorlog l
{$where}

		FROM ".TABLE_PREFIX."moderatorlog l
{$where}

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

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





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

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

	{
$pagecnt = $mybb->get_input('page', 1);

	{
$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")
{
$pagecnt = $pages;

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

Zeile 206Zeile 213
	}

if($pagecnt)

	}

if($pagecnt)

	{

	{

		$start = ($pagecnt-1) * $perpage;
}
else

		$start = ($pagecnt-1) * $perpage;
}
else

Zeile 239Zeile 246
		$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($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['tsubject'])
{
$information = "<strong>{$lang->thread}</strong> <a href=\"../".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";

Zeile 266Zeile 280
				$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['action'], array("class" => "align_center"));
$table->construct_cell($information);
$table->construct_cell(my_inet_ntop($db->unescape_binary($logitem['ipaddress'])), array("class" => "align_center"));


$table->construct_cell($logitem['profilelink']);
$table->construct_cell($logitem['dateline'], array("class" => "align_center"));
$table->construct_cell($logitem['action'], array("class" => "align_center"));
$table->construct_cell($information);
$table->construct_cell(my_inet_ntop($db->unescape_binary($logitem['ipaddress'])), array("class" => "align_center"));

		$table->construct_row();
}


		$table->construct_row();
}


	if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_modlogs, array("colspan" => "5"));
$table->construct_row();

	if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_modlogs, array("colspan" => "5"));
$table->construct_row();

	}


	}


	$table->output($lang->mod_logs);

// Do we need to construct the pagination?

	$table->output($lang->mod_logs);

// Do we need to construct the pagination?

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

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





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

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





	$query = $db->query("
SELECT DISTINCT l.uid, u.username
FROM ".TABLE_PREFIX."moderatorlog l

	$query = $db->query("
SELECT DISTINCT l.uid, u.username
FROM ".TABLE_PREFIX."moderatorlog l

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

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

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


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

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

		$user_options[$user['uid']] = $user['username'];

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

	}

$sort_by = array(

	}

$sort_by = array(

Zeile 329Zeile 351
	$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->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->results_per_page, "", $form->generate_numeric_field('perpage', $perpage, array('id' => 'perpage')), 'perpage');

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


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


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