diff --git a/index.php b/index.php index 33d08c5e..37bf08c3 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,19 @@ $indexpage = true; require "scripts/pi-hole/php/header.php"; require_once("scripts/pi-hole/php/gravity.php"); + + function getinterval() + { + global $piholeFTLConf; + if(isset($piholeFTLConf["MAXLOGAGE"])) + { + return round(floatval($piholeFTLConf["MAXLOGAGE"]), 1); + } + else + { + return "24"; + } + } ?>
@@ -69,7 +82,7 @@
-

Queries over last 24 hours

+

Queries over last hours

diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index 49727926..ed5bf0ba 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -152,6 +152,16 @@ $FTLpid = intval(pidofFTL()); $FTL = ($FTLpid !== 0 ? true : false); + $piholeFTLConfFile = "/etc/pihole/pihole-FTL.conf"; + if(is_readable($piholeFTLConfFile)) + { + $piholeFTLConf = parse_ini_file($piholeFTLConfFile); + } + else + { + $piholeFTLConf = array(); + } + ?>