1
0
Fork 0
forked from CRSS/Website
Website/index.php

22 lines
437 B
PHP
Raw Normal View History

2023-09-14 17:33:54 +00:00
<?php
2023-09-15 15:10:03 +00:00
global $twig;
2023-09-14 17:33:54 +00:00
require_once '_config.php';
2023-09-15 15:10:03 +00:00
session_start();
2023-09-15 14:47:56 +00:00
2023-09-15 15:28:11 +00:00
if(isset($_SESSION['user']))
$twig->addGlobal('user', $_SESSION['user']);
2023-09-15 14:47:56 +00:00
switch ($_SERVER['REQUEST_URI']) {
case "/":
2023-09-15 15:28:11 +00:00
echo $twig->render('index.twig');
2023-09-15 14:47:56 +00:00
break;
case "/nations":
2023-09-15 15:28:11 +00:00
echo $twig->render('nations.twig');
2023-09-15 14:47:56 +00:00
break;
default:
http_response_code(404);
2023-09-15 15:28:11 +00:00
echo $twig->render('404.twig');
2023-09-15 14:47:56 +00:00
break;
}