Vergleich admin/modules/user/banning.php - 1.8.7 - 1.8.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 99Zeile 99
		$cache->update_reportedcontent();

// Log admin action

		$cache->update_reportedcontent();

// Log admin action

		log_admin_action($user['uid'], $user['username']);

		log_admin_action($user['uid'], htmlspecialchars_uni($user['username']));


flash_message($lang->success_pruned, 'success');
admin_redirect("index.php?module=user-banning");


flash_message($lang->success_pruned, 'success');
admin_redirect("index.php?module=user-banning");

Zeile 154Zeile 154
		$cache->update_moderators();

// Log admin action

		$cache->update_moderators();

// Log admin action

		log_admin_action($ban['uid'], $user['username']);

		log_admin_action($ban['uid'], htmlspecialchars_uni($user['username']));


flash_message($lang->success_ban_lifted, 'success');
admin_redirect("index.php?module=user-banning");


flash_message($lang->success_ban_lifted, 'success');
admin_redirect("index.php?module=user-banning");

Zeile 241Zeile 241
			$cache->update_banned();

// Log admin action

			$cache->update_banned();

// Log admin action

			log_admin_action($ban['uid'], $user['username']);

			log_admin_action($ban['uid'], htmlspecialchars_uni($user['username']));


flash_message($lang->success_ban_updated, 'success');
admin_redirect("index.php?module=user-banning");


flash_message($lang->success_ban_updated, 'success');
admin_redirect("index.php?module=user-banning");

Zeile 268Zeile 268
	}

$form_container = new FormContainer($lang->edit_ban);

	}

$form_container = new FormContainer($lang->edit_ban);

	$form_container->output_row($lang->ban_username, "", $user['username']);

	$form_container->output_row($lang->ban_username, "", htmlspecialchars_uni($user['username']));

	$form_container->output_row($lang->ban_reason, "", $form->generate_text_area('reason', $mybb->input['reason'], array('id' => 'reason', 'maxlength' => '255')), 'reason');
if(count($banned_groups) > 1)
{

	$form_container->output_row($lang->ban_reason, "", $form->generate_text_area('reason', $mybb->input['reason'], array('id' => 'reason', 'maxlength' => '255')), 'reason');
if(count($banned_groups) > 1)
{

Zeile 285Zeile 285
	{
if($time != '---')
{

	{
if($time != '---')
{

			$friendly_time = my_date("D, jS M Y @ g:ia", ban_date2timestamp($time));

			$friendly_time = my_date("D, jS M Y @ {$mybb->settings['timeformat']}", ban_date2timestamp($time));

			$period = "{$period} ({$friendly_time})";
}
$length_list[$time] = $period;

			$period = "{$period} ({$friendly_time})";
}
$length_list[$time] = $period;

Zeile 314Zeile 314
		);

$user = get_user_by_username($mybb->input['username'], $options);

		);

$user = get_user_by_username($mybb->input['username'], $options);

		



		// Are we searching a user?

		// Are we searching a user?

		if(isset($mybb->input['search']) && $mybb->get_input('search') != '')

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

		{
$where_sql = 'uid=\''.(int)$user['uid'].'\'';
$where_sql_full = 'WHERE b.uid=\''.(int)$user['uid'].'\'';

		{
$where_sql = 'uid=\''.(int)$user['uid'].'\'';
$where_sql_full = 'WHERE b.uid=\''.(int)$user['uid'].'\'';

Zeile 339Zeile 339
				{
$errors[] = $lang->error_already_banned;
}

				{
$errors[] = $lang->error_already_banned;
}

				



				// Get PRIMARY usergroup information
$usergroups = $cache->read("usergroups");
if(!empty($usergroups[$user['usergroup']]) && $usergroups[$user['usergroup']]['isbannedgroup'] == 1)

				// Get PRIMARY usergroup information
$usergroups = $cache->read("usergroups");
if(!empty($usergroups[$user['usergroup']]) && $usergroups[$user['usergroup']]['isbannedgroup'] == 1)

Zeile 405Zeile 405
				$cache->update_banned();

// Log admin action

				$cache->update_banned();

// Log admin action

				log_admin_action($user['uid'], $user['username'], $lifted);

				log_admin_action($user['uid'], htmlspecialchars_uni($user['username']), $lifted);


flash_message($lang->success_banned, 'success');
admin_redirect("index.php?module=user-banning");


flash_message($lang->success_banned, 'success');
admin_redirect("index.php?module=user-banning");

Zeile 441Zeile 441
	}

$pagination = draw_admin_pagination($current_page, $per_page, $ban_count, "index.php?module=user-banning&page={page}");

	}

$pagination = draw_admin_pagination($current_page, $per_page, $ban_count, "index.php?module=user-banning&page={page}");


$table = new Table;
$table->construct_header($lang->user);
$table->construct_header($lang->ban_lifts_on, array("class" => "align_center", "width" => 150));
$table->construct_header($lang->time_left, array("class" => "align_center", "width" => 150));
$table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 2, "width" => 200));
$table->construct_header($lang->moderation, array("class" => "align_center", "colspan" => 1, "width" => 200));

