Vergleich admin/modules/tools/warninglog.php - 1.8.0 - 1.8.20

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 21Zeile 21
// Revoke a warning
if($mybb->input['action'] == "do_revoke" && $mybb->request_method == "post")
{

// Revoke a warning
if($mybb->input['action'] == "do_revoke" && $mybb->request_method == "post")
{

	$query = $db->simple_select("warnings", "*", "wid='".(int)$mybb->input['wid']."'");

	$query = $db->simple_select("warnings", "*", "wid='".$mybb->get_input('wid', MyBB::INPUT_INT)."'");

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

if(!$warning['wid'])

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

if(!$warning['wid'])

Zeile 59Zeile 59
			$updated_user = array(
"warningpoints" => $new_warning_points
);

			$updated_user = array(
"warningpoints" => $new_warning_points
);

			$db->update_query("users", $updated_user, "uid='{$warning['uid']}'");
}

		}



// Update warning
$updated_warning = array(


// Update warning
$updated_warning = array(

Zeile 69Zeile 68
			"revokedby" => $mybb->user['uid'],
"revokereason" => $db->escape_string($mybb->input['reason'])
);

			"revokedby" => $mybb->user['uid'],
"revokereason" => $db->escape_string($mybb->input['reason'])
);

		$db->update_query("warnings", $updated_warning, "wid='{$warning['wid']}'");





		$plugins->run_hooks("admin_tools_warninglog_do_revoke_commit");

		$plugins->run_hooks("admin_tools_warninglog_do_revoke_commit");

 

if($warning['expired'] != 1)
{
$db->update_query("users", $updated_user, "uid='{$warning['uid']}'");
}

$db->update_query("warnings", $updated_warning, "wid='{$warning['wid']}'");


flash_message($lang->redirect_warning_revoked, 'success');
admin_redirect("index.php?module=tools-warninglog&action=view&wid={$warning['wid']}");


flash_message($lang->redirect_warning_revoked, 'success');
admin_redirect("index.php?module=tools-warninglog&action=view&wid={$warning['wid']}");

Zeile 87Zeile 92
		LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (t.tid=w.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=w.issuedby)
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=w.pid)

		LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (t.tid=w.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=w.issuedby)
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=w.pid)

		WHERE w.wid='".(int)$mybb->input['wid']."'

		WHERE w.wid='".$mybb->get_input('wid', MyBB::INPUT_INT)."'

	");
$warning = $db->fetch_array($query);


	");
$warning = $db->fetch_array($query);


Zeile 105Zeile 110

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



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


	$user_link = build_profile_link($user['username'], $user['uid'], "_blank");

	$user_link = build_profile_link(htmlspecialchars_uni($user['username']), $user['uid'], "_blank");


if(is_array($warn_errors))
{


if(is_array($warn_errors))
{

Zeile 129Zeile 134
		$post_link = get_post_link($warning['pid']);
$table->construct_cell("<strong>{$lang->warned_user}</strong><br /><br />{$user_link}");
$table->construct_cell("<strong>{$lang->post}</strong><br /><br /><a href=\"{$mybb->settings['bburl']}/{$post_link}\" target=\"_blank\">{$warning['post_subject']}</a>");

		$post_link = get_post_link($warning['pid']);
$table->construct_cell("<strong>{$lang->warned_user}</strong><br /><br />{$user_link}");
$table->construct_cell("<strong>{$lang->post}</strong><br /><br /><a href=\"{$mybb->settings['bburl']}/{$post_link}\" target=\"_blank\">{$warning['post_subject']}</a>");

		$table->construct_row();

		$table->construct_row();

	}
else
{

	}
else
{

Zeile 137Zeile 142
		$table->construct_row();
}


		$table->construct_row();
}


	$issuedby = build_profile_link($warning['username'], $warning['issuedby'], "_blank");

	$issuedby = build_profile_link(htmlspecialchars_uni($warning['username']), $warning['issuedby'], "_blank");

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

$date_issued = my_date('relative', $warning['dateline']);
if($warning['type_title'])
{
$warning_type = $warning['type_title'];

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

$date_issued = my_date('relative', $warning['dateline']);
if($warning['type_title'])
{
$warning_type = $warning['type_title'];

	}

	}

	else
{
$warning_type = $warning['title'];

	else
{
$warning_type = $warning['title'];

	}

	}

	$warning_type = htmlspecialchars_uni($warning_type);
if($warning['points'] > 0)
{

	$warning_type = htmlspecialchars_uni($warning_type);
if($warning['points'] > 0)
{

Zeile 165Zeile 170
		else
{
$expires = my_date('relative', $warning['expires']);

		else
{
$expires = my_date('relative', $warning['expires']);

		}

		}

		$status = $lang->warning_active;
}
else

		$status = $lang->warning_active;
}
else

