mirror of
https://github.com/sorenpeter/timeline.git
synced 2025-12-17 20:07:01 +00:00
Merge branch 'main' of github.com:sorenpeter/timeline
forgot to pull before push!?
This commit is contained in:
commit
566d24017d
2 changed files with 11 additions and 10 deletions
|
|
@ -24,9 +24,11 @@ $title = "Timeline for ".$title;
|
||||||
|
|
||||||
// Redirect guests to Profile view, if url not set til home twtxt.txt
|
// Redirect guests to Profile view, if url not set til home twtxt.txt
|
||||||
|
|
||||||
if (!isset($_SESSION['password']) && ($_GET['url'] != $config['public_txt_url']) ) {
|
if (!isset($_SESSION['password']) && (isset($_GET['url']))) {
|
||||||
header('Location: ./profile');
|
if ($_GET['url'] != $config['public_txt_url']) {
|
||||||
exit();
|
header('Location: ./profile');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once 'partials/header.php';
|
include_once 'partials/header.php';
|
||||||
|
|
@ -43,4 +45,4 @@ if (isset($_SESSION['password'])) {
|
||||||
|
|
||||||
include_once 'partials/timeline.php';
|
include_once 'partials/timeline.php';
|
||||||
|
|
||||||
include_once 'partials/footer.php';
|
include_once 'partials/footer.php';
|
||||||
|
|
|
||||||
|
|
@ -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