NEW FEATURE: show all hands at the end of a game
authorArun Persaud <arun@nubati.net>
Tue, 19 Jun 2007 08:45:05 +0000 (10:45 +0200)
committerArun Persaud <arun@nubati.net>
Tue, 19 Jun 2007 08:45:05 +0000 (10:45 +0200)
Now everyone can see all the cards at the end of a game.

index.php

index 3fa0fd15e42372f0a51fd7ae26a2f8a5c890c4c7..f5c3d3da4e66b491cd3b79c6ba03f045522a3150 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1518,6 +1518,24 @@ else if(myisset("me"))
          echo "Your cards were: <br />\n";
          foreach($oldcards as $card) 
            display_card($card,$PREF["cardset"]);
          echo "Your cards were: <br />\n";
          foreach($oldcards as $card) 
            display_card($card,$PREF["cardset"]);
+         
+         $userids = DB_get_all_userid_by_gameid($gameid);
+          foreach($userids as $user)
+            {
+              $userhash = DB_get_hash_from_gameid_and_userid($gameid,$user);
+             
+              if($userhash!=$me)
+                {
+                  echo "<br />";
+                 
+                  $name = DB_get_name_by_userid($user);
+                  $oldcards = DB_get_all_hand($userhash);
+                  $oldcards = mysort($oldcards,$gametype);
+                  echo "$name's cards were: <br />\n";
+                  foreach($oldcards as $card)
+                    display_card($card,$PREF["cardset"]);
+                }
+            }
        }
       echo "</div>\n";
       
        }
       echo "</div>\n";