From 509113296cf05380fb70515a3735f0ab3717ce46 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Fri, 12 Aug 2022 17:32:26 -0300 Subject: [PATCH] Move login form to a new page Signed-off-by: RD WebDesign --- api.php | 2 +- api_db.php | 3 +- auditlog.php | 2 +- cname_records.php | 2 +- db_graph.php | 2 +- db_lists.php | 2 +- db_queries.php | 2 +- debug.php | 2 +- dns_records.php | 2 +- gravity.php | 2 +- groups-adlists.php | 5 +- groups-clients.php | 2 +- groups-domains.php | 2 +- groups.php | 2 +- index.php | 2 +- login.php | 98 +++++++ logout.php | 9 + messages.php | 2 +- network.php | 2 +- queries.php | 2 +- queryads.php | 2 +- scripts/pi-hole/js/footer.js | 49 ++-- scripts/pi-hole/php/header.php | 292 ++----------------- scripts/pi-hole/php/header_authenticated.php | 242 +++++++++++++++ scripts/pi-hole/php/password.php | 136 ++++----- scripts/pi-hole/php/sidebar.php | 2 +- settings.php | 2 +- style/pi-hole.css | 56 ++-- style/themes/default-dark.css | 4 + style/themes/default-darker.css | 1 - style/themes/default-light.css | 4 + style/themes/lcars.css | 70 ++--- taillog-FTL.php | 2 +- taillog.php | 2 +- 34 files changed, 561 insertions(+), 450 deletions(-) create mode 100644 login.php create mode 100644 logout.php create mode 100644 scripts/pi-hole/php/header_authenticated.php diff --git a/api.php b/api.php index 7176e243..3801561f 100644 --- a/api.php +++ b/api.php @@ -8,8 +8,8 @@ */ $api = true; -require_once 'scripts/pi-hole/php/FTL.php'; require_once 'scripts/pi-hole/php/password.php'; +require_once 'scripts/pi-hole/php/FTL.php'; require_once 'scripts/pi-hole/php/database.php'; require_once 'scripts/pi-hole/php/auth.php'; check_cors(); diff --git a/api_db.php b/api_db.php index 905b82d7..5612de26 100644 --- a/api_db.php +++ b/api_db.php @@ -8,9 +8,10 @@ */ $api = true; +require 'scripts/pi-hole/php/password.php'; + header('Content-type: application/json'); require 'scripts/pi-hole/php/database.php'; -require 'scripts/pi-hole/php/password.php'; require 'scripts/pi-hole/php/auth.php'; require_once 'scripts/pi-hole/php/func.php'; check_cors(); diff --git a/auditlog.php b/auditlog.php index b1e7cfb3..1358b14e 100644 --- a/auditlog.php +++ b/auditlog.php @@ -8,7 +8,7 @@ * Please see LICENSE file for your rights under this license. */ -require 'scripts/pi-hole/php/header.php'; +require 'scripts/pi-hole/php/header_authenticated.php'; ?> diff --git a/cname_records.php b/cname_records.php index a4bb97e9..4804eb68 100644 --- a/cname_records.php +++ b/cname_records.php @@ -8,7 +8,7 @@ * Please see LICENSE file for your rights under this license. */ -require 'scripts/pi-hole/php/header.php'; +require 'scripts/pi-hole/php/header_authenticated.php'; ?> diff --git a/db_graph.php b/db_graph.php index 9f9be574..6ea41e8d 100644 --- a/db_graph.php +++ b/db_graph.php @@ -8,7 +8,7 @@ * Please see LICENSE file for your rights under this license. */ -require 'scripts/pi-hole/php/header.php'; +require 'scripts/pi-hole/php/header_authenticated.php'; ?> diff --git a/db_lists.php b/db_lists.php index 511f58a8..25e2677a 100644 --- a/db_lists.php +++ b/db_lists.php @@ -8,7 +8,7 @@ * Please see LICENSE file for your rights under this license. */ -require 'scripts/pi-hole/php/header.php'; +require 'scripts/pi-hole/php/header_authenticated.php'; ?> diff --git a/db_queries.php b/db_queries.php index 73e43c88..d08edf29 100644 --- a/db_queries.php +++ b/db_queries.php @@ -8,7 +8,7 @@ * Please see LICENSE file for your rights under this license. */ -require 'scripts/pi-hole/php/header.php'; +require 'scripts/pi-hole/php/header_authenticated.php'; ?> diff --git a/debug.php b/debug.php index f3472026..b426ee67 100644 --- a/debug.php +++ b/debug.php @@ -8,7 +8,7 @@ * Please see LICENSE file for your rights under this license. */ -require 'scripts/pi-hole/php/header.php'; +require 'scripts/pi-hole/php/header_authenticated.php'; ?>