implemented article composer functionality + interface, login & signup functionality + interface, auth permission functionality reflected in the nav, and determined a unified accent color accessible in dark and light mode

This commit is contained in:
Joshua Ashton
2025-03-25 13:09:05 -06:00
parent c0fc9e9d00
commit 0a27cd1f5c
11 changed files with 624 additions and 53 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
require_once 'functions/init.php';
require_once 'functions/functions.php';
include_once 'functions/account_functions.php';
$msg = '';
// Handle creating a new user.
if (isset($_POST['verify_password'])) {
$msg = create_account($_POST['username'], $_POST['email'], $_POST['password'], $_POST['verify_password'], 4, $_POST['profile_picture_upload']);
if ($msg === true)
header('Location: .');
}
if (isset($_POST['username'])) {
$msg = login($_POST['username'], $_POST['password'], (isset($POST['stay_logged_in']) ? true : false));
if ($msg === true)
header('Location: .');
}
include_once 'components/head.php';
if ($_GET['action'] == 'login')
echo login_form(($msg ? $msg : ''));
else if ($_GET['action'] == 'signup')
echo signup_form(($msg ? $msg : ''));
else if ($_GET['action'] == 'logout')
logout();
include_once 'components/foot.php';