diff options
-rw-r--r-- | db.php | 13 | ||||
-rw-r--r-- | index.php | 8 |
2 files changed, 21 insertions, 0 deletions
@@ -303,6 +303,19 @@ function DB_get_hand($me) return $cards; } +function DB_get_all_hand($me) +{ + $cards = array(); + + $handid = DB_get_handid_by_hash($me); + + $result = mysql_query("SELECT card_id FROM Hand_Card WHERE hand_id=".DB_quote_smart($handid)); + while($r = mysql_fetch_array($result,MYSQL_NUM)) + $cards[]=$r[0]; + + return $cards; +} + function DB_get_cards_by_trick($id) { $cards = array(); @@ -769,6 +769,14 @@ else if(myisset("me")) foreach($mycards as $card) display_card($card); } + else if($mystatus=='gameover') + { + $oldcards = DB_get_all_hand($me); + $oldcards = mysort($oldcards,$gametype); + echo "Your cards were: <br />\n"; + foreach($oldcards as $card) + display_card($card); + } echo "</div>\n"; /* check if we need to set status to 'gameover' is done during playing of the card */ |