X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fgame.php;h=cef2c6537c2a11141a38ac387f546943f8624b1b;hp=b8963d2fc5134aac1a1d782a4d4371a82b1b5e3b;hb=e9a0778e2270c200bdb77034a56c7c613606d737;hpb=189a8296e5f6ba47e87167083cff9cb3e1d0d03b diff --git a/include/game.php b/include/game.php index b8963d2..cef2c65 100644 --- a/include/game.php +++ b/include/game.php @@ -49,7 +49,6 @@ global $GAME,$RULES,$CARDS; $gameid = DB_get_gameid_by_hash($me); $myname = DB_get_name('hash',$me); $mystatus = DB_get_status_by_hash($me); -$origmystatus = DB_get_status_by_hash($me); /* to show "it's your turn" menu when game has just finished */ $mypos = DB_get_pos_by_hash($me); $myhand = DB_get_handid('hash',$me); $myparty = DB_get_party_by_hash($me); @@ -175,6 +174,30 @@ if(myisset('call') && $_REQUEST['call'] == '0' && can_call(0,$me)) } + +/***************************************************************** + * output other games where it is the users turn + * make sure that the people looking at old games don't see the wrong games here + *****************************************************************/ + +if( $gamestatus != 'gameover' && isset($_SESSION['id']) ) + { + /* game isn't over, only valid user can get here, so show menu */ + display_user_menu($myid, $me); + } +else if( $mystatus == 'gameover' && isset($_SESSION['id']) ) + { + /* user is looking at someone else's game, show the menu for the correct user */ + display_user_menu($_SESSION['id'],$me); + } +else + { + echo "
\n\n"; + } + /***************************************************************** * output extra division in case this game is part of a session *****************************************************************/ @@ -308,6 +331,83 @@ if($mystatus!='gameover') DB_update_user_timestamp($_SESSION['id']); +/****************************************************************************** + * Output menu for selecting tricks + ******************************************************************************/ + +switch($mystatus) + { + case 'start': + break; + case 'init': + case 'check': + /* output sickness of other playes, in case they already selected and are sitting in front of the current player */ + echo "\n