<?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.
*
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();
}
-/* done major error checking, output5B header of HTML page */
+/* localization */
+/* needs to be in front of output_header, but we don't know the users preferences at this time,
+ * so we go by the session variable or if language is set
+ */
+if(myisset('language') || isset($_SESSION['language']))
+ {
+ $language = 'en';
+
+ if(myisset('language'))
+ $language = $_REQUEST['language'];
+ else if(isset($_SESSION['language']))
+ $language = $_SESSION['language'];
+
+ switch($language)
+ {
+ case 'de':
+ putenv("LC_ALL=de_DE");
+ setlocale(LC_ALL, "de_DE");
+ // Specify location of translation tables
+ bindtextdomain("edoko", "./locale");
+ // Choose domain
+ textdomain("edoko");
+ break;
+ default:
+ /* do nothing */
+ }
+ }
+
+/* done major error checking, output header of HTML page */
output_header();
/* The rest of the file consists of handling user input.
case 'game':
require './include/game.php';
break;
+ case 'about':
+ require './include/about.php';
+ break;
case 'stats':
if(isset($_SESSION["name"]))
require './include/stats.php';
/* 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();
*End:
*/
?>
-
-