Vergleich admin/modules/config/banning.php - 1.8.1 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 27Zeile 27
		$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', 1)."'");

	$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;

	if($db->num_rows($query))
{
$errors[] = $lang->error_filter_already_banned;

Zeile 37Zeile 37
	{
$new_filter = array(
"filter" => $db->escape_string($mybb->input['filter']),

	{
$new_filter = array(
"filter" => $db->escape_string($mybb->input['filter']),

			"type" => $mybb->get_input('type', 1),

			"type" => $mybb->get_input('type', MyBB::INPUT_INT),

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

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

Zeile 54Zeile 54
		}

// Log admin action

		}

// Log admin action

		log_admin_action($fid, $mybb->input['filter'], $mybb->input['type']);

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


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


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

Zeile 92Zeile 92

if($mybb->input['action'] == "delete")
{


if($mybb->input['action'] == "delete")
{

	$query = $db->simple_select("banfilters", "*", "fid='".$mybb->get_input('fid', 1)."'");

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

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

// Does the filter not exist?

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

// Does the filter not exist?

Zeile 131Zeile 131
		$plugins->run_hooks("admin_config_banning_delete_commit");

// Log admin action

		$plugins->run_hooks("admin_config_banning_delete_commit");

// Log admin action

		log_admin_action($filter['fid'], $filter['filter'], $filter['type']);

		log_admin_action($filter['fid'], $filter['filter'], (int)$filter['type']);


// Banned IP? Rebuild banned IP cache
if($filter['type'] == 1)


// Banned IP? Rebuild banned IP cache
if($filter['type'] == 1)

Zeile 203Zeile 203
	{
$page->output_inline_error($errors);
}

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

 

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

if($mybb->input['type'] == "usernames")
{
$form_container = new FormContainer($lang->add_disallowed_username);
$form_container->output_row($lang->username." <em>*</em>", $lang->username_desc, $form->generate_text_box('filter', $mybb->input['filter'], array('id' => 'filter')), 'filter');
$buttons[] = $form->generate_submit_button($lang->disallow_username);
}
else if($mybb->input['type'] == "emails")
{
$form_container = new FormContainer($lang->add_disallowed_email_address);
$form_container->output_row($lang->email_address." <em>*</em>", $lang->email_address_desc, $form->generate_text_box('filter', $mybb->input['filter'], array('id' => 'filter')), 'filter');
$buttons[] = $form->generate_submit_button($lang->disallow_email_address);
}
else
{
$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->end();
echo $form->generate_hidden_field("type", $type);
$form->output_submit_wrapper($buttons);
$form->end();

echo '<br />';


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


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

Zeile 224Zeile 252
		$table->construct_header($lang->last_access, array("class" => "align_center", "width" => 200));
}
$table->construct_header($lang->controls, array("width" => 1));

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





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

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

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

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

		{

		{

			$last_use = my_date('relative', $filter['lastuse']);

			$last_use = my_date('relative', $filter['lastuse']);

		}
else
{

		}
else
{

			$last_use = $lang->never;
}


			$last_use = $lang->never;
}


Zeile 262Zeile 290
	}

$table->output($title);

	}

$table->output($title);


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

if($mybb->input['type'] == "usernames")
{
$form_container = new FormContainer($lang->add_disallowed_username);
$form_container->output_row($lang->username." <em>*</em>", $lang->username_desc, $form->generate_text_box('filter', $mybb->input['filter'], array('id' => 'filter')), 'filter');
$buttons[] = $form->generate_submit_button($lang->disallow_username);
}
else if($mybb->input['type'] == "emails")
{
$form_container = new FormContainer($lang->add_disallowed_email_address);
$form_container->output_row($lang->email_address." <em>*</em>", $lang->email_address_desc, $form->generate_text_box('filter', $mybb->input['filter'], array('id' => 'filter')), 'filter');
$buttons[] = $form->generate_submit_button($lang->disallow_email_address);
}
else
{
$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->end();
echo $form->generate_hidden_field("type", $type);
$form->output_submit_wrapper($buttons);
$form->end();

 

$page->output_footer();
}


$page->output_footer();
}