X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=index.php;h=d92f4787d9755b5c266faa276f88f8eddd2861b5;hp=76bbc29a55dc115ccc12f7e94f0666c46cea396b;hb=e2d7a3291f85403b4faf6f8be7e30caeefb0c1a3;hpb=880dfb2e715a3770de56fb525f5c90d28a6ccb4c diff --git a/index.php b/index.php index 76bbc29..d92f478 100644 --- a/index.php +++ b/index.php @@ -2,19 +2,17 @@ error_reporting(E_ALL); /* start a session, if it is not already running. - * This way people don't have to log in all the times. + * This way people don't have to log in all the times. * The session variables can also be read out from different * php scripts, so that the code can be easily split up across several files */ 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. @@ -52,11 +50,11 @@ switch($action) require './include/reminder.php'; break; case 'logout': - require './include/logout.php'; + require './include/logout.php'; require './include/welcome.php'; break; case 'login': - require './include/login.php'; + require './include/login.php'; require './include/user.php'; break; case 'register': @@ -81,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();