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:
@@ -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';
|
||||
Reference in New Issue
Block a user