From be3e7ed509f7fd3f2009b1ad06554a0c07e1a781 Mon Sep 17 00:00:00 2001 From: arun Date: Tue, 12 Dec 2006 11:55:39 +0000 Subject: players should get emails again, if it is there turn --- index.php | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6208038..ea5724a 100644 --- a/index.php +++ b/index.php @@ -52,17 +52,7 @@ DB_open(); /* check if we want to start a new game */ if(isset($_REQUEST["new"])) { -?> -

Please add 4 names, please make sure that the names are correct!

-
- Name: - Name: - Name: - Name: - - -
-\n"; echo "perhaps the game has been cancled."; - exit(); + exit(); } DB_update_user_timestamp($myid); + + /* get some information from the DB */ + $gameid = DB_get_gameid_by_hash($me); $myname = DB_get_name_by_hash($me); $mystatus = DB_get_status_by_hash($me); - - /* get game id */ - $gameid = DB_get_gameid_by_hash($me); switch($mystatus) { @@ -190,7 +179,6 @@ else if(isset($_REQUEST["me"])) check_want_to_play($me); DB_set_hand_status_by_hash($me,'init'); break; - case 'init': if( !isset($_REQUEST["in"]) || !isset($_REQUEST["update"])) { @@ -201,7 +189,7 @@ else if(isset($_REQUEST["me"])) { if($_REQUEST["in"] == "no") { - echo "TODO: email everyone that the game has been canceld
"; + echo "TODO: email everyone that the game has been canceled.
"; /*something like for($i=0;$i<4;$i++) { @@ -296,7 +284,7 @@ else if(isset($_REQUEST["me"])) display_news(); display_status(); - $gamestatus =DB_get_game_status_by_gameid($gameid); + $gamestatus = DB_get_game_status_by_gameid($gameid); if($gamestatus == 'pre') { echo "you need to wait for the others...
"; @@ -325,17 +313,17 @@ else if(isset($_REQUEST["me"])) $lasttrick = DB_get_max_trickid($gameid); $play = array(); /* needed to calculate winner later */ - $seq=1; - $pos=0; + $seq = 1; + $pos = 0; echo "\n