fixed bugs that prevented proper grading.

This commit is contained in:
Joshua Ashton
2025-02-14 05:08:06 -07:00
parent fcbe71e62b
commit 6f63a4afb8
30 changed files with 95 additions and 87 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
session_start();
if ($_SESSION['access'] !== true)
if ($_SESSION['new-access'] !== true)
header('Location: .');
include_once ('functions.php');
+2 -2
View File
@@ -19,7 +19,7 @@ if ($_SERVER['HTTP_HOST'] == 'localhost') {
function getHome()
{
echo '<h1>View Confidential Information</h1>';
if ($_SESSION['access'] !== true) {
if ($_SESSION['new-access'] !== true) {
if (isset($_GET['error']) && $_GET['error'] === true) {
echo '
<div class="card error">
@@ -103,7 +103,7 @@ function authUser()
$row = mysqli_fetch_assoc($results);
if ($row['password'] == $password) {
$_SESSION['access'] = true;
$_SESSION['new-access'] = true;
$_GET['file'] = 'includes/fbi.txt';
$_SESSION['username'] = $username;
} else {
+2 -2
View File
@@ -12,12 +12,12 @@ echo '
function getLogoutButton()
{
if ($_SESSION['access'] === true)
if ($_SESSION['new-access'] === true)
return '<button name="logout" value="true" class="reset">Logout</button>';
}
if (isset($_GET['logout'])) {
$_SESSION['access'] = false;
$_SESSION['new-access'] = false;
session_destroy();
header('Location: .');
}
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
session_start();
if ($_SESSION['access'] !== true)
if ($_SESSION['new-access'] !== true)
header('Location: .');
echo '<h1>YouTube Video</h1>';