added list of finished games to user page
authorarun <arun@nubati.net>
Wed, 10 Jan 2007 12:51:43 +0000 (12:51 +0000)
committerarun <arun>
Wed, 10 Jan 2007 12:51:43 +0000 (12:51 +0000)
functions.php
index.php
output.php

index 2077d0019ac98ce2287c41a861726b4b6ce262e8..e9ead78166e0c3b3031f2dee5a01d8fd02e323ac 100644 (file)
@@ -156,14 +156,13 @@ function get_winner($p,$mode)
   $c3 = $p[3];
   $c4 = $p[4];
 
-  /* find out who won */
 
   /* first card is better than all the rest */
   if( compare_cards($c1,$c2,$mode) && compare_cards($c1,$c3,$mode) && compare_cards($c1,$c4,$mode) )
     return 1; 
 
   /* second card is better than first and better than the rest */
-  if( !compare_cards($c1,$c2,$mode) && compare_cards($c2,$c3,$mode) && compare_cards($c2,$c4,$mode) )
+  if( !compare_cards($c1,$c2,$mode) &&  compare_cards($c2,$c3,$mode) && compare_cards($c2,$c4,$mode) )
     return 2;
 
   /* third card is better than first card and better than last */
index 8b567fd90efd5a5f2395a769740d2509aad5ca7c..6ee8df8441b881c4513e160fb6b6341436125dd7 100644 (file)
--- a/index.php
+++ b/index.php
@@ -631,6 +631,12 @@ else if(myisset("me"))
          echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a><br />";
        echo "</p>\n";
 
+       echo "<p>and these are your games that are already done:<br />\n";
+       $result = mysql_query("SELECT hash,game_id from Hand WHERE user_id='$uid' AND status='gameover'" );
+       while( $r = mysql_fetch_array($result,MYSQL_NUM))
+         echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a><br />";
+       echo "</p>\n";
+
        $names = DB_get_all_names();
        echo "<p>registered players:<br />\n";
        foreach ($names as $name)
index 000c2b2227b061ee405e1268a11cf15289959ca7..726eb432f2d3925dc9ef4ce209043264fad45c37 100644 (file)
@@ -16,7 +16,7 @@ function display_news()
   global $wiki;
   echo "<div class=\"bug\">\n".
     "  Please hit <strong>shift+reload</strong>.<br /><hr />\n".
-    "  added local time display, let me know what you think<br /><hr />\n".
+    "  the table and the names are now always shown. <br /><hr />".
     "  If you find more bugs, please list them in the <a href=\"".$wiki.
     "\">wiki</a>.\n</div>\n";
   return;