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
session_start();
if ($_SESSION['new-access'] != true)
if (!$_SESSION['new-access'])
header('Location: .');
include_once('functions.php');
+1 -1
View File
@@ -20,7 +20,7 @@ if ($_SERVER['HTTP_HOST'] == 'localhost') {
function getHome()
{
echo '<h1>View Confidential Information</h1>';
if ($_SESSION['new-access'] != true) {
if (!$_SESSION['new-access']) {
if (isset($_GET['error']) && $_GET['error'] === true) {
echo '
<div class="card error">
+1 -1
View File
@@ -12,7 +12,7 @@ echo '
function getLogoutButton()
{
if ($_SESSION['new-access'] == true)
if ($_SESSION['new-access'])
return '<button name="logout" value="true" class="reset">Logout</button>';
}
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
session_start();
if ($_SESSION['new-access'] != true)
if (!$_SESSION['new-access'])
header('Location: .');
echo '<h1>YouTube Video</h1>';
-3
View File
@@ -1,8 +1,5 @@
<?php
session_start();
if ($_SESSION['new-access'] == true) {
$_SESSION['new-access'] = false;
}
require_once 'vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);