Skip to content

Commit

Permalink
Move require "footer.php" to loginpage.php
Browse files Browse the repository at this point in the history
Signed-off-by: RD WebDesign <[email protected]>
  • Loading branch information
rdwebdesign committed Jul 18, 2022
1 parent 5ffd903 commit e79a1d1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
27 changes: 13 additions & 14 deletions scripts/pi-hole/php/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,18 +671,17 @@ function pidofFTL()
<!-- Main content -->
<section class="content">
<?php
// If password is not equal to the password set
// in the setupVars.conf file, then we skip any
// content and just complete the page. If no
// password is set at all, we keep the current
// behavior: everything is always authorized
// and will be displayed
//
// If auth is required and not set, i.e. no successfully logged in,
// we show the reduced version of the summary (index) page
if(!$auth && (!isset($indexpage) || isset($_GET['login']))){
require "scripts/pi-hole/php/loginpage.php";
require "footer.php";
exit();
}
// If password is not equal to the password set
// in the setupVars.conf file, then we skip any
// content and just complete the page. If no
// password is set at all, we keep the current
// behavior: everything is always authorized
// and will be displayed
//
// If auth is required and not set, i.e. no successfully logged in,
// we show the reduced version of the summary (index) page
if (!$auth && (!isset($indexpage) || isset($_GET['login']))) {
require "scripts/pi-hole/php/loginpage.php";
exit();
}
?>
6 changes: 5 additions & 1 deletion scripts/pi-hole/php/loginpage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Network-wide ad blocking via your own hardware.
*
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */ ?>
* Please see LICENSE file for your rights under this license. */
?>

<div class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2" style="float:none">
<div class="panel panel-default">
Expand Down Expand Up @@ -69,3 +70,6 @@
</div>
</div>
</div>
<?php
require "scripts/pi-hole/php/footer.php";
?>

0 comments on commit e79a1d1

Please sign in to comment.