mirror of
https://github.com/pi-hole/web.git
synced 2026-05-01 22:24:08 +01:00
Integrated list managment with admin site
- Made favicon work across pages - No longer needs root access to tee command, still needs root access for gravity.sh and whitelist.sh - Added call to gravity.sh when you remove an item - Moved header and footer into separate files - Moved files from list into the main folder - Got rid of extra dependencies from the old list setup - Added home button to sidebar - Renamed original whitelist to "Old Whitelist" - Added buttons to sidebar for Whitelist and Blacklist
This commit is contained in:
15
php/get.php
Normal file
15
php/get.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
if(!isset($_GET['list']))
|
||||
die();
|
||||
|
||||
$type = $_GET['list'];
|
||||
$rawList = file_get_contents("/etc/pihole/${type}list.txt");
|
||||
$list = explode("\n", $rawList);
|
||||
|
||||
// Get rid of empty lines
|
||||
for($i = sizeof($list)-1; $i >= 0; $i--) {
|
||||
if($list[$i] == "")
|
||||
unset($list[$i]);
|
||||
}
|
||||
|
||||
echo json_encode(array_values($list));
|
||||
Reference in New Issue
Block a user