<?php
    $pages = json_decode(file_get_contents(__DIR__ ."/../data/pages.json"));
    $query_page = (isset($_REQUEST['page']) && !empty($_REQUEST['page'])) ? $_GET['page'] : "home";
    $page = (isset($pages->$query_page)) ? $pages->$query_page : $pages->{404};
    echo "<var id='query-page'>".$query_page."</var>";

    $list = (isset($_REQUEST['list']) && !empty($_REQUEST['list'])) ? $_GET['list'] : "master";
    echo "<var id='query-list'>".$list."</var>";
?>
