From 0049ad8507bb304c0f755dd156fd5f3082b1d6b5 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 31 May 2008 13:11:19 -0700 Subject: BUGFIX: pre/next button was displayed incorrect because of wrong statement sometimes an extra was issued which messed up the HTML. Signed-off-by: Arun Persaud --- include/game.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/include/game.php b/include/game.php index 679680d..3fbc451 100644 --- a/include/game.php +++ b/include/game.php @@ -214,7 +214,7 @@ switch($mystatus) DB_set_player_by_gameid($gameid,$who); $message = "It's your turn now in game ".DB_format_gameid($gameid).".\n". - "Use this link to go the game: ".$HOST.$INDEX."?action=game&me=".$hash."\n\n" ; + "Use this link to go the game: ".$HOST.$INDEX."?action=game&me=".$hash."\n\n" ; mymail($email,$EmailName."ready, set, go... (game ".DB_format_gameid($gameid).") ",$message); */ } @@ -1045,7 +1045,7 @@ switch($mystatus) "WHERE Trick.game_id='".$gameid."' ". "GROUP BY Trick.id, sequence ". "ORDER BY Trick.id, sequence ASC"); - $trickNR = 1; + $trickNR = 0; $lasttrick = DB_get_max_trickid($gameid); $play = array(); /* needed to calculate winner later */ @@ -1061,7 +1061,7 @@ switch($mystatus) if($mygametype != 'normal' && $mygametype != 'silent') /* only show when needed */ { echo "
  • Pre\n". - "
    \n"; + "
    \n"; $show = 1; for($mypos=1;$mypos<5;$mypos++) { @@ -1089,6 +1089,10 @@ switch($mystatus) $comment = $r[4]; $user = $r[6]; + /* count number of tricks */ + if($seq==1) + $trickNR++; + /* check if first schweinchen has been played */ if( $GAME['schweinchen-who'] && ($r[0] == 19 || $r[0] == 20) ) if(!$GAME['schweinchen-first']) @@ -1136,7 +1140,6 @@ switch($mystatus) /* end of trick? */ if($seq==4) { - $trickNR++; echo "
    \n
  • \n"; /* end div trick, end li trick */ } } @@ -1736,7 +1739,8 @@ switch($mystatus) } echo "
  • prev
  • \n"; - echo "
  • next
  • \n\n"; /* end ul tricks*/ + echo "
  • next
  • \n"; + echo "\n"; /* end ul tricks*/ echo "
    Personal notes:
    \n"; $notes = DB_get_notes_by_userid_and_gameid($myid,$gameid); -- cgit v1.2.3-18-g5258