-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
324e69d
commit 21edc2c
Showing
6 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace PeopleHive\Router; | ||
|
||
use Starlight\HTTP\Router; | ||
use Starlight\Session\Session; | ||
|
||
class Authenticated extends Router { | ||
public function register() { | ||
$Auth = new Session(); | ||
if ($Auth->Verify($_SESSION['uuid'].'$'.date('Y-m-d'))) { | ||
$this->GET('/dashboard','/Views/Dashboard.php'); | ||
} else { | ||
$this->GET('/dashboard','/Views/403.php'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
<?php | ||
|
||
use PeopleHive\Router\Main; | ||
use PeopleHive\Router\Authenticated; | ||
|
||
$Main = new Main(); | ||
$Main->register(); | ||
|
||
$Authenticated = new Authenticated(); | ||
$Authenticated->register(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Page not Found - <?= WEBSITE_NAME; ?></title> | ||
<link rel="stylesheet" href="/Assets/CSS/Font.css" type="text/css"> | ||
<link rel="stylesheet" href="/Assets/CSS/Dist.css" type="text/css"> | ||
</head> | ||
<body> | ||
<?php require_once __DIR__ . "/Include/Nav.php"; ?> | ||
|
||
<header class="bg-red-500 nobg"> | ||
<h1>Access Denied</h1> | ||
</header> | ||
|
||
<main> | ||
<p class="text-center"> | ||
You don't have access to the requested page or resource. | ||
</p> | ||
</main> | ||
|
||
<?php require_once __DIR__ . "/Include/Footer.php"; ?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
|
||
var_dump($_SESSION); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters