mirror of
https://github.com/pi-hole/web.git
synced 2026-04-23 18:29:43 +01:00
Merge branch 'devel' into new/mac_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
require_once "scripts/pi-hole/php/FTL.php";
|
||||
require "scripts/pi-hole/php/theme.php";
|
||||
$scriptname = basename($_SERVER['SCRIPT_FILENAME']);
|
||||
$hostname = gethostname() ? gethostname() : "";
|
||||
|
||||
check_cors();
|
||||
|
||||
@@ -39,7 +40,7 @@
|
||||
{
|
||||
// $output could be either 4-5 digits or 2-3, and we only divide by 1000 if it's 4-5
|
||||
// ex. 39007 vs 39
|
||||
$celsius = intVal($output);
|
||||
$celsius = intval($output);
|
||||
|
||||
// If celsius is greater than 1 degree and is in the 4-5 digit format
|
||||
if($celsius > 1000) {
|
||||
@@ -47,22 +48,6 @@
|
||||
$celsius *= 1e-3;
|
||||
}
|
||||
|
||||
$kelvin = $celsius + 273.15;
|
||||
$fahrenheit = ($celsius*9./5)+32.0;
|
||||
|
||||
if(isset($setupVars['TEMPERATUREUNIT']))
|
||||
{
|
||||
$temperatureunit = $setupVars['TEMPERATUREUNIT'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$temperatureunit = "C";
|
||||
}
|
||||
// Override temperature unit setting if it is changed via Settings page
|
||||
if(isset($_POST["tempunit"]))
|
||||
{
|
||||
$temperatureunit = $_POST["tempunit"];
|
||||
}
|
||||
// Get user-defined temperature limit if set
|
||||
if(isset($setupVars['TEMPERATURE_LIMIT']))
|
||||
{
|
||||
@@ -105,7 +90,7 @@
|
||||
if(count($expl) == 2)
|
||||
{
|
||||
// remove " kB" from the end of the string and make it an integer
|
||||
$meminfo[$expl[0]] = intVal(substr($expl[1],0, -3));
|
||||
$meminfo[$expl[0]] = intval(substr($expl[1],0, -3));
|
||||
}
|
||||
}
|
||||
$memory_used = $meminfo["MemTotal"]-$meminfo["MemFree"]-$meminfo["Buffers"]-$meminfo["Cached"];
|
||||
@@ -175,19 +160,15 @@
|
||||
* Please see LICENSE file for your rights under this license. -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php if ($darkmode) { ?>
|
||||
<style>
|
||||
html { background-color: black; }
|
||||
</style>
|
||||
<?php } ?>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https://api.github.com; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'">
|
||||
<title>Pi-hole<?php if (gethostname()) {echo " - ", gethostname();} ?></title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; base-uri 'none'; child-src 'self'; form-action 'self'; frame-src 'self'; img-src 'self'; manifest-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'">
|
||||
<!-- Usually browsers proactively perform domain name resolution on links that the user may choose to follow. We disable DNS prefetching here -->
|
||||
<meta http-equiv="x-dns-prefetch-control" content="off">
|
||||
<meta http-equiv="cache-control" content="max-age=60,private">
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Pi-hole<?php echo $hostname ? " - " . $hostname : "" ?></title>
|
||||
|
||||
<link rel="apple-touch-icon" href="img/favicons/apple-touch-icon.png" sizes="180x180">
|
||||
<link rel="icon" href="img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
|
||||
@@ -199,53 +180,48 @@
|
||||
<meta name="msapplication-TileImage" content="img/favicons/mstile-150x150.png">
|
||||
<meta name="theme-color" content="#367fa9">
|
||||
|
||||
<?php if ($darkmode) { ?>
|
||||
<style>
|
||||
html { background-color: #000; }
|
||||
</style>
|
||||
<?php } ?>
|
||||
<link rel="stylesheet" href="style/vendor/SourceSansPro/SourceSansPro.css">
|
||||
<link rel="stylesheet" href="style/vendor/bootstrap/css/bootstrap.min.css">
|
||||
|
||||
<link rel="stylesheet" href="style/vendor/font-awesome-5.11.2/css/all.min.css">
|
||||
|
||||
<link rel="stylesheet" href="style/vendor/dataTables.bootstrap.min.css">
|
||||
<link rel="stylesheet" href="style/vendor/daterangepicker.css">
|
||||
|
||||
<link rel="stylesheet" href="style/vendor/font-awesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="style/vendor/datatables.min.css">
|
||||
<link rel="stylesheet" href="style/vendor/daterangepicker.min.css">
|
||||
<link rel="stylesheet" href="style/vendor/AdminLTE.min.css">
|
||||
<link rel="stylesheet" href="style/vendor/animate.css">
|
||||
<link rel="stylesheet" href="style/vendor/select2.min.css">
|
||||
|
||||
<?php if (in_array($scriptname, array("groups.php", "groups-adlists.php", "groups-clients.php", "groups-domains.php"))){ ?>
|
||||
<link rel="stylesheet" href="style/vendor/animate.min.css">
|
||||
<link rel="stylesheet" href="style/vendor/bootstrap-select.min.css">
|
||||
<link rel="stylesheet" href="style/vendor/bootstrap-toggle.min.css">
|
||||
<?php } ?>
|
||||
<link rel="stylesheet" href="style/pi-hole.css">
|
||||
<link rel="stylesheet" href="style/themes/<?php echo $theme; ?>.css">
|
||||
<noscript><link rel="stylesheet" href="style/vendor/js-warn.css"></noscript>
|
||||
|
||||
<script src="scripts/vendor/jquery.min.js"></script>
|
||||
<script src="scripts/vendor/jquery-ui.min.js"></script>
|
||||
<script src="style/vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="scripts/vendor/adminlte.min.js"></script>
|
||||
<script src="scripts/vendor/bootstrap-notify.min.js"></script>
|
||||
<script src="scripts/vendor/select2.min.js"></script>
|
||||
|
||||
<?php if(in_array($scriptname, array("groups.php", "groups-clients.php", "groups-domains.php", "groups-adlists.php"))){ ?>
|
||||
<script src="style/vendor/bootstrap/js/bootstrap-select.min.js"></script>
|
||||
<link rel="stylesheet" href="style/vendor/bootstrap/css/bootstrap-select.min.css">
|
||||
<script src="style/vendor/bootstrap/js/bootstrap-toggle.min.js"></script>
|
||||
<link rel="stylesheet" href="style/vendor/bootstrap/css/bootstrap-toggle.min.css">
|
||||
<?php } ?>
|
||||
|
||||
<script src="scripts/vendor/jquery.dataTables.min.js"></script>
|
||||
<script src="scripts/vendor/dataTables.bootstrap.min.js"></script>
|
||||
<script src="scripts/vendor/datatables.min.js"></script>
|
||||
<script src="scripts/vendor/moment.min.js"></script>
|
||||
<script src="scripts/vendor/Chart.min.js"></script>
|
||||
<script src="scripts/vendor/iCheck.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="style/vendor/iCheck/<?php echo $checkbox_theme_name;?>/<?php echo $checkbox_theme_variant;?>.css">
|
||||
<link rel="stylesheet" href="style/pi-hole.css">
|
||||
<link rel="stylesheet" href="style/themes/<?php echo $theme; ?>.css">
|
||||
</head>
|
||||
<body class="hold-transition sidebar-mini <?php if($boxedlayout){ ?>layout-boxed<?php } ?>">
|
||||
<noscript>
|
||||
<!-- JS Warning -->
|
||||
<div>
|
||||
<input type="checkbox" id="js-hide">
|
||||
<div class="js-warn" id="js-warn-exit"><h1>JavaScript Is Disabled</h1><p>JavaScript is required for the site to function.</p>
|
||||
<p>To learn how to enable JavaScript click <a href="https://www.enable-javascript.com/" rel="noopener" target="_blank">here</a></p><label for="js-hide">Close</label>
|
||||
<noscript>
|
||||
<!-- JS Warning -->
|
||||
<div>
|
||||
<input type="checkbox" id="js-hide">
|
||||
<div class="js-warn" id="js-warn-exit"><h1>JavaScript Is Disabled</h1><p>JavaScript is required for the site to function.</p>
|
||||
<p>To learn how to enable JavaScript click <a href="https://www.enable-javascript.com/" rel="noopener" target="_blank">here</a></p><label for="js-hide">Close</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /JS Warning -->
|
||||
</noscript>
|
||||
<!-- /JS Warning -->
|
||||
</noscript>
|
||||
<?php
|
||||
if($auth) {
|
||||
echo "<div id=\"token\" hidden>$token</div>";
|
||||
@@ -253,37 +229,42 @@ if($auth) {
|
||||
?>
|
||||
|
||||
<!-- Send token to JS -->
|
||||
<div id="checkbox_theme" hidden><?php echo $checkbox_theme_name; ?><?php if($checkbox_theme_name !== $checkbox_theme_variant){ echo "-$checkbox_theme_variant"; } ?></div>
|
||||
<div id="enableTimer" hidden><?php if(file_exists("../custom_disable_timer")){ echo file_get_contents("../custom_disable_timer"); } ?></div>
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<!-- Logo -->
|
||||
<a href="index.php" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini">P<b>h</b></span>
|
||||
<span class="logo-mini">P<strong>h</strong></span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg">Pi-<b>hole</b></span>
|
||||
<span class="logo-lg">Pi-<strong>hole</strong></span>
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
|
||||
<a href="#" class="sidebar-toggle fa5" data-toggle="push-menu" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
</a>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a style="pointer-events:none;">
|
||||
<span class="hidden-xs hidden-sm">hostname:</span>
|
||||
<code><?php echo gethostname(); ?></code>
|
||||
<li id="pihole-diagnosis" class="hidden">
|
||||
<a href="messages.php">
|
||||
<i class="fa fa-exclamation-triangle"></i>
|
||||
<span class="label label-warning" id="pihole-diagnosis-count"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li<?php echo !$hostname ? ' class="hidden"' : "" ?>>
|
||||
<p class="navbar-text">
|
||||
<span class="hidden-xs hidden-sm">hostname:</span>
|
||||
<code><?php echo $hostname; ?></code>
|
||||
</p>
|
||||
</li>
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
<img src="img/logo.svg" class="user-image" alt="Pi-hole logo" style="border-radius: 0" width="25" height="25">
|
||||
<span class="hidden-xs">Pi-hole</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" style="right:0">
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
<img src="img/logo.svg" alt="Pi-hole Logo" style="border: 0" width="90" height="90">
|
||||
@@ -294,17 +275,19 @@ if($auth) {
|
||||
</li>
|
||||
<!-- Menu Body -->
|
||||
<li class="user-body">
|
||||
<div class="col-xs-4 text-center">
|
||||
<a class="btn-link" href="https://github.com/pi-hole" rel="noopener" target="_blank">GitHub</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a class="btn-link" href="https://pi-hole.net/" rel="noopener" target="_blank">Website</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a class="btn-link" href="https://github.com/pi-hole/pi-hole/releases" rel="noopener" target="_blank">Updates</a>
|
||||
</div>
|
||||
<div class="col-xs-12 text-center" id="sessiontimer">
|
||||
<b>Session is valid for <span id="sessiontimercounter"><?php if($auth && strlen($pwhash) > 0){echo $maxlifetime;}else{echo "0";} ?></span></b>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 text-center">
|
||||
<a class="btn-link" href="https://github.com/pi-hole" rel="noopener" target="_blank">GitHub</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a class="btn-link" href="https://pi-hole.net/" rel="noopener" target="_blank">Website</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a class="btn-link" href="https://github.com/pi-hole/pi-hole/releases" rel="noopener" target="_blank">Updates</a>
|
||||
</div>
|
||||
<div id="sessiontimer" class="col-xs-12 text-center">
|
||||
<strong>Session is valid for <span id="sessiontimercounter"><?php if($auth && strlen($pwhash) > 0){echo $maxlifetime;}else{echo "0";} ?></span></strong>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- Menu Footer -->
|
||||
@@ -329,32 +312,32 @@ if($auth) {
|
||||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="img/logo.svg" class="img-responsive" alt="Pi-hole logo" style="display: table; table-layout: fixed; height: 67px;">
|
||||
<img src="img/logo.svg" alt="Pi-hole logo" width="45" height="67" style="height: 67px;">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>Status</p>
|
||||
<?php
|
||||
$pistatus = pihole_execute('status web');
|
||||
if(isset($pistatus[0])) {
|
||||
if (isset($pistatus[0])) {
|
||||
$pistatus = $pistatus[0];
|
||||
} else {
|
||||
$pistatus = null;
|
||||
}
|
||||
if ($pistatus === "1") {
|
||||
echo '<a id="status"><i class="fa fa-circle text-green-light"></i> Active</a>';
|
||||
echo '<span id="status"><i class="fa fa-circle text-green-light"></i> Active</span>';
|
||||
} elseif ($pistatus === "0") {
|
||||
echo '<a id="status"><i class="fa fa-circle text-red"></i> Offline</a>';
|
||||
echo '<span id="status"><i class="fa fa-circle text-red"></i> Offline</span>';
|
||||
} elseif ($pistatus === "-1") {
|
||||
echo '<a id="status"><i class="fa fa-circle text-red"></i> DNS service not running</a>';
|
||||
echo '<span id="status"><i class="fa fa-circle text-red"></i> DNS service not running</span>';
|
||||
} else {
|
||||
echo '<a id="status"><i class="fa fa-circle text-orange"></i> Unknown</a>';
|
||||
echo '<span id="status"><i class="fa fa-circle text-orange"></i> Unknown</span>';
|
||||
}
|
||||
|
||||
// CPU Temp
|
||||
if($FTL)
|
||||
{
|
||||
if ($celsius >= -273.15) {
|
||||
echo "<a id=\"temperature\"><i class=\"fa fa-fire ";
|
||||
echo "<span id=\"temperature\"><i class=\"fa fa-fire ";
|
||||
if ($celsius > $temperaturelimit) {
|
||||
echo "text-red";
|
||||
}
|
||||
@@ -362,30 +345,17 @@ if($auth) {
|
||||
{
|
||||
echo "text-vivid-blue";
|
||||
}
|
||||
echo "\"></i> Temp: ";
|
||||
if($temperatureunit === "F")
|
||||
{
|
||||
echo round($fahrenheit,1) . " °F";
|
||||
}
|
||||
elseif($temperatureunit === "K")
|
||||
{
|
||||
echo round($kelvin,1) . " K";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo round($celsius,1) . " °C";
|
||||
}
|
||||
echo "</a>";
|
||||
?>"\"></i> Temp: <span id="rawtemp" hidden><?php echo $celsius;?></span><span id="tempdisplay"></span><?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a id=\"temperature\"><i class="fa fa-circle text-red"></i> FTL offline</a>';
|
||||
echo '<span id=\"temperature\"><i class="fa fa-circle text-red"></i> FTL offline</span>';
|
||||
}
|
||||
?>
|
||||
<br/>
|
||||
<?php
|
||||
echo "<a title=\"Detected $nproc cores\"><i class=\"fa fa-circle ";
|
||||
echo "<span title=\"Detected $nproc cores\"><i class=\"fa fa-circle ";
|
||||
if ($loaddata[0] > $nproc) {
|
||||
echo "text-red";
|
||||
}
|
||||
@@ -393,11 +363,11 @@ if($auth) {
|
||||
{
|
||||
echo "text-green-light";
|
||||
}
|
||||
echo "\"></i> Load: " . $loaddata[0] . " " . $loaddata[1] . " ". $loaddata[2] . "</a>";
|
||||
echo "\"></i> Load: " . $loaddata[0] . " " . $loaddata[1] . " ". $loaddata[2] . "</span>";
|
||||
?>
|
||||
<br/>
|
||||
<?php
|
||||
echo "<a><i class=\"fa fa-circle ";
|
||||
echo "<span><i class=\"fa fa-circle ";
|
||||
if ($memory_usage > 0.75 || $memory_usage < 0.0) {
|
||||
echo "text-red";
|
||||
}
|
||||
@@ -407,11 +377,11 @@ if($auth) {
|
||||
}
|
||||
if($memory_usage > 0.0)
|
||||
{
|
||||
echo "\"></i> Memory usage: " . sprintf("%.1f",100.0*$memory_usage) . " %</a>";
|
||||
echo "\"></i> Memory usage: " . sprintf("%.1f",100.0*$memory_usage) . " %</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "\"></i> Memory usage: N/A</a>";
|
||||
echo "\"></i> Memory usage: N/A</span>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -435,7 +405,7 @@ if($auth) {
|
||||
}
|
||||
?>
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
<li class="header">MAIN NAVIGATION</li>
|
||||
<li class="header text-uppercase">Main navigation</li>
|
||||
<!-- Home Page -->
|
||||
<li<?php if($scriptname === "index.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="index.php">
|
||||
@@ -451,25 +421,25 @@ if($auth) {
|
||||
</li>
|
||||
<li class="treeview<?php if($scriptname === "db_queries.php" || $scriptname === "db_lists.php" || $scriptname === "db_graph.php"){ ?> active<?php } ?>">
|
||||
<a href="#">
|
||||
<i class="fa fa-clock"></i> <span>Long-term data</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right" style="padding-right: 5px;"></i>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
<i class="fa fa-clock"></i> <span>Long term data</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li<?php if($scriptname === "db_graph.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="db_graph.php">
|
||||
<i class="fa fa-file-alt"></i> <span>Graphics</span>
|
||||
<i class="fa fa-file-alt"></i> Graphics
|
||||
</a>
|
||||
</li>
|
||||
<li<?php if($scriptname === "db_queries.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="db_queries.php">
|
||||
<i class="fa fa-file-alt"></i> <span>Query Log</span>
|
||||
<i class="fa fa-file-alt"></i> Query Log
|
||||
</a>
|
||||
</li>
|
||||
<li<?php if($scriptname === "db_lists.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="db_lists.php">
|
||||
<i class="fa fa-file-alt"></i> <span>Top Lists</span>
|
||||
<i class="fa fa-file-alt"></i> Top Lists
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -486,64 +456,70 @@ if($auth) {
|
||||
<i class="fa fa-ban"></i> <span>Blacklist</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Local DNS Records -->
|
||||
<li<?php if($scriptname === "dns_records.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="dns_records.php">
|
||||
<i class="fa fa-address-book"></i> <span>Local DNS Records</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Group Management -->
|
||||
<li class="treeview <?php if(in_array($scriptname, array("groups.php", "groups-clients.php", "groups-domains.php", "groups-adlists.php"))){ ?>active<?php } ?>">
|
||||
<li class="treeview<?php if (in_array($scriptname, array("groups.php", "groups-adlists.php", "groups-clients.php", "groups-domains.php"))){ ?> active<?php } ?>">
|
||||
<a href="#">
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right" style="padding-right: 5px;"></i>
|
||||
</span>
|
||||
<i class="fa fa-users-cog"></i> <span>Group Management</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li<?php if($scriptname === "groups.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="groups.php">
|
||||
<i class="fa fa-user-friends"></i> <span>Groups</span>
|
||||
<i class="fa fa-user-friends"></i> Groups
|
||||
</a>
|
||||
</li>
|
||||
<li<?php if($scriptname === "groups-clients.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="groups-clients.php">
|
||||
<i class="fa fa-laptop"></i> <span>Clients</span>
|
||||
<i class="fa fa-laptop"></i> Clients
|
||||
</a>
|
||||
</li>
|
||||
<li<?php if($scriptname === "groups-domains.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="groups-domains.php">
|
||||
<i class="fa fa-list"></i> <span>Domains</span>
|
||||
<i class="fa fa-list"></i> Domains
|
||||
</a>
|
||||
</li>
|
||||
<li<?php if($scriptname === "groups-adlists.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="groups-adlists.php">
|
||||
<i class="fa fa-shield-alt"></i> <span>Adlists</span>
|
||||
<i class="fa fa-shield-alt"></i> Adlists
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- Toggle -->
|
||||
<li id="pihole-disable" class="treeview"<?php if ($pistatus == "0") { ?> hidden="true"<?php } ?>>
|
||||
<li id="pihole-disable" class="treeview"<?php if ($pistatus == "0") { ?> hidden<?php } ?>>
|
||||
<a href="#">
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right" style="padding-right: 5px;"></i>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
<i class="fa fa-stop"></i> <span>Disable <span id="flip-status-disable"></span></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li>
|
||||
<a href="#" id="pihole-disable-permanently">
|
||||
<i class="fa fa-stop"></i> <span>Permanently</span>
|
||||
<a href="#" id="pihole-disable-indefinitely">
|
||||
<i class="fa fa-stop"></i> Indefinitely
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" id="pihole-disable-10s">
|
||||
<i class="fa fa-clock"></i> <span>For 10 seconds</span>
|
||||
<i class="fa fa-clock"></i> For 10 seconds
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" id="pihole-disable-30s">
|
||||
<i class="fa fa-clock"></i> <span>For 30 seconds</span>
|
||||
<i class="fa fa-clock"></i> For 30 seconds
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" id="pihole-disable-5m">
|
||||
<i class="fa fas fa-clock"></i> <span>For 5 minutes</span>
|
||||
<i class="fa fas fa-clock"></i> For 5 minutes
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -554,74 +530,79 @@ if($auth) {
|
||||
</ul>
|
||||
<!-- <a href="#" id="flip-status"><i class="fa fa-stop"></i> <span>Disable</span></a> -->
|
||||
</li>
|
||||
<li id="pihole-enable" class="treeview"<?php if ($pistatus == "1") { ?> hidden="true"<?php } ?>>
|
||||
<a href="#"><i class="fa fa-play"></i> <span id="enableLabel">Enable <span id="flip-status-enable"></span></span></a>
|
||||
<li id="pihole-enable" class="treeview"<?php if ($pistatus == "1") { ?> hidden<?php } ?>>
|
||||
<a href="#">
|
||||
<i class="fa fa-play"></i>
|
||||
<span id="enableLabel">Enable
|
||||
<span id="flip-status-enable"></span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Tools -->
|
||||
<li class="treeview <?php if(in_array($scriptname, array("gravity.php", "queryads.php", "auditlog.php", "taillog.php", "taillog-FTL.php", "debug.php"))){ ?>active<?php } ?>">
|
||||
<li class="treeview<?php if (in_array($scriptname, array("messages.php", "gravity.php", "queryads.php", "auditlog.php", "taillog.php", "taillog-FTL.php", "debug.php", "network.php"))){ ?> active<?php } ?>">
|
||||
<a href="#">
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-down pull-right" style="padding-right: 5px;"></i>
|
||||
</span>
|
||||
<i class="fa fa-folder"></i> <span>Tools</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<!-- Pi-hole diagnosis -->
|
||||
<li<?php if($scriptname === "messages.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="messages.php">
|
||||
<i class="fa fa-stethoscope"></i> Pi-hole diagnosis
|
||||
</a>
|
||||
</li>
|
||||
<!-- Run gravity.sh -->
|
||||
<li<?php if($scriptname === "gravity.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="gravity.php">
|
||||
<i class="fa fa-arrow-circle-down"></i> <span>Update Gravity</span>
|
||||
<i class="fa fa-arrow-circle-down"></i> Update Gravity
|
||||
</a>
|
||||
</li>
|
||||
<!-- Query Lists -->
|
||||
<li<?php if($scriptname === "queryads.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="queryads.php">
|
||||
<i class="fa fa-search"></i> <span>Query Lists</span>
|
||||
<i class="fa fa-search"></i> Query Lists
|
||||
</a>
|
||||
</li>
|
||||
<!-- Audit log -->
|
||||
<li<?php if($scriptname === "auditlog.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="auditlog.php">
|
||||
<i class="fa fa-balance-scale"></i> <span>Audit log</span>
|
||||
<i class="fa fa-balance-scale"></i> Audit log
|
||||
</a>
|
||||
</li>
|
||||
<!-- Tail pihole.log -->
|
||||
<li<?php if($scriptname === "taillog.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="taillog.php">
|
||||
<i class="fa fa-list-ul"></i> <span>Tail pihole.log</span>
|
||||
<i class="fa fa-list-ul"></i> Tail pihole.log
|
||||
</a>
|
||||
</li>
|
||||
<!-- Tail pihole-FTL.log -->
|
||||
<li<?php if($scriptname === "taillog-FTL.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="taillog-FTL.php">
|
||||
<i class="fa fa-list-ul"></i> <span>Tail pihole-FTL.log</span>
|
||||
<i class="fa fa-list-ul"></i> Tail pihole-FTL.log
|
||||
</a>
|
||||
</li>
|
||||
<!-- Generate debug log -->
|
||||
<li<?php if($scriptname === "debug.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="debug.php">
|
||||
<i class="fa fa-ambulance"></i> <span>Generate debug log</span>
|
||||
<i class="fa fa-ambulance"></i> Generate debug log
|
||||
</a>
|
||||
</li>
|
||||
<!-- Network -->
|
||||
<li<?php if($scriptname === "network.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="network.php">
|
||||
<i class="fa fa-network-wired"></i> Network
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- Network -->
|
||||
<li<?php if($scriptname === "network.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="network.php">
|
||||
<i class="fa fa-network-wired"></i> <span>Network</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Settings -->
|
||||
<li<?php if($scriptname === "settings.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="settings.php">
|
||||
<i class="fa fa-cogs"></i> <span>Settings</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Local DNS Records -->
|
||||
<li<?php if($scriptname === "dns_records.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="dns_records.php">
|
||||
<i class="fa fa-address-book"></i> <span>Local DNS Records</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Logout -->
|
||||
<?php
|
||||
// Show Logout button if $auth is set and authorization is required
|
||||
@@ -639,24 +620,22 @@ if($auth) {
|
||||
if(strlen($pwhash) > 0 && !$auth) { ?>
|
||||
<li<?php if($scriptname === "login"){ ?> class="active"<?php } ?>>
|
||||
<a href="index.php?login">
|
||||
<i class="fa far fa-user"></i> <span>Login</span>
|
||||
<i class="fa fa-user"></i> <span>Login</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<!-- Donate -->
|
||||
<li>
|
||||
<a href="https://pi-hole.net/donate/" rel="noopener" target="_blank">
|
||||
<i class="fa-paypal-icon fab fa-paypal"></i> <span>Donate</span>
|
||||
<i class="fab fa-paypal"></i> <span>Donate</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if($auth){ ?>
|
||||
<!-- Help -->
|
||||
<li<?php if($scriptname === "help.php"){ ?> class="active"<?php } ?>>
|
||||
<a href="help.php">
|
||||
<i class="fa fa-question-circle"></i> <span>Help</span>
|
||||
<!-- Docs -->
|
||||
<li>
|
||||
<a href="https://docs.pi-hole.net/" rel="noopener" target="_blank">
|
||||
<i class="fa fa-question-circle"></i> <span>Documentation</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
|
||||
Reference in New Issue
Block a user