mirror of
https://github.com/sorenpeter/timeline.git
synced 2025-12-15 19:07:01 +00:00
fix for the "Cannot modify header information - headers already sent by .../header.php" warning on login page
This commit is contained in:
parent
1316fcf6d9
commit
4c92934032
1 changed files with 5 additions and 6 deletions
|
|
@ -3,19 +3,18 @@ require_once("partials/base.php");
|
||||||
|
|
||||||
$title = "Login - ".$title;
|
$title = "Login - ".$title;
|
||||||
|
|
||||||
include 'partials/header.php';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
// Password comes from libs/session.php
|
// Password comes from libs/session.php
|
||||||
if (isset($_SESSION['password'])) {
|
if (isset($_SESSION['password'])) {
|
||||||
if ($_SESSION['password'] == $password) {
|
if ($_SESSION['password'] == $password) {
|
||||||
header("Location: .");
|
header("Location: .");
|
||||||
|
include 'partials/header.php';
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else { ?>
|
else {
|
||||||
|
include 'partials/header.php';
|
||||||
|
?>
|
||||||
<center>
|
<center>
|
||||||
<h2>Enter password or TOTP</h2>
|
<h2>Enter password or TOTP</h2>
|
||||||
<form method="post" action="" id="login_form">
|
<form method="post" action="" id="login_form">
|
||||||
|
|
@ -26,4 +25,4 @@ include 'partials/header.php';
|
||||||
</center>
|
</center>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<!-- PHP: GET FOOTER --><?php include 'partials/footer.php';?>
|
<!-- PHP: GET FOOTER --><?php include 'partials/footer.php';?>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue