diff --git a/public/api/get_times.php b/public/api/get_times.php deleted file mode 100644 index 245f5dc..0000000 --- a/public/api/get_times.php +++ /dev/null @@ -1,11 +0,0 @@ -database->conn->prepare($sql); -$stmt->execute(); - - -$app->api([ - "data" => $stmt->fetchAll(PDO::FETCH_ASSOC) -]); \ No newline at end of file diff --git a/public/login.php b/public/login.php index 7a03a04..8075803 100644 --- a/public/login.php +++ b/public/login.php @@ -1,7 +1,8 @@ user->loggedIn) { +if ($app->user->loggedIn) +{ $app->session->flash('Du er allerede pÄlogget'); $app->redirect('index.php'); } diff --git a/public/logout.php b/public/logout.php index 18db648..41f8a83 100644 --- a/public/logout.php +++ b/public/logout.php @@ -3,4 +3,4 @@ $app = require '../app/inc.php'; $app->session->clear(); $app->session->flash('Du har blitt logget av'); -$app->redirect("{$app->config["root_url"]}login.php"); \ No newline at end of file +$app->redirect("login.php"); \ No newline at end of file