diff --git a/Processes/POST/Login.php b/Processes/POST/Login.php index cc8b38f..8beb321 100644 --- a/Processes/POST/Login.php +++ b/Processes/POST/Login.php @@ -22,7 +22,8 @@ } $Auth = new Session(); - $Auth->Login($info['uuid']); + $Auth->Login($info['uuid'].'$'.date('Y-m-d')); + $_SESSION['uuid'] = $info['uuid']; header('Location: /dashboard'); exit; diff --git a/Router/Authenticated.php b/Router/Authenticated.php new file mode 100644 index 0000000..a3d847a --- /dev/null +++ b/Router/Authenticated.php @@ -0,0 +1,17 @@ +Verify($_SESSION['uuid'].'$'.date('Y-m-d'))) { + $this->GET('/dashboard','/Views/Dashboard.php'); + } else { + $this->GET('/dashboard','/Views/403.php'); + } + } +} \ No newline at end of file diff --git a/Router/router.php b/Router/router.php index 9c93949..b08b70e 100644 --- a/Router/router.php +++ b/Router/router.php @@ -1,6 +1,10 @@ register(); + +$Authenticated = new Authenticated(); +$Authenticated->register(); diff --git a/Views/403.php b/Views/403.php new file mode 100644 index 0000000..375a333 --- /dev/null +++ b/Views/403.php @@ -0,0 +1,23 @@ + + + + Page not Found - <?= WEBSITE_NAME; ?> + + + + + + +
+

Access Denied

+
+ +
+

+ You don't have access to the requested page or resource. +

+
+ + + + \ No newline at end of file diff --git a/Views/Dashboard.php b/Views/Dashboard.php new file mode 100644 index 0000000..010369a --- /dev/null +++ b/Views/Dashboard.php @@ -0,0 +1,3 @@ +