From 20dd29c322a24a2ef9e3f0e5c269a97acd5d2518 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 1 Mar 2015 16:16:18 +0100 Subject: fix routing --- index.php | 66 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/index.php b/index.php index e3157f4..9b94eca 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,39 @@ if($route == '') include('pages/overview.php'); } +else if(preg_match('@^about$@', $route, $m)) +{ + include('pages/about.php'); +} + +else if(preg_match('@^program.json$@', $route, $m)) +{ + include('pages/program-json.php'); +} + +else if(preg_match('@^feedback$@', $route, $m)) +{ + include('pages/feedback.php'); +} + +else if(preg_match('@^feedback/read$@', $route, $m)) +{ + include('pages/feedback-read.php'); +} + +else if(preg_match('@^relive/([0-9]+)$@', $route, $m)) +{ + $_GET = array( + 'id' => $m[1], + ); + include('pages/relive-player.php'); +} + +else if(preg_match('@^relive$@', $route, $m)) +{ + include('pages/relive.php'); +} + else if(preg_match('@^([^/]+)$@', $route, $m)) { $_GET = array( @@ -50,39 +83,6 @@ else if(preg_match('@^([^/]+)/(sd|audio|slides)/translated$@', $route, $m)) include('pages/room.php'); } -else if(preg_match('@^about$@', $route, $m)) -{ - include('pages/about.php'); -} - -else if(preg_match('@^program.json$@', $route, $m)) -{ - include('pages/program-json.php'); -} - -else if(preg_match('@^feedback$@', $route, $m)) -{ - include('pages/feedback.php'); -} - -else if(preg_match('@^feedback/read$@', $route, $m)) -{ - include('pages/feedback-read.php'); -} - -else if(preg_match('@^relive/([0-9]+)$@', $route, $m)) -{ - $_GET = array( - 'id' => $m[1], - ); - include('pages/relive-player.php'); -} - -else if(preg_match('@^relive$@', $route, $m)) -{ - include('pages/relive.php'); -} - else { include('pages/404.php'); -- cgit v1.2.3