test
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
if ($_SESSION['new-access'] !== true)
|
if ($_SESSION['new-access'] != true)
|
||||||
header('Location: .');
|
header('Location: .');
|
||||||
|
|
||||||
include_once('functions.php');
|
include_once('functions.php');
|
||||||
|
|||||||
@@ -19,7 +19,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'] != true) {
|
||||||
if (isset($_GET['error']) && $_GET['error'] === true) {
|
if (isset($_GET['error']) && $_GET['error'] === true) {
|
||||||
echo '
|
echo '
|
||||||
<div class="card error">
|
<div class="card error">
|
||||||
@@ -152,4 +152,3 @@ function update_user_pw($password)
|
|||||||
';
|
';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ echo '
|
|||||||
|
|
||||||
function getLogoutButton()
|
function getLogoutButton()
|
||||||
{
|
{
|
||||||
if ($_SESSION['new-access'] === true)
|
if ($_SESSION['new-access'] == true)
|
||||||
return '<button name="logout" value="true" class="reset">Logout</button>';
|
return '<button name="logout" value="true" class="reset">Logout</button>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET['logout'])) {
|
if (isset($_GET['logout'])) {
|
||||||
$_SESSION['new-access'] = false;
|
$_SESSION['new-access'] = false;
|
||||||
session_destroy();
|
session_destroy();
|
||||||
header('Location: .');
|
header('Location: .');
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
if ($_SESSION['new-access'] !== true)
|
if ($_SESSION['new-access'] != true)
|
||||||
header('Location: .');
|
header('Location: .');
|
||||||
|
|
||||||
echo '<h1>YouTube Video</h1>';
|
echo '<h1>YouTube Video</h1>';
|
||||||
|
|||||||
Reference in New Issue
Block a user