2023-06-30 14:16:33 +02:00
|
|
|
<?php
|
|
|
|
require_once("./libs/Router.php");
|
|
|
|
|
|
|
|
// Display Errors
|
|
|
|
ini_set('display_startup_errors', 1);
|
|
|
|
ini_set('display_errors', 1);
|
|
|
|
error_reporting(-1);
|
|
|
|
|
|
|
|
// Display var_dump
|
|
|
|
#var_dump($_SESSION);
|
|
|
|
|
|
|
|
// Date Time Zone
|
|
|
|
date_default_timezone_set('Europe/Prague');
|
2023-10-24 01:28:16 +02:00
|
|
|
$API_URL = "http://localhost:6060";
|
|
|
|
|
|
|
|
$LOGGEDIN = !false;
|
2023-06-30 14:16:33 +02:00
|
|
|
?>
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="cs">
|
|
|
|
<head>
|
|
|
|
<title>DeguApp</title>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2023-10-24 01:28:16 +02:00
|
|
|
<link href="/css/_general.css" rel="stylesheet">
|
|
|
|
<link href="/css/_variables.css" rel="stylesheet">
|
|
|
|
<link href="/css/nav.css" rel="stylesheet">
|
|
|
|
<link href="/css/home.css" rel="stylesheet">
|
|
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
|
|
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap" rel="stylesheet">
|
2023-06-30 14:16:33 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2023-10-24 01:28:16 +02:00
|
|
|
<header class="f-row nav-wrapper">
|
|
|
|
<div class="">
|
2023-06-30 14:16:33 +02:00
|
|
|
<a href="/">DeguApp</a>
|
|
|
|
</div>
|
2023-10-24 01:28:16 +02:00
|
|
|
<div class="">
|
|
|
|
<?php
|
|
|
|
if(!$LOGGEDIN) {
|
|
|
|
?>
|
2023-06-30 14:16:33 +02:00
|
|
|
<a href="/login">Přihlásit se</a>
|
|
|
|
<a href="/signup">Registrace</a>
|
2023-10-24 01:28:16 +02:00
|
|
|
<?php
|
|
|
|
} else{
|
|
|
|
?>
|
2023-06-30 14:16:33 +02:00
|
|
|
<a href="/add_beer">Přidat pivo</a>
|
|
|
|
<a href="/add_review">Přidat recenzi</a>
|
2023-10-24 01:28:16 +02:00
|
|
|
<?php } ?>
|
2023-06-30 14:16:33 +02:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<section class="main-wrapper">
|
2023-10-24 01:28:16 +02:00
|
|
|
<!-- routing shits -->
|
2023-06-30 14:16:33 +02:00
|
|
|
<?php
|
|
|
|
$R = new Router();
|
|
|
|
$R->route('GET', '/', 'home');
|
|
|
|
$R->route('GET', '/add', 'add');
|
|
|
|
$R->route('GET', '/login', 'login');
|
|
|
|
$R->route('GET', '/signup', 'signup');
|
|
|
|
|
|
|
|
|
|
|
|
$R->route('POST', '/contact/send', 'contact');
|
|
|
|
|
|
|
|
$R = null;
|
|
|
|
?>
|
|
|
|
</section>
|
|
|
|
<footer>
|
|
|
|
<a href="https://git.filiprojek.cz/fr/deguapp">Source</a>
|
|
|
|
<a href="http://filiprojek.cz/">(c) Filip Rojek, 2023</a>
|
|
|
|
</footer>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|