Vergleich admin/modules/config/banning.php - 1.6.2 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: banning.php 5016 2010-06-12 00:24:02Z RyanGordon $

 * $Id: banning.php 5795 2012-04-19 14:34:52Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 26Zeile 26
	if(!trim($mybb->input['filter']))
{
$errors[] = $lang->error_missing_ban_input;

	if(!trim($mybb->input['filter']))
{
$errors[] = $lang->error_missing_ban_input;

 
	}

$query = $db->simple_select("banfilters", "fid", "filter = '".$db->escape_string($mybb->input['filter'])."' AND type = '".intval($mybb->input['type'])."'");
if($db->num_rows($query))
{
$errors[] = $lang->error_filter_already_banned;

	}

if(!$errors)

	}

if(!$errors)

Zeile 38Zeile 44
		$fid = $db->insert_query("banfilters", $new_filter);

if($mybb->input['type'] == 1)

		$fid = $db->insert_query("banfilters", $new_filter);

if($mybb->input['type'] == 1)

		{

		{

			$cache->update_bannedips();

			$cache->update_bannedips();

 
		}
else if($mybb->input['type'] == 3)
{
$cache->update_bannedemails();

		}

$plugins->run_hooks("admin_config_banning_add_commit");

		}

$plugins->run_hooks("admin_config_banning_add_commit");

Zeile 110Zeile 120
	
// User clicked no
if($mybb->input['no'])

	
// User clicked no
if($mybb->input['no'])

	{
admin_redirect("index.php?module=config-banning&type={$type}");

	{
admin_redirect("index.php?module=config-banning&type={$type}");

	}

if($mybb->request_method == "post")

	}

if($mybb->request_method == "post")

	{

	{

		// Delete the ban filter
$db->delete_query("banfilters", "fid='{$filter['fid']}'");


		// Delete the ban filter
$db->delete_query("banfilters", "fid='{$filter['fid']}'");


Zeile 123Zeile 133

// Log admin action
log_admin_action($filter['fid'], $filter['filter'], $filter['type']);


// Log admin action
log_admin_action($filter['fid'], $filter['filter'], $filter['type']);



 

// Banned IP? Rebuild banned IP cache
if($filter['type'] == 1)
{
$cache->update_bannedips();


// Banned IP? Rebuild banned IP cache
if($filter['type'] == 1)
{
$cache->update_bannedips();

 
		}
else if($filter['type'] == 3)
{
$cache->update_bannedemails();

		}

flash_message($lang->success_ban_deleted, 'success');

		}

flash_message($lang->success_ban_deleted, 'success');

Zeile 139Zeile 152
		$page->output_confirm_action("index.php?module=config-banning&action=delete&fid={$filter['fid']}", $lang->confirm_ban_deletion);
}
}

		$page->output_confirm_action("index.php?module=config-banning&action=delete&fid={$filter['fid']}", $lang->confirm_ban_deletion);
}
}





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

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

Zeile 149Zeile 162
		case "emails":
$type = "3";
$title = $lang->disallowed_email_addresses;

		case "emails":
$type = "3";
$title = $lang->disallowed_email_addresses;

			break;

			break;

		case "usernames":
$type = "2";
$title = $lang->disallowed_usernames;

		case "usernames":
$type = "2";
$title = $lang->disallowed_usernames;

Zeile 159Zeile 172
			$title = $lang->banned_ip_addresses;
$mybb->input['type'] = "ips";
}

			$title = $lang->banned_ip_addresses;
$mybb->input['type'] = "ips";
}





	$page->output_header($title);

$sub_tabs['ips'] = array(
'title' => $lang->banned_ips,
'link' => "index.php?module=config-banning",
'description' => $lang->banned_ips_desc

	$page->output_header($title);

$sub_tabs['ips'] = array(
'title' => $lang->banned_ips,
'link' => "index.php?module=config-banning",
'description' => $lang->banned_ips_desc

	);


	);


	$sub_tabs['users'] = array(
'title' => $lang->banned_accounts,
'link' => "index.php?module=user-banning"

	$sub_tabs['users'] = array(
'title' => $lang->banned_accounts,
'link' => "index.php?module=user-banning"

	);

	);


$sub_tabs['usernames'] = array(
'title' => $lang->disallowed_usernames,
'link' => "index.php?module=config-banning&type=usernames",
'description' => $lang->disallowed_usernames_desc


$sub_tabs['usernames'] = array(
'title' => $lang->disallowed_usernames,
'link' => "index.php?module=config-banning&type=usernames",
'description' => $lang->disallowed_usernames_desc

	);


	);


	$sub_tabs['emails'] = array(
'title' => $lang->disallowed_email_addresses,
'link' => "index.php?module=config-banning&type=emails",

	$sub_tabs['emails'] = array(
'title' => $lang->disallowed_email_addresses,
'link' => "index.php?module=config-banning&type=emails",

Zeile 186Zeile 199
	);

$page->output_nav_tabs($sub_tabs, $mybb->input['type']);

	);

