toDB($_POST['ban_reason']); admin_update($sql -> db_Insert("banlist", "'".$_POST['ban_ip']."', '".ADMINID."', '".$_POST['ban_reason']."'"), 'insert'); unset($ban_ip); } if (isset($_POST['update_ban']) && $_POST['ban_ip'] != "" && strpos($_POST['ban_ip'], ' ') === false) { $_POST['ban_reason'] = $tp->toDB($_POST['ban_reason']); admin_update($sql -> db_Update("banlist", "banlist_ip='".$_POST['ban_ip']."', banlist_admin=".ADMINID.", banlist_reason='".$_POST['ban_reason']."' WHERE banlist_ip='".$_POST['old_ip']."'")); unset($ban_ip); } if ($action == "remove" && isset($_POST['ban_secure'])) { $sql -> db_Delete("generic", "gen_type='failed_login' AND gen_ip='$sub_action'"); admin_update($sql -> db_Delete("banlist", "banlist_ip='$sub_action'"), 'delete'); } if ($action == "edit") { $sql->db_Select("banlist", "*", "banlist_ip='$sub_action'"); $row = $sql->db_Fetch(); extract($row); } else { unset($banlist_ip, $banlist_reason); if (e_QUERY && strpos($_SERVER["HTTP_REFERER"], "userinfo")) { $banlist_ip = $action; } } $text = ""; $text .= "
".BANLAN_5.": {$rdns_warn}
".BANLAN_7.":
". ($action == "edit" ? "" : "")."
"; $text .= "

".BANLAN_13."
"; if(!varsettrue($pref['enable_rdns'])) { $text .= "

".BANLAN_12."
"; } $ns->tablerender(BANLAN_9, $text); if ($action != "edit") { $text = $rs->form_open("post", e_SELF, "ban_form")."
".$rs->form_hidden("ban_secure", "1"); if (!$ban_total = $sql->db_Select("banlist","*","ORDER BY banlist_ip","nowhere")) { $text .= "
".BANLAN_2."
"; } else { $text .= ""; $count = 0; while ($row = $sql->db_Fetch()) { extract($row); $banlist_reason = str_replace("LAN_LOGIN_18", BANLAN_11, $banlist_reason); $text .= "\n"; $count++; } $text .= "
".BANLAN_10." ".LAN_OPTIONS."
$banlist_ip
".BANLAN_7.": $banlist_reason
".$rs->form_button("submit", "main_edit_$count", LAN_EDIT, "onclick=\"document.getElementById('ban_form').action='".e_SELF."?edit-$banlist_ip'\"").$rs->form_button("submit", "main_delete_$count", BANLAN_4, "onclick=\"document.getElementById('ban_form').action='".e_SELF."?remove-$banlist_ip'\"")."
\n"; } $text .= "
".$rs->form_close(); $ns->tablerender(BANLAN_3, $text); } require_once("footer.php"); ?>