name = "Circus of the Stranded"; $menu[0]->url = "/rooms/circus"; $menu[1]->name = "Swan Song"; $menu[1]->url = "/rooms/swan"; $menu[2]->name = "Abstract Larceny"; $menu[2]->url = "/rooms/abstract-larceny"; $mainphp = ""; if (preg_match('/\.(?:jpg|png|css|ico|scss|js|ttf|woff)/', $_SERVER["REQUEST_URI"])) { return false; } $obj = NULL; $tryuri = ltrim("$_SERVER[REQUEST_URI]", '/'); $tryuri = strtok($tryuri, "?"); $jsonf = "index.json"; $mainphp = "index.php"; do { $tryf = "$tryuri/index"; if (file_exists("$tryf.json") && $jsonf == "index.json") { $jsonf = "$tryf.json"; } if (file_exists("$tryf.php") && $mainphp == "index.php") { $mainphp = "$tryf.php"; } $tryuri = substr($tryuri, 0, strrpos($tryuri, '/')); } while ($tryuri != "" && (!$obj || $mainphp == "")); $file = file_get_contents($jsonf); $obj = json_decode($file); include "base.php"; ?>