<?php
$root = __DIR__;

$multipage = [
    "intro" => "pages/intro.php",
    "check" => "pages/check.php",
    "connect" => "pages/connect.php",
    "erronously-connect" => "pages/erronously-connect.php",
    "search" => "pages/search.php",
];

include("util/database-functions.php");

$page = (isset($_GET['page'])) ? $_GET['page'] : "intro";
if (isset($multipage[$page])) {
    $file = $multipage[$page];
} else {
    $file = "pages/404.php";
}
?>
<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Example stylechooser</title>
        <link href="<?=$stylesheet?>" rel="stylesheet">
    </head>
    <body>
        <aside><?php include("util/aside.php"); ?></aside>
        <main>
            <article>
                <?php include("$file"); ?>
            </article>
        </main>
    </body>
</html>
