diff options
author | Arun Persaud <arun@nubati.net> | 2008-04-26 11:52:49 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-04-26 11:52:49 -0700 |
commit | 09515348107d9aab7823a12d31b082a2ebb75555 (patch) | |
tree | 2e6c01eb6fdc07390c73cb46142c5efda39f567d /include/newgame.php | |
parent | 0c5b3eeca3006f61dd326a86e8989c52694d581b (diff) | |
download | e-DoKo-09515348107d9aab7823a12d31b082a2ebb75555.tar.gz e-DoKo-09515348107d9aab7823a12d31b082a2ebb75555.tar.bz2 e-DoKo-09515348107d9aab7823a12d31b082a2ebb75555.zip |
CLEANUP: make index.php very short and move everything in separate files
created an include dir and almost everything that was in index.php is now in separate
files and gets only included in index.php... makes index.php look a lot nicer ;)
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include/newgame.php')
-rw-r--r-- | include/newgame.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/newgame.php b/include/newgame.php new file mode 100644 index 0000000..5764568 --- /dev/null +++ b/include/newgame.php @@ -0,0 +1,22 @@ +<?php +/* make sure that we are not called from outside the scripts, + * use a variable defined in config.php to check this + */ +if(!isset($HOST)) + exit; + +output_status(); +/* user needs to be logged in to do this */ +if( isset($_SESSION["name"]) ) + { + $names = DB_get_all_names(); + echo "<div class=\"user\">\n"; + output_form_for_new_game($names); + echo "</div>\n"; + display_user_menu(); + } + else + { + echo "<div class=\"message\">Please <a href=\"$INDEX\">log in</a>.</div>"; + } +?>
\ No newline at end of file |