2 error_reporting(E_ALL);
4 include_once("config.php"); /* needs to be first in list, since other includes use this */
5 include_once("./include/output.php"); /* html output only */
6 include_once("./include/db.php"); /* database only */
7 include_once("./include/functions.php"); /* the rest */
9 /* make sure that user has set all variables in config.php */
12 /* open the database */
16 echo "Database error, can't connect... Please wait a while and try again. ".
17 "If the problem doesn't go away feel free to contact $ADMIN_NAME at $ADMIN_EMAIL.";
22 /* start a session, if it is not already running.
23 * This way people don't have to log in all the times.
24 * The session variables can also be read out from different
25 * php scripts, so that the code can be easily split up across several files
29 /* done major error checking, output header of HTML page */
32 /* The rest of the file consists of handling user input.
33 * The user sends information via html GET and POST variables,
34 * and the action variable tells the prog what the user wants to do
37 $action=$_REQUEST['action'];
39 $action=""; /* so that we can use a default option below */
44 require './include/newgame.php';
47 require './include/cancelgame.php';
50 require './include/reminder.php';
53 require './include/logout.php';
54 require './include/welcome.php';
57 require './include/login.php';
58 require './include/user.php';
61 require './include/game.php';
64 if(isset($_SESSION["name"]))
65 require './include/user.php';
67 require './include/welcome.php';