Vergleich admin/modules/config/banning.php - 1.8.25 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 17Zeile 17
$page->add_breadcrumb_item($lang->banning, "index.php?module=config-banning");

$plugins->run_hooks("admin_config_banning_begin");

$page->add_breadcrumb_item($lang->banning, "index.php?module=config-banning");

$plugins->run_hooks("admin_config_banning_begin");

 

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


if($mybb->input['action'] == "add" && $mybb->request_method == "post")
{
$plugins->run_hooks("admin_config_banning_add");

if(!trim($mybb->input['filter']))


if($mybb->input['action'] == "add" && $mybb->request_method == "post")
{
$plugins->run_hooks("admin_config_banning_add");

if(!trim($mybb->input['filter']))

	{

	{

		$errors[] = $lang->error_missing_ban_input;

		$errors[] = $lang->error_missing_ban_input;

	}


	}


	$query = $db->simple_select("banfilters", "fid", "filter = '".$db->escape_string($mybb->input['filter'])."' AND type = '".$mybb->get_input('type', MyBB::INPUT_INT)."'");
if($db->num_rows($query))

	$query = $db->simple_select("banfilters", "fid", "filter = '".$db->escape_string($mybb->input['filter'])."' AND type = '".$mybb->get_input('type', MyBB::INPUT_INT)."'");
if($db->num_rows($query))

	{

	{

		$errors[] = $lang->error_filter_already_banned;
}


		$errors[] = $lang->error_filter_already_banned;
}


Zeile 44Zeile 46

$plugins->run_hooks("admin_config_banning_add_commit");



$plugins->run_hooks("admin_config_banning_add_commit");


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


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


		// Log admin action
log_admin_action($fid, $mybb->input['filter'], (int)$mybb->input['type']);


		// Log admin action
log_admin_action($fid, $mybb->input['filter'], (int)$mybb->input['type']);


Zeile 96Zeile 98
	$filter = $db->fetch_array($query);

// Does the filter not exist?

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

// Does the filter not exist?

	if(!$filter['fid'])

	if(!$filter)

	{
flash_message($lang->error_invalid_filter, 'error');
admin_redirect("index.php?module=config-banning");

	{
flash_message($lang->error_invalid_filter, 'error');
admin_redirect("index.php?module=config-banning");

Zeile 118Zeile 120
	}

// User clicked no

	}

// User clicked no

	if($mybb->input['no'])
{
admin_redirect("index.php?module=config-banning&type={$type}");

	if($mybb->get_input('no'))
{
admin_redirect("index.php?module=config-banning&type={$type}");

	}

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

	}

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

Zeile 156Zeile 158
{
$plugins->run_hooks("admin_config_banning_start");


{
$plugins->run_hooks("admin_config_banning_start");


	switch($mybb->input['type'])

	switch($mybb->get_input('type'))

	{
case "emails":
$type = "3";

	{
case "emails":
$type = "3";

Zeile 202Zeile 204
	if($errors)
{
$page->output_inline_error($errors);

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

 
	}

$query = $db->simple_select("banfilters", "COUNT(fid) AS filter", "type='{$type}'");
$total_rows = $db->fetch_field($query, "filter");

$pagenum = $mybb->get_input('page', MyBB::INPUT_INT);
if($pagenum)
{
$start = ($pagenum - 1) * 20;
$pages = ceil($total_rows / 20);
if($pagenum > $pages)
{
$start = 0;
$pagenum = 1;
}
}
else
{
$start = 0;
$pagenum = 1;

	}

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

	}

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

Zeile 253Zeile 275
	}
$table->construct_header($lang->controls, array("width" => 1));


	}
$table->construct_header($lang->controls, array("width" => 1));


	$query = $db->simple_select("banfilters", "*", "type='{$type}'", array("order_by" => "filter", "order_dir" => "asc"));

	$query = $db->simple_select("banfilters", "*", "type='{$type}'", array('limit_start' => $start, 'limit' => 20, "order_by" => "filter", "order_dir" => "asc"));

	while($filter = $db->fetch_array($query))
{
$filter['filter'] = htmlspecialchars_uni($filter['filter']);

	while($filter = $db->fetch_array($query))
{
$filter['filter'] = htmlspecialchars_uni($filter['filter']);

Zeile 290Zeile 312
	}

$table->output($title);

	}

$table->output($title);

 

echo "<br />".draw_admin_pagination($pagenum, "20", $total_rows, "index.php?module=config-banning&amp;type={$mybb->get_input('type')}&amp;page={page}");


$page->output_footer();
}


$page->output_footer();
}