This commit is contained in:
2025-03-31 16:56:18 -06:00
parent 86107de595
commit 0022fda157
5 changed files with 4 additions and 7 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<?php <?php
session_start(); session_start();
if ($_SESSION['new-access'] != true) if (!$_SESSION['new-access'])
header('Location: .'); header('Location: .');
include_once('functions.php'); include_once('functions.php');
+1 -1
View File
@@ -20,7 +20,7 @@ if ($_SERVER['HTTP_HOST'] == 'localhost') {
function getHome() function getHome()
{ {
echo '<h1>View Confidential Information</h1>'; echo '<h1>View Confidential Information</h1>';
if ($_SESSION['new-access'] != true) { if (!$_SESSION['new-access']) {
if (isset($_GET['error']) && $_GET['error'] === true) { if (isset($_GET['error']) && $_GET['error'] === true) {
echo ' echo '
<div class="card error"> <div class="card error">
+1 -1
View File
@@ -12,7 +12,7 @@ echo '
function getLogoutButton() function getLogoutButton()
{ {
if ($_SESSION['new-access'] == true) if ($_SESSION['new-access'])
return '<button name="logout" value="true" class="reset">Logout</button>'; return '<button name="logout" value="true" class="reset">Logout</button>';
} }
+1 -1
View File
@@ -1,7 +1,7 @@
<?php <?php
session_start(); session_start();
if ($_SESSION['new-access'] != true) if (!$_SESSION['new-access'])
header('Location: .'); header('Location: .');
echo '<h1>YouTube Video</h1>'; echo '<h1>YouTube Video</h1>';
-3
View File
@@ -1,8 +1,5 @@
<?php <?php
session_start(); session_start();
if ($_SESSION['new-access'] == true) {
$_SESSION['new-access'] = false;
}
require_once 'vendor/autoload.php'; require_once 'vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__); $dotenv = Dotenv\Dotenv::createImmutable(__DIR__);