X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=index.php;h=97028006cca1882ba7769b82d2ba8b6f4c70909d;hp=77a2c5bdc54640c269aeed16b52b28d593c19b65;hb=6206ef89ad9a9a1a541ecb67971815d11f12199b;hpb=64f953012ebda0912a4e92ff3301f09957019477 diff --git a/index.php b/index.php index 77a2c5b..9702800 100644 --- a/index.php +++ b/index.php @@ -8,13 +8,11 @@ error_reporting(E_ALL); */ session_start(); - include_once("config.php"); /* needs to be first in list, since other includes use this */ include_once("./include/output.php"); /* html output only */ include_once("./include/db.php"); /* database only */ include_once("./include/functions.php"); /* the rest */ - /* make sure that user has set all variables in config.php */ config_check(); @@ -28,7 +26,7 @@ if(DB_open()<0) exit(); } -/* done major error checking, output header of HTML page */ +/* done major error checking, output5B header of HTML page */ output_header(); /* The rest of the file consists of handling user input. @@ -62,6 +60,9 @@ switch($action) case 'register': require './include/register.php'; break; + case 'prefs': + require './include/preferences.php'; + break; case 'game': require './include/game.php'; break; @@ -78,6 +79,11 @@ switch($action) require './include/welcome.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_footer(); DB_close();