Inizio refactoring del layout delle cartelle del progetto in vista della conclusione.
Layout delle cartelle quasi definitivo
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$route = [
|
||||
'start' => 'fase1.html',
|
||||
'mid' => 'istruzioniFase2.html',
|
||||
'sep' => 'fase2.html',
|
||||
'end' => 'risultatiFinali.html',
|
||||
'leaderboard' => 'classifica.php',
|
||||
'error' => 'error.html'
|
||||
];
|
||||
$p = $_GET['pagina'] ?? 'start';
|
||||
if (!array_key_exists($p, $route)) {
|
||||
http_response_code(404);
|
||||
$p = 'error';
|
||||
}
|
||||
include $__DIR__ . '/pages/' . $route[$p];
|
||||
?>
|
||||
Reference in New Issue
Block a user