diff --git a/app/lib/App/Core/AccessControl.php b/app/lib/App/Core/AccessControl.php index 3c608c9..39c667e 100644 --- a/app/lib/App/Core/AccessControl.php +++ b/app/lib/App/Core/AccessControl.php @@ -81,11 +81,11 @@ class AccessControl { if ($this->app->user->loggedIn && $this->app->user->powerLevel >= $powerLevel) { - echo "Authorized!"; + # code... } else { http_response_code(401); $this->app->view("template/header", ["title" => "Ingen tilgang!"]); - $this->app->view("Core/AccessControl/unauthorized"); + $this->app->view("App/Core/AccessControl/unauthorized"); $this->app->view("template/footer"); die(); } diff --git a/app/view/Core/AccessControl/unauthorized.php b/app/view/App/Core/AccessControl/unauthorized.php similarity index 100% rename from app/view/Core/AccessControl/unauthorized.php rename to app/view/App/Core/AccessControl/unauthorized.php diff --git a/app/view/pages/teamtable/index.php b/app/view/pages/teamtable/index.php deleted file mode 100644 index e2f6dbb..0000000 --- a/app/view/pages/teamtable/index.php +++ /dev/null @@ -1,32 +0,0 @@ -

Lagtabell

-
- - - - - - - - - - - - - '; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ''; - } - ?> -
#NavnBedriftKortnummerLederTelefonDeltagereRunderBestetid
" . $i . "" . htmlspecialchars($team->name) . "" . htmlspecialchars($team->company) . "" . htmlspecialchars($team->cardnumber) . "" . htmlspecialchars($team->leader) . "" . htmlspecialchars($team->phone) . "" . htmlspecialchars($team->participants) . "" . htmlspecialchars($team->rounds) . "" . "Ukjent" . "
\ No newline at end of file diff --git a/app/view/template/header.php b/app/view/template/header.php index 841fa66..251f607 100644 --- a/app/view/template/header.php +++ b/app/view/template/header.php @@ -39,7 +39,6 @@ user->loggedIn): ?> diff --git a/public/teamtable/index.php b/public/teamtable/index.php index 9b79f12..b92cbfc 100644 --- a/public/teamtable/index.php +++ b/public/teamtable/index.php @@ -1,10 +1,4 @@ -model('Teamtable'); - -$teams = $model->getAll(); - -$app->view('template/header', ['title' => 'Lagtabell']); -$app->view('pages/teamtable/index', ["teams" => $teams]); -$app->view('template/footer'); \ No newline at end of file +// redirect +$app->redirect('edit/'); \ No newline at end of file