Reformat login.php so I can read it

This commit is contained in:
Floorb 2021-07-11 12:50:24 -04:00
parent 9668228914
commit 11ef37f1f2

View file

@ -31,14 +31,12 @@ if (isset($_SESSION['token'])) {
header("Location: ./"); header("Location: ./");
} }
$admin_mail = $email; $admin_mail = $email;
$admin_name = $site_name; $admin_name = $site_name;
// Email information // Email information
$email_info_rows = $conn->query("SELECT * FROM mail WHERE id='1'"); $email_info_rows = $conn->query("SELECT * FROM mail LIMIT 1");
while ($row = $email_info_rows->fetch()) { while ($row = $email_info_rows->fetch()) {
$verification = Trim($row['verification']); $verification = Trim($row['verification']);
$smtp_host = Trim($row['smtp_host']); $smtp_host = Trim($row['smtp_host']);
@ -154,8 +152,8 @@ if (isset($_GET['forgot'])) {
} }
} }
} }
if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Check if logged in // Check if logged in
if (isset($_SESSION['token'])) { if (isset($_SESSION['token'])) {
@ -292,4 +290,3 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
require_once('theme/' . $default_theme . '/header.php'); require_once('theme/' . $default_theme . '/header.php');
require_once('theme/' . $default_theme . '/login.php'); require_once('theme/' . $default_theme . '/login.php');
require_once('theme/' . $default_theme . '/footer.php'); require_once('theme/' . $default_theme . '/footer.php');
?>