From 213d8e8eea664d7737410d4157ce8029ba61e434 Mon Sep 17 00:00:00 2001 From: William Date: Mon, 24 Jan 2022 13:31:37 +0100 Subject: [PATCH] Commit --- public/api/get_times.php | 11 ----------- public/login.php | 3 ++- public/logout.php | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 public/api/get_times.php 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