mirror of
https://github.com/pi-hole/web.git
synced 2026-06-06 07:55:48 +01:00
Merge branch 'devel' into auth
Conflicts: header.php
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$log = array();
|
||||
$divide = parse_ini_file("/etc/pihole/setupVars.conf")['IPv6_address'] != "" && parse_ini_file("/etc/pihole/setupVars.conf")['IPv4_address'] != "";
|
||||
$divide = parse_ini_file("/etc/pihole/setupVars.conf")['IPV6_ADDRESS'] != "" && parse_ini_file("/etc/pihole/setupVars.conf")['IPV4_ADDRESS'] != "";
|
||||
$hosts = file_exists("/etc/hosts") ? file("/etc/hosts") : array();
|
||||
$log = new \SplFileObject('/var/log/pihole.log');
|
||||
|
||||
|
||||
+19
-4
@@ -37,8 +37,14 @@
|
||||
|
||||
$cmd = "echo $((`cat /sys/class/thermal/thermal_zone0/temp | cut -c1-2`))";
|
||||
$output = shell_exec($cmd);
|
||||
<<<<<<< HEAD
|
||||
$output = str_replace(array("\r\n","\r","\n"),"", $output);
|
||||
|
||||
=======
|
||||
$celsius = str_replace(array("\r\n","\r","\n"),"", $output);
|
||||
$fahrenheit = round(str_replace(["\r\n","\r","\n"],"", $output*9./5)+32);
|
||||
$temperatureunit = parse_ini_file("/etc/pihole/setupVars.conf")['TEMPERATUREUNIT'];
|
||||
>>>>>>> devel
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -176,11 +182,20 @@
|
||||
}
|
||||
|
||||
// CPU Temp
|
||||
if ($output > "45") {
|
||||
echo '<a href="#"><i class="fa fa-fire" style="color:#FF0000"></i> Temp: ' . $output . '</a>';
|
||||
} else {
|
||||
echo '<a href="#"><i class="fa fa-fire" style="color:#3366FF"></i> Temp: ' . $output . '</a>';
|
||||
echo '<a href="#" id="temperature"><i class="fa fa-fire" style="color:';
|
||||
if ($celsius > "45") {
|
||||
echo '#FF0000';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '#3366FF';
|
||||
}
|
||||
echo '"></i> Temp: ';
|
||||
if($temperatureunit != "F")
|
||||
echo $celsius . '°C';
|
||||
else
|
||||
echo $fahrenheit . '°F';
|
||||
echo '</a>';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user