Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: banning.php 5557 2011-08-26 14:06:44Z huji $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 26 | Zeile 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 36 | Zeile 42 |
---|
"dateline" => TIME_NOW ); $fid = $db->insert_query("banfilters", $new_filter);
|
"dateline" => TIME_NOW ); $fid = $db->insert_query("banfilters", $new_filter);
|
if($mybb->input['type'] == 1) {
| if($mybb->input['type'] == 1) {
|
$cache->update_bannedips(); } else if($mybb->input['type'] == 3)
| $cache->update_bannedips(); } else if($mybb->input['type'] == 3)
|
Zeile 55 | Zeile 61 |
---|
{ flash_message($lang->success_ip_banned, 'success'); admin_redirect("index.php?module=config-banning");
|
{ flash_message($lang->success_ip_banned, 'success'); admin_redirect("index.php?module=config-banning");
|
} else if($mybb->input['type'] == 2)
| } else if($mybb->input['type'] == 2)
|
{ flash_message($lang->success_username_disallowed, 'success'); admin_redirect("index.php?module=config-banning&type=usernames");
| { flash_message($lang->success_username_disallowed, 'success'); admin_redirect("index.php?module=config-banning&type=usernames");
|
Zeile 114 | Zeile 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") { // Delete the ban filter
| if($mybb->request_method == "post") { // Delete the ban filter
|
Zeile 130 | Zeile 136 |
---|
// Banned IP? Rebuild banned IP cache if($filter['type'] == 1)
|
// Banned IP? Rebuild banned IP cache if($filter['type'] == 1)
|
{
| {
|
$cache->update_bannedips(); } else if($filter['type'] == 3)
| $cache->update_bannedips(); } else if($filter['type'] == 3)
|
Zeile 140 | Zeile 146 |
---|
flash_message($lang->success_ban_deleted, 'success'); admin_redirect("index.php?module=config-banning&type={$type}");
|
flash_message($lang->success_ban_deleted, 'success'); admin_redirect("index.php?module=config-banning&type={$type}");
|
} else {
| } else {
|
$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); } }
|
Zeile 193 | Zeile 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->construct_header($lang->username);
|
$table = new Table; if($mybb->input['type'] == "usernames") { $table->construct_header($lang->username);
|
$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->date_disallowed, array("class" => "align_center", "width" => 200)); $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);
| else if($mybb->input['type'] == "emails") { $table->construct_header($lang->email_address);
|
Zeile 254 | Zeile 265 |
---|
$table->output($title);
$form = new Form("index.php?module=config-banning&action=add", "post", "add");
|
$table->output($title);
$form = new Form("index.php?module=config-banning&action=add", "post", "add");
|
if($errors) { $page->output_inline_error($errors); }
| |
if($mybb->input['type'] == "usernames") {
| if($mybb->input['type'] == "usernames") {
|