From: Arun Persaud Date: Sun, 20 Nov 2011 00:47:44 +0000 (-0800) Subject: BUGFIX: added special section for vorbehalte (needs to be in div class=middle in... X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=f5d068d8b0c003324c075489a4894be2b66eb051 BUGFIX: added special section for vorbehalte (needs to be in div class=middle in the new layout) --- diff --git a/include/game.php b/include/game.php index 99ff454..cef2c65 100644 --- a/include/game.php +++ b/include/game.php @@ -343,24 +343,9 @@ switch($mystatus) case 'check': /* output sickness of other playes, in case they already selected and are sitting in front of the current player */ echo "\n\n"; /* end div trick, end li trick , end tricks*/ + echo " \n\n"; /* end div trick, end li trick , end tricks*/ /* end displaying sickness */ break; case 'poverty': @@ -372,13 +357,8 @@ switch($mystatus) $mygametype = DB_get_gametype_by_gameid($gameid); - echo "
  • Pre\n". - "
    \n"; - - /* get information so show the cards that have been handed over in a poverty game */ - output_exchanged_cards(); - - echo "
    \n
  • \n\n\n"; /* end div trick, end li trick , end ul tricks */ + echo "
  • Pre\n"; + echo "
  • \n\n\n"; /* end div trick, end li trick , end ul tricks */ } /* end output pre-game trick */ break; @@ -438,6 +418,67 @@ echo "
    \n"; /* display the table and the names */ display_table_begin(); + +/****************************** + * Output pre-trick if needed * + ******************************/ + +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
    \n"; + echo "
    \n"; + + for($pos=1;$pos<5;$pos++) + { + $usersick = DB_get_sickness_by_pos_and_gameid($pos,$gameid); + $userid = DB_get_userid('gameid-position',$gameid,$pos); + $userstatus = DB_get_hand_status_by_userid_and_gameid($userid,$gameid); + + if($userstatus=='start' || $userstatus=='init') + echo "
    still needs
    to decide
    \n"; /* show this to everyone */ + else + if($usersick!=NULL) /* in the init-phase we only showed players with $pos<$mypos, now we can show all */ + echo "
    sick
    \n"; + else + echo "
    healthy
    \n"; + } + echo "
    \n
    \n"; /* end div trick, end li trick , end tricks*/ + /* end displaying sickness */ + break; + case 'poverty': + /* output pre-game trick in case user reloads, + * only needs to be done when a team has been formed */ + if($myparty=='re' || $myparty=='contra') + { + echo "\n