mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Use 4 spaces to indent PHP files.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -1,26 +1,22 @@
|
||||
<?php
|
||||
require_once "func.php";
|
||||
require_once('auth.php');
|
||||
|
||||
require_once "func.php";
|
||||
|
||||
require_once('auth.php');
|
||||
|
||||
// Authentication checks
|
||||
if (!isset($api)) {
|
||||
if (isset($_POST['token'])) {
|
||||
check_cors();
|
||||
check_csrf($_POST['token']);
|
||||
} else {
|
||||
log_and_die('Not allowed (login session invalid or expired, please relogin on the Pi-hole dashboard)!');
|
||||
}
|
||||
// Authentication checks
|
||||
if (!isset($api)) {
|
||||
if (isset($_POST['token'])) {
|
||||
check_cors();
|
||||
check_csrf($_POST['token']);
|
||||
} else {
|
||||
log_and_die('Not allowed (login session invalid or expired, please relogin on the Pi-hole dashboard)!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch ($_POST['action'])
|
||||
{
|
||||
case 'get': echo json_encode(echoCustomDNSEntries()); break;
|
||||
case 'add': echo json_encode(addCustomDNSEntry()); break;
|
||||
case 'delete': echo json_encode(deleteCustomDNSEntry()); break;
|
||||
default:
|
||||
die("Wrong action");
|
||||
}
|
||||
switch ($_POST['action']) {
|
||||
case 'get': echo json_encode(echoCustomDNSEntries()); break;
|
||||
case 'add': echo json_encode(addCustomDNSEntry()); break;
|
||||
case 'delete': echo json_encode(deleteCustomDNSEntry()); break;
|
||||
default:
|
||||
die("Wrong action");
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user