diff options
author | Arun Persaud <arun@nubati.net> | 2008-06-15 23:43:19 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-06-16 23:50:20 -0700 |
commit | 27cbc14d28d072c37474ac1e96d677b88dde27ba (patch) | |
tree | f42e40d934677469f8686f6864b33907eb52aa9e /include/newgame.php | |
parent | 11429eb9238bb0ba7a10a783d293d9051b146795 (diff) | |
download | e-DoKo-27cbc14d28d072c37474ac1e96d677b88dde27ba.tar.gz e-DoKo-27cbc14d28d072c37474ac1e96d677b88dde27ba.tar.bz2 e-DoKo-27cbc14d28d072c37474ac1e96d677b88dde27ba.zip |
NEW FEATURE: login button
added a login button to the top right, in case you were not logged in. output_status can now be called in only one place, ie index.php and all pages will get the menu...
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include/newgame.php')
-rw-r--r-- | include/newgame.php | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/include/newgame.php b/include/newgame.php index feb5216..db6b62d 100644 --- a/include/newgame.php +++ b/include/newgame.php @@ -20,7 +20,6 @@ else return; DB_update_user_timestamp($myid); - output_status(); if( !myisset("PlayerA", "PlayerB","PlayerC","PlayerD","dullen","schweinchen","callrule" )) { @@ -45,9 +44,7 @@ else if(!in_array($name,array($PlayerA,$PlayerB,$PlayerC,$PlayerD))) { echo "<div class=\"message\">You need to be one of the players to start a <a href=\"$INDEX?action=new\">new game</a>.</div>"; - output_footer(); - DB_close(); - exit(); + return; } /* what rules were selected */ @@ -65,9 +62,7 @@ else if($EmailA=="" || $EmailB=="" || $EmailC=="" || $EmailD=="") { echo "couldn't find one of the names, please start a new game"; - output_footer(); - DB_close(); - exit(); + return; } /* get user ids */ @@ -94,16 +89,12 @@ else if( DB_is_session_active($session) > 0 ) { echo "<p class=\"message\"> There is already a game going on in session $session, you can't start a new one</p>"; - output_footer(); - DB_close(); - exit(); + return; } else if ( DB_is_session_active($session) < 0 ) { echo "<p class=\"message\"> ERROR: status of session $session couldn't be determined.</p>"; - output_footer(); - DB_close(); - exit(); + return; } if($session) @@ -126,9 +117,7 @@ else if($ruleset <0) { myerror("Error defining ruleset: $ruleset"); - output_footer(); - DB_close(); - exit(); + return; }; /* get max session */ $max = DB_get_max_session(); |