This commit is contained in:
William 2022-01-24 13:31:37 +01:00
parent ae52c686e8
commit 213d8e8eea
3 changed files with 3 additions and 13 deletions

View File

@ -1,11 +0,0 @@
<?php
$app = require '../../app/inc.php';
$sql = 'SELECT * FROM tidtabell';
$stmt = $app->database->conn->prepare($sql);
$stmt->execute();
$app->api([
"data" => $stmt->fetchAll(PDO::FETCH_ASSOC)
]);

View File

@ -1,7 +1,8 @@
<?php <?php
$app = require '../app/inc.php'; $app = require '../app/inc.php';
if ($app->user->loggedIn) { if ($app->user->loggedIn)
{
$app->session->flash('Du er allerede pålogget'); $app->session->flash('Du er allerede pålogget');
$app->redirect('index.php'); $app->redirect('index.php');
} }

View File

@ -3,4 +3,4 @@ $app = require '../app/inc.php';
$app->session->clear(); $app->session->clear();
$app->session->flash('Du har blitt logget av'); $app->session->flash('Du har blitt logget av');
$app->redirect("{$app->config["root_url"]}login.php"); $app->redirect("login.php");