removed old core directory that was in the wrong place

This commit is contained in:
Paul Wilde 2021-08-10 15:53:59 +01:00
parent c2419c36fa
commit 9b0d8c081a

View file

@ -1,44 +0,0 @@
<?php
require ("core.php");
require ("user.php");
require ("responder.php");
require ("errors.php");
class Loader {
public function request_page(){
// Check if user is authenticated and go to the relevant section
if (User::is_authenticated()){
$this->go_to_page(true);
} else {
$this->go_to_page(false);
}
}
public function go_to_page($authenticated) {
switch ($authenticated) {
case false:
require(Core::root_dir()."/public/unauthorized.php");
break;
default:
$p = $this->get_page_name();
if (substr($p,0,6) != "/admin") {
header('Content-Type: application/json'); // <-- header declaration
}
// if($p != "none") {
Core::$CurrentPage = substr($p,1);
require_once(Core::root_dir()."/public/respond.php");
// } else {
// Core::$CurrentPage = "Error";
// require_once(Core::RootDir()."/public/error.php");
// }
break;
}
}
public function get_page_name(){
$uri = Core::get_get_data();
$page = "/none";
if(isset($uri["path"])){
$page = parse_url($uri["path"]);
$page = $page["path"];
}
return $page;
}
}