$page->output_nav_tabs($sub_tabs, $mybb->input['type']);

 

if($errors)
{
$page->output_inline_error($errors);
}


$table = new Table;
if($mybb->input['type'] == "usernames")


$table = new Table;
if($mybb->input['type'] == "usernames")

Zeile 195Zeile 213
		$table->construct_header($lang->last_attempted_use, array("class" => "align_center", "width" => 200));
}
else if($mybb->input['type'] == "emails")

		$table->construct_header($lang->last_attempted_use, array("class" => "align_center", "width" => 200));
}
else if($mybb->input['type'] == "emails")

	{

	{

		$table->construct_header($lang->email_address);
$table->construct_header($lang->date_disallowed, array("class" => "align_center", "width" => 200));
$table->construct_header($lang->last_attempted_use, array("class" => "align_center", "width" => 200));

		$table->construct_header($lang->email_address);
$table->construct_header($lang->date_disallowed, array("class" => "align_center", "width" => 200));
$table->construct_header($lang->last_attempted_use, array("class" => "align_center", "width" => 200));

	}

	}

	else
{
$table->construct_header($lang->ip_address);

	else
{
$table->construct_header($lang->ip_address);

Zeile 216Zeile 234
		if($filter['lastuse'] > 0)
{
$last_use = my_date($mybb->settings['dateformat'], $filter['lastuse']).", ".my_date($mybb->settings['timeformat'], $filter['lastuse']);

		if($filter['lastuse'] > 0)
{
$last_use = my_date($mybb->settings['dateformat'], $filter['lastuse']).", ".my_date($mybb->settings['timeformat'], $filter['lastuse']);

		}

		}

		else
{
$last_use = $lang->never;
}

if($filter['dateline'] > 0)

		else
{
$last_use = $lang->never;
}

if($filter['dateline'] > 0)

		{

		{

			$date = my_date($mybb->settings['dateformat'], $filter['dateline']).", ".my_date($mybb->settings['timeformat'], $filter['dateline']);

			$date = my_date($mybb->settings['dateformat'], $filter['dateline']).", ".my_date($mybb->settings['timeformat'], $filter['dateline']);

		}

		}

		else
{
$date = $lang->na;

		else
{
$date = $lang->na;

Zeile 235Zeile 253
		$table->construct_cell($date, array("class" => "align_center"));
$table->construct_cell($last_use, array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-banning&amp;action=delete&amp;fid={$filter['fid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_ban_deletion}');\"><img src=\"styles/{$page->style}/images/icons/delete.gif\" title=\"{$lang->delete}\" alt=\"{$lang->delete}\" /></a>", array("class" => "align_center"));

		$table->construct_cell($date, array("class" => "align_center"));
$table->construct_cell($last_use, array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-banning&amp;action=delete&amp;fid={$filter['fid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_ban_deletion}');\"><img src=\"styles/{$page->style}/images/icons/delete.gif\" title=\"{$lang->delete}\" alt=\"{$lang->delete}\" /></a>", array("class" => "align_center"));

		$table->construct_row();
}


		$table->construct_row();
}


	if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_bans, array("colspan" => 4));

	if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_bans, array("colspan" => 4));

Zeile 247Zeile 265
	$table->output($title);

$form = new Form("index.php?module=config-banning&amp;action=add", "post", "add");

	$table->output($title);

$form = new Form("index.php?module=config-banning&amp;action=add", "post", "add");

	if($errors)
{
$page->output_inline_error($errors);
}

 
	
if($mybb->input['type'] == "usernames")
{

	
if($mybb->input['type'] == "usernames")
{

Zeile 266Zeile 280
	}
else
{

	}
else
{

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

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

		$form_container->output_row($lang->ip_address." <em>*</em>", $lang->ip_address_desc, $form->generate_text_box('filter', $mybb->input['filter'], array('id' => 'filter')), 'filter');
$buttons[] = $form->generate_submit_button($lang->ban_ip_address);
}

		$form_container->output_row($lang->ip_address." <em>*</em>", $lang->ip_address_desc, $form->generate_text_box('filter', $mybb->input['filter'], array('id' => 'filter')), 'filter');
$buttons[] = $form->generate_submit_button($lang->ban_ip_address);
}