CLEANUP: make index.php very short and move everything in separate files
[e-DoKo.git] / include / newgame.php
1 <?php
2 /* make sure that we are not called from outside the scripts, 
3  * use a variable defined in config.php to check this
4  */
5 if(!isset($HOST))
6   exit;
7
8 output_status();
9 /* user needs to be logged in to do this */
10 if( isset($_SESSION["name"]) )
11   {
12     $names = DB_get_all_names();
13     echo "<div class=\"user\">\n";
14     output_form_for_new_game($names);
15     echo "</div>\n";
16     display_user_menu();
17   }
18  else
19    {
20      echo "<div class=\"message\">Please <a href=\"$INDEX\">log in</a>.</div>";
21    }
22 ?>