summaryrefslogtreecommitdiffstats
path: root/include/functions.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2011-11-19 16:21:03 -0800
committerArun Persaud <apersaud@lbl.gov>2011-11-19 16:21:03 -0800
commit022246b947178ed5c7b1cd6a6dcc21414559b260 (patch)
tree5d171ba2fe7b239baaae9a5dbb195a92ac6c47b8 /include/functions.php
parent09c105d8a343e0c58fe18075abaf3af9a6f80115 (diff)
downloade-DoKo-022246b947178ed5c7b1cd6a6dcc21414559b260.tar.gz
e-DoKo-022246b947178ed5c7b1cd6a6dcc21414559b260.tar.bz2
e-DoKo-022246b947178ed5c7b1cd6a6dcc21414559b260.zip
LAYOUT, BUGFIX: don't show current game in "it's your turn" list, also fix layout for this on newgame.php
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php23
1 files changed, 16 insertions, 7 deletions
diff --git a/include/functions.php b/include/functions.php
index 9d9856b..64c3e8b 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1206,16 +1206,25 @@ function display_single_user($r)
}
-function display_user_menu($id)
+function display_user_menu($id, $skiphash=NULL)
{
global $WIKI,$INDEX;
- $result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
- " LEFT JOIN Game On Hand.game_id=Game.id".
- " WHERE Hand.user_id='$id'".
- " AND ( Game.player='$id' OR ISNULL(Game.player) )".
- " AND ( Game.status='pre' OR Game.status='play' )".
- " ORDER BY Game.session" );
+ if($skiphash)
+ $result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
+ " LEFT JOIN Game On Hand.game_id=Game.id".
+ " WHERE Hand.user_id='$id'".
+ " AND Hand.hash!='$skiphash'".
+ " AND ( Game.player='$id' OR ISNULL(Game.player) )".
+ " AND ( Game.status='pre' OR Game.status='play' )".
+ " ORDER BY Game.session" );
+ else
+ $result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
+ " LEFT JOIN Game On Hand.game_id=Game.id".
+ " WHERE Hand.user_id='$id'".
+ " AND ( Game.player='$id' OR ISNULL(Game.player) )".
+ " AND ( Game.status='pre' OR Game.status='play' )".
+ " ORDER BY Game.session" );
$i=0;
while( $r = DB_fetch_array($result))