db_Select("generic", "gen_ip", "gen_id={$banID}")) { $at = $sql2->db_Fetch(); $banIP = $at['gen_ip']; } } $sql2->db_Delete("generic", "gen_id='{$banID}' "); // Delete from generic table if ($banIP == '') return FALSE; $sql2->db_Delete("banlist", "banlist_ip='{$banIP}'"); // Delete from main banlist return TRUE; } if(isset($_POST['delbanSubmit'])) { $message = ''; $delcount = 0; $spacer = ''; foreach($_POST['fladelete'] as $delete) { $delcount ++; $sql -> db_Delete("generic", "gen_id='{$delete}' "); } if ($delcount) { $message .= FLALAN_3.": ".$delcount; $spacer = '
'; } $bancount = 0; foreach($_POST['flaban'] as $ban) { if($sql -> db_Select("generic", "*", "gen_id={$ban}")) { $at = $sql -> db_Fetch(); if (!$e107->add_ban(4,FLALAN_4,$at['gen_ip'],ADMINID)) { // IP on whitelist (although possibly we shouldn't get to this stage, but check anyway $message .= $spacer.str_replace(FLALAN_18,'--IP--',$at['gen_ip']); $spacer = '
'; } // $banlist_ip = $at['gen_ip']; // $sql->db_Insert("banlist", "'$banlist_ip', '".ADMINID."', '".FLALAN_4."' "); $sql -> db_Delete("generic", "gen_id='{$ban}' "); $bancount ++; } } $message .= $spacer.FLALAN_5.": ".$bancount; } if(e_QUERY == "dabl") { $sql -> db_Select("generic", 'gen_ip,gen_id',"gen_type='auto_banned' "); while ($row = $sql->db_Fetch()) { if (deleteBan($row['gen_id'],$row['gen_ip'])) { $delcount ++; } } $message = FLALAN_17; } // Now display any outstanding auto-banned IP addresses if($sql -> db_Select("generic", "*", "gen_type='auto_banned' ORDER BY gen_datestamp DESC ")) { $abArray = $sql -> db_getList(); $message = FLALAN_15; foreach($abArray as $ab) { $message .= " - ".$ab['gen_ip']; } $message .= "
( ".FLALAN_16." )
"; } if (isset($message)) { $ns->tablerender("", "
".$message."
"); } $gen = new convert; $fla_total = $sql->db_Count("generic", "(*)", "WHERE gen_type='failed_login'"); if(!$sql -> db_Select("generic", "*", "gen_type='failed_login' ORDER BY gen_datestamp DESC LIMIT {$from},{$amount}")) { $text = "
".FLALAN_2."
"; } else { $faArray = $sql -> db_getList('ALL', FALSE, FALSE); $text = "
"; foreach($faArray as $fa) { extract($fa); $host = $e107->get_host_name(getenv($gen_ip)); $text .= " "; } $text .= "
".FLALAN_6." ".FLALAN_7." ".FLALAN_8." ".FLALAN_9."
".$gen->convert_date($gen_datestamp, "forum")." ".str_replace(":::", "
", htmlentities($gen_chardata, ENT_QUOTES, CHARSET))."
".$fa['gen_ip']."
{$host}
".LAN_DELETE."
".LAN_BAN."
".FLALAN_11." - ".FLALAN_12."
".FLALAN_13." - ".FLALAN_14."

"; $parms = $fla_total.",".$amount.",".$from.",".e_SELF.'?'."[FROM].".$amount; $text .= $tp->parseTemplate("{NEXTPREV={$parms}}"); $text .= "
"; } $ns->tablerender(FLALAN_1, $text); require_once("footer.php"); ?>