require_once "bakery/globals.php"; require_once "bakery/launcher.php"; $url = str_replace('index.php', '/', $_SERVER['PHP_SELF']); $url = str_replace($url, '', $_SERVER['REQUEST_URI']); $url = explode('/', $url); $page = array_shift($url); $args = array(); foreach ($url as $val) { $args[] = urldecode($val); } $tools = array("Lineup", "Players", "User", "Teams", "View", "Game", "Login", "Logout", "Profile"); $thePage = $args[0]; if (!empty($thePage) && !in_array($thePage, $tools)) { $th->load($thePage); } else { if (in_array($thePage, $tools)) { if ($thePage == "View") { $th->load("Header"); } $launcher = new Launcher($thePage, $args); $launcher->runTool(); if ($thePage == "View") { $th->load("Footer"); } } else { $th->load("Header"); $th->load("Home"); $th->load("Footer"); } }