summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2007-01-10 12:51:43 +0000
committerarun <arun>2007-01-10 12:51:43 +0000
commit22390bdc9d72fe7b32375d3be898ee0fd8137a88 (patch)
tree710fc2d6f8d92cf64523f3b22462844ef2d3a952
parentd57105094a2e224bd7f4f03b11ab96a45383fea2 (diff)
downloade-DoKo-22390bdc9d72fe7b32375d3be898ee0fd8137a88.tar.gz
e-DoKo-22390bdc9d72fe7b32375d3be898ee0fd8137a88.tar.bz2
e-DoKo-22390bdc9d72fe7b32375d3be898ee0fd8137a88.zip
added list of finished games to user page
-rw-r--r--functions.php3
-rw-r--r--index.php6
-rw-r--r--output.php2
3 files changed, 8 insertions, 3 deletions
diff --git a/functions.php b/functions.php
index 2077d00..e9ead78 100644
--- a/functions.php
+++ b/functions.php
@@ -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 */
diff --git a/index.php b/index.php
index 8b567fd..6ee8df8 100644
--- 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)
diff --git a/output.php b/output.php
index 000c2b2..726eb43 100644
--- a/output.php
+++ b/output.php
@@ -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;