mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 18:59:48 +01:00
Make selectable what should be imported from the uploaded archive
This commit is contained in:
@@ -85,14 +85,24 @@ if($_POST["action"] == "in")
|
||||
$zip = new ZipArchive();
|
||||
$x = $zip->open($source);
|
||||
if ($x === true) {
|
||||
$blacklist = process_zip("blacklist.txt");
|
||||
echo exec("sudo pihole -b -q ".implode(" ", $blacklist));
|
||||
if(isset($_POST["blacklist"]))
|
||||
{
|
||||
$blacklist = process_zip("blacklist.txt");
|
||||
exec("sudo pihole -b -q ".implode(" ", $blacklist));
|
||||
}
|
||||
|
||||
$whitelist = process_zip("whitelist.txt");
|
||||
echo exec("sudo pihole -w -q ".implode(" ", $whitelist));
|
||||
if(isset($_POST["whitelist"]))
|
||||
{
|
||||
$whitelist = process_zip("whitelist.txt");
|
||||
echo exec("sudo pihole -w -q ".implode(" ", $whitelist));
|
||||
}
|
||||
|
||||
if(isset($_POST["wildlist"]))
|
||||
{
|
||||
$wildlist = process_zip("wildcardblocking.txt");
|
||||
echo exec("sudo pihole -wild -q ".implode(" ", $wildlist));
|
||||
}
|
||||
|
||||
$wildlist = process_zip("wildcardblocking.txt");
|
||||
echo exec("sudo pihole -wild -q ".implode(" ", $wildlist));
|
||||
$zip->close();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user