cleanup and sync

This commit is contained in:
2025-03-07 03:57:09 -07:00
parent 551abb66b5
commit 3be02e6768
6 changed files with 190 additions and 49 deletions
+4 -4
View File
@@ -3,7 +3,7 @@
if (!isset($_GET['action']))
header('Location: .');
include_once('includes/functions.php');
include_once ('includes/functions.php');
$action = $_GET['action'];
@@ -16,7 +16,7 @@ switch ($action) {
if (empty($_POST['login_username']) || empty($_POST['login_password']))
header('Location: ' . $error_location . 'empty');
include_once('fields/login_fields.php');
include_once ('fields/login_fields.php');
// If field inputs are invalid, redirect to login with error state.
foreach ($_POST as $field => $value) {
if (!validate($value, $login_fields[$field]['validators']))
@@ -34,7 +34,7 @@ switch ($action) {
unset($_POST['login_password']);
// auth() handles setting $_SESSION variables, user is now OK to proceed to home.php.
// header('Location: ' . $success_location);
header('Location: ' . $success_location);
default:
// code...
break;
@@ -42,7 +42,7 @@ switch ($action) {
function validate($input, $validators)
{
include_once('includes/input_validation.php');
include_once ('includes/input_validation.php');
foreach ($validators as $v) {
switch ($v) {