mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
+32
@@ -173,6 +173,38 @@ else
|
||||
$data = array_merge($data, $result);
|
||||
}
|
||||
|
||||
if (isset($_GET['topClientsBlocked']) && $auth)
|
||||
{
|
||||
|
||||
if(isset($_GET['topClientsBlocked']))
|
||||
{
|
||||
$number = $_GET['topClientsBlocked'];
|
||||
}
|
||||
|
||||
if(is_numeric($number))
|
||||
{
|
||||
sendRequestFTL("top-clients blocked (".$number.")");
|
||||
}
|
||||
else
|
||||
{
|
||||
sendRequestFTL("top-clients blocked");
|
||||
}
|
||||
|
||||
$return = getResponseFTL();
|
||||
$top_clients = array();
|
||||
foreach($return as $line)
|
||||
{
|
||||
$tmp = explode(" ",$line);
|
||||
if(count($tmp) > 3 && strlen($tmp[3]) > 0)
|
||||
$top_clients[$tmp[3]."|".$tmp[2]] = intval($tmp[1]);
|
||||
else
|
||||
$top_clients[$tmp[2]] = intval($tmp[1]);
|
||||
}
|
||||
|
||||
$result = array('top_sources_blocked' => $top_clients);
|
||||
$data = array_merge($data, $result);
|
||||
}
|
||||
|
||||
if (isset($_GET['getForwardDestinations']) && $auth)
|
||||
{
|
||||
if($_GET['getForwardDestinations'] === "unsorted")
|
||||
|
||||
Reference in New Issue
Block a user