From 27cbc14d28d072c37474ac1e96d677b88dde27ba Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sun, 15 Jun 2008 23:43:19 -0700 Subject: 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 --- include/newgame.php | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'include/newgame.php') 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 "
You need to be one of the players to start a new game.
"; - 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 "

There is already a game going on in session $session, you can't start a new one

"; - output_footer(); - DB_close(); - exit(); + return; } else if ( DB_is_session_active($session) < 0 ) { echo "

ERROR: status of session $session couldn't be determined.

"; - 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(); -- cgit v1.2.3-18-g5258