blob: fe703700339ace007c60c627a8417da6b236afe8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php
require_once __DIR__ . '/../app.php';
$url = strtok($_SERVER["REQUEST_URI"], '?');
switch( $url ) {
case("/"):
echo $twig->render('index.html');
break;
case("/about"):
echo $twig->render('about.html');
break;
case("/projects"):
echo $twig->render('projects.html');
break;
case("/tools"):
echo $twig->render('tools.html');
break;
case("/tools/faces"):
case("/tools/faces/"):
echo $twig->render('tools/faces/index.html', [ "faces" => get_faces() ]);
break;
case("/tools/pizza"):
case("/tools/pizza/"):
echo $twig->render('tools/pizza/index.html');
break;
case("/tools/untrack"):
case("/tools/untrack/"):
$_url = "";
if ( isset($_REQUEST['url']) ) {
$_url = htmlspecialchars($_REQUEST['url']);
}
echo $twig->render('tools/untrack/index.html', [ "url" => $_url ]);
break;
default:
http_response_code(404);
echo $twig->render('404.html');
}
|