// Fetch bans
$query = $db->query("
SELECT b.*, a.username AS adminuser, u.username
FROM ".TABLE_PREFIX."banned b
LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users a ON (b.admin=a.uid)
{$where_sql_full}
ORDER BY dateline DESC
LIMIT {$start}, {$per_page}
");

// Get the banned users
while($ban = $db->fetch_array($query))
{
$profile_link = build_profile_link($ban['username'], $ban['uid'], "_blank");
$ban_date = my_date($mybb->settings['dateformat'], $ban['dateline']);
if($ban['lifted'] == 'perm' || $ban['lifted'] == '' || $ban['bantime'] == 'perm' || $ban['bantime'] == '---')
{
$ban_period = $lang->permenantly;
$time_remaining = $lifts_on = $lang->na;
}
else
{
$ban_period = $lang->for." ".$ban_times[$ban['bantime']];

$remaining = $ban['lifted']-TIME_NOW;
$time_remaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";

if($remaining < 3600)
{
$time_remaining = "<span style=\"color: red;\">{$time_remaining}</span>";
}
else if($remaining < 86400)
{
$time_remaining = "<span style=\"color: maroon;\">{$time_remaining}</span>";
}
else if($remaining < 604800)
{
$time_remaining = "<span style=\"color: green;\">{$time_remaining}</span>";
}

$lifts_on = my_date($mybb->settings['dateformat'], $ban['lifted']);
}

if(!$ban['adminuser'])
{
if($ban['admin'] == 0)
{
$ban['adminuser'] = "MyBB System";
}
else
{
$ban['adminuser'] = $ban['admin'];
}
}

$table->construct_cell($lang->sprintf($lang->bannedby_x_on_x, $profile_link, htmlspecialchars_uni($ban['adminuser']), $ban_date, $ban_period));
$table->construct_cell($lifts_on, array("class" => "align_center"));
$table->construct_cell($time_remaining, array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&amp;action=edit&amp;uid={$ban['uid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&amp;action=lift&amp;uid={$ban['uid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_lift_ban}');\">{$lang->lift}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&amp;action=prune&amp;uid={$ban['uid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_prune}');\">{$lang->prune_threads_and_posts}</a>", array("class" => "align_center"));
$table->construct_row();
}

if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_banned_users, array("colspan" => "6"));
$table->construct_row();
}
$table->output($lang->banned_accounts);
echo $pagination;

 

$form = new Form("index.php?module=user-banning", "post");
if($errors)


$form = new Form("index.php?module=user-banning", "post");
if($errors)

Zeile 545Zeile 465
	{
if($time != "---")
{

	{
if($time != "---")
{

			$friendly_time = my_date("D, jS M Y @ g:ia", ban_date2timestamp($time));

			$friendly_time = my_date("D, jS M Y @ {$mybb->settings['timeformat']}", ban_date2timestamp($time));

			$period = "{$period} ({$friendly_time})";
}
$length_list[$time] = $period;

			$period = "{$period} ({$friendly_time})";
}
$length_list[$time] = $period;

Zeile 598Zeile 518
	</script>';

$buttons[] = $form->generate_submit_button($lang->ban_user);

	</script>';

$buttons[] = $form->generate_submit_button($lang->ban_user);

	$buttons[] = $form->generate_submit_button($lang->search_user, array('name' => 'search'));

	$buttons[] = $form->generate_submit_button($lang->search_for_a_user, array('name' => 'search'));

	$form->output_submit_wrapper($buttons);
$form->end();

	$form->output_submit_wrapper($buttons);
$form->end();

 

echo '<br />';

$table = new Table;
$table->construct_header($lang->user);
$table->construct_header($lang->ban_lifts_on, array("class" => "align_center", "width" => 150));
$table->construct_header($lang->time_left, array("class" => "align_center", "width" => 150));
$table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 2, "width" => 200));
$table->construct_header($lang->moderation, array("class" => "align_center", "colspan" => 1, "width" => 200));

// Fetch bans
$query = $db->query("
SELECT b.*, a.username AS adminuser, u.username
FROM ".TABLE_PREFIX."banned b
LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users a ON (b.admin=a.uid)
{$where_sql_full}
ORDER BY dateline DESC
LIMIT {$start}, {$per_page}
");

// Get the banned users
while($ban = $db->fetch_array($query))
{
$profile_link = build_profile_link(htmlspecialchars_uni($ban['username']), $ban['uid'], "_blank");
$ban_date = my_date($mybb->settings['dateformat'], $ban['dateline']);
if($ban['lifted'] == 'perm' || $ban['lifted'] == '' || $ban['bantime'] == 'perm' || $ban['bantime'] == '---')
{
$ban_period = $lang->permenantly;
$time_remaining = $lifts_on = $lang->na;
}
else
{
$ban_period = $lang->for." ".$ban_times[$ban['bantime']];

$remaining = $ban['lifted']-TIME_NOW;
$time_remaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";

if($remaining < 3600)
{
$time_remaining = "<span style=\"color: red;\">{$time_remaining}</span>";
}
else if($remaining < 86400)
{
$time_remaining = "<span style=\"color: maroon;\">{$time_remaining}</span>";
}
else if($remaining < 604800)
{
$time_remaining = "<span style=\"color: green;\">{$time_remaining}</span>";
}

$lifts_on = my_date($mybb->settings['dateformat'], $ban['lifted']);
}

if(!$ban['adminuser'])
{
if($ban['admin'] == 0)
{
$ban['adminuser'] = $lang->mybb_engine;
}
else
{
$ban['adminuser'] = $ban['admin'];
}
}

$table->construct_cell($lang->sprintf($lang->bannedby_x_on_x, $profile_link, htmlspecialchars_uni($ban['adminuser']), $ban_date, $ban_period));
$table->construct_cell($lifts_on, array("class" => "align_center"));
$table->construct_cell($time_remaining, array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&amp;action=edit&amp;uid={$ban['uid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&amp;action=lift&amp;uid={$ban['uid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_lift_ban}');\">{$lang->lift}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&amp;action=prune&amp;uid={$ban['uid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_prune}');\">{$lang->prune_threads_and_posts}</a>", array("class" => "align_center"));
$table->construct_row();
}

if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_banned_users, array("colspan" => "6"));
$table->construct_row();
}
$table->output($lang->banned_accounts);
echo $pagination;


$page->output_footer();
}


$page->output_footer();
}