Zeile 210Zeile 215
	{
$date_revoked = my_date('relative', $warning['daterevoked']);
$revoked_user = get_user($warning['revokedby']);

	{
$date_revoked = my_date('relative', $warning['daterevoked']);
$revoked_user = get_user($warning['revokedby']);

		$revoked_by = build_profile_link($revoked_user['username'], $revoked_user['uid'], "_blank");

		$revoked_by = build_profile_link(htmlspecialchars_uni($revoked_user['username']), $revoked_user['uid'], "_blank");

		$revoke_reason = nl2br(htmlspecialchars_uni($warning['revokereason']));

$revoke_table = new Table;

		$revoke_reason = nl2br(htmlspecialchars_uni($warning['revokereason']));

$revoke_table = new Table;

Zeile 303Zeile 308
	$order = $mybb->input['filter']['order'];
$ordersel = array();
if($order != "asc")

	$order = $mybb->input['filter']['order'];
$ordersel = array();
if($order != "asc")

	{

	{

		$order = "desc";
$ordersel['desc'] = ' selected="selected"';
}
else

		$order = "desc";
$ordersel['desc'] = ' selected="selected"';
}
else

	{

	{

		$ordersel['asc'] = ' selected="selected"';
}


		$ordersel['asc'] = ' selected="selected"';
}


Zeile 330Zeile 335
	$query = $db->query($sql);
$total_warnings = $db->fetch_field($query, 'count');
$view_page = 1;

	$query = $db->query($sql);
$total_warnings = $db->fetch_field($query, 'count');
$view_page = 1;

	if(isset($mybb->input['page']) && $mybb->get_input('page', 1) > 0)

	if(isset($mybb->input['page']) && $mybb->get_input('page', MyBB::INPUT_INT) > 0)

	{

	{

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

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

	}
$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)

	}
$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)

Zeile 340Zeile 345
		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($view_page-1) * $per_page;

		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($view_page-1) * $per_page;

 
	$pages = ceil($total_warnings / $per_page);
if($view_page > $pages)
{
$start = 0;
$view_page = 1;
}

	// Build the base URL for pagination links
$url = 'index.php?module=tools-warninglog';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

	// Build the base URL for pagination links
$url = 'index.php?module=tools-warninglog';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

Zeile 386Zeile 397
		}

$trow = alt_trow();

		}

$trow = alt_trow();

		$username = format_name($row['username'], $row['usergroup'], $row['displaygroup']);

		$username = format_name(htmlspecialchars_uni($row['username']), $row['usergroup'], $row['displaygroup']);

		if(!$row['uid'])
{
$username_link = $username;

		if(!$row['uid'])
{
$username_link = $username;

Zeile 395Zeile 406
		{
$username_link = build_profile_link($username, $row['uid'], "_blank");
}

		{
$username_link = build_profile_link($username, $row['uid'], "_blank");
}

		$mod_username = format_name($row['mod_username'], $row['mod_usergroup'], $row['mod_displaygroup']);

		$mod_username = format_name(htmlspecialchars_uni($row['mod_username']), $row['mod_usergroup'], $row['mod_displaygroup']);

		$mod_username_link = build_profile_link($mod_username, $row['mod_uid'], "_blank");
$issued_date = my_date('relative', $row['dateline']);
$revoked_text = '';

		$mod_username_link = build_profile_link($mod_username, $row['mod_uid'], "_blank");
$issued_date = my_date('relative', $row['dateline']);
$revoked_text = '';

Zeile 464Zeile 475
	$form_container->output_row($lang->filter_issued_by, "", $form->generate_text_box('filter[mod_username]', $mybb->input['filter']['mod_username'], array('id' => 'filter_mod_username')), 'filter_mod_username');
$form_container->output_row($lang->filter_reason, "", $form->generate_text_box('filter[reason]', $mybb->input['filter']['reason'], array('id' => 'filter_reason')), 'filter_reason');
$form_container->output_row($lang->sort_by, "", $form->generate_select_box('filter[sortby]', $sort_by, $mybb->input['filter']['sortby'], array('id' => 'filter_sortby'))." {$lang->in} ".$form->generate_select_box('filter[order]', $order_array, $order, array('id' => 'filter_order'))." {$lang->order}", 'filter_order');

	$form_container->output_row($lang->filter_issued_by, "", $form->generate_text_box('filter[mod_username]', $mybb->input['filter']['mod_username'], array('id' => 'filter_mod_username')), 'filter_mod_username');
$form_container->output_row($lang->filter_reason, "", $form->generate_text_box('filter[reason]', $mybb->input['filter']['reason'], array('id' => 'filter_reason')), 'filter_reason');
$form_container->output_row($lang->sort_by, "", $form->generate_select_box('filter[sortby]', $sort_by, $mybb->input['filter']['sortby'], array('id' => 'filter_sortby'))." {$lang->in} ".$form->generate_select_box('filter[order]', $order_array, $order, array('id' => 'filter_order'))." {$lang->order}", 'filter_order');

	$form_container->output_row($lang->results_per_page, "", $form->generate_text_box('filter[per_page]', $per_page, array('id' => 'filter_per_page')), 'filter_per_page');

	$form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('filter[per_page]', $per_page, array('id' => 'filter_per_page', 'min' => 1)), 'filter_per_page');


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


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