summaryrefslogtreecommitdiffstats
path: root/include/newgame.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/newgame.php')
-rw-r--r--include/newgame.php22
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