Fix 579 | Add interface option for administrator email address (Redo of #757)

Signed-off-by: Kevin Kirsche <Kev.Kirsche@gmail.com>
This commit is contained in:
Kevin Kirsche
2018-05-26 15:49:19 -04:00
parent be992a9654
commit 49d6feb4c3
2 changed files with 27 additions and 0 deletions

View File

@@ -452,6 +452,19 @@ function readAdlists()
{
exec('sudo pihole -a -c');
}
$adminemail = trim($_POST["adminemail"]);
if(strlen($adminemail) == 0 || !isset($adminemail))
{
$adminemail = 'noadminemail';
}
elseif(!filter_var($adminemail, FILTER_VALIDATE_EMAIL))
{
$error .= "Administrator email address (".htmlspecialchars($adminemail).") is invalid!<br>";
}
else
{
exec('sudo pihole -a -e '.$adminemail);
}
if(isset($_POST["boxedlayout"]))
{
exec('sudo pihole -a layout boxed');