diff options
author | Arun Persaud <arun@nubati.net> | 2008-06-28 04:23:28 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-06-28 04:23:28 -0700 |
commit | cd4cbd4a1cce2c35a6a78b1b957c17389001b4b1 (patch) | |
tree | f42e40d934677469f8686f6864b33907eb52aa9e /include/newgame.php | |
parent | 271d5076af98eafe227eef872d8be63e57292a86 (diff) | |
parent | 27cbc14d28d072c37474ac1e96d677b88dde27ba (diff) | |
download | e-DoKo-cd4cbd4a1cce2c35a6a78b1b957c17389001b4b1.tar.gz e-DoKo-cd4cbd4a1cce2c35a6a78b1b957c17389001b4b1.tar.bz2 e-DoKo-cd4cbd4a1cce2c35a6a78b1b957c17389001b4b1.zip |
Merge branch 'master' of http://nubati.net/git/e-DoKo
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(); |