BUGFIX: fix disable of prev/next button in trick selector
[e-DoKo.git] / index.php
index 61b0e3f284aadb42d304c350734cf0ad2c092e24..bbdfeb2654e8c09df856b60cbb00084fefafe876 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright 2006, 2007, 2008, 2009, 2010 Arun Persaud <arun@nubati.net>
+/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arun Persaud <arun@nubati.net>
  *
  *   This file is part of e-DoKo.
  *
@@ -45,7 +45,7 @@ if($DBopen<0)
       echo "Database error, can't connect... Please wait a while and try again. ".
        "If the problem doesn't go away feel free to contact $ADMIN_NAME at $ADMIN_EMAIL.";
     else if ($DBopen == -2)
-      echo "Wrong database version, please update your database using the update.php script.";
+      echo 'Wrong database version, please update your database using the update.php script.';
 
     output_footer();
     exit();
@@ -58,13 +58,12 @@ if($DBopen<0)
 if(myisset('language') || isset($_SESSION['language']))
   {
     $language = 'en';
-    if(isset($_SESSION['language']))
-       $language = $_SESSION['language'];
+
     if(myisset('language'))
-      {
-       $language = $_REQUEST['language'];
-       $_SESSION['language'] = $language; /* overrule preferences */
-      }
+      $language = $_REQUEST['language'];
+    else if(isset($_SESSION['language']))
+      $language = $_SESSION['language'];
+
     switch($language)
       {
       case 'de':
@@ -120,6 +119,9 @@ switch($action)
   case 'game':
     require './include/game.php';
     break;
+  case 'about':
+    require './include/about.php';
+    break;
   case 'stats':
     if(isset($_SESSION["name"]))
       require './include/stats.php';
@@ -136,7 +138,7 @@ switch($action)
 /* ask for login or display login info, needs to go at the end, so that we have the
  * session-variable already set.
  */
-output_status();
+output_navbar();
 
 output_footer();