summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-05-24 14:50:34 -0700
committerArun Persaud <arun@nubati.net>2008-05-24 14:50:34 -0700
commit671da1a387eb879aec526ea9b7614ff9381e7c0f (patch)
treeec0cf37b250684ace899dc723cf23fccb7dcaa2d
parent8141a807cda3a5387e3288e4d644cde94b9ab8fd (diff)
downloade-DoKo-671da1a387eb879aec526ea9b7614ff9381e7c0f.tar.gz
e-DoKo-671da1a387eb879aec526ea9b7614ff9381e7c0f.tar.bz2
e-DoKo-671da1a387eb879aec526ea9b7614ff9381e7c0f.zip
LAYOUT: only display user menu if it's your turn in some games
the user menu now only has the list of games in it, so no need to display it, if it is nor your turn in any games Signed-off-by: Arun Persaud <arun@nubati.net>
-rw-r--r--include/functions.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php
index 31fc286..9f58f51 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -847,7 +847,6 @@ function display_table ()
function display_user_menu()
{
global $WIKI,$myid,$INDEX;
- echo "<div class=\"usermenu\">\n";
$result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
" LEFT JOIN Game On Hand.game_id=Game.id".
@@ -861,6 +860,9 @@ function display_user_menu()
$i=0;
while( $r = DB_fetch_array($result))
{
+ if($i==0)
+ echo "<div class=\"usermenu\">\n";
+
$i++;
echo "<a href=\"".$INDEX."?action=game&me=".$r[0]."\">game ".DB_format_gameid($r[1])." </a><br />\n";
if($i>4)
@@ -870,7 +872,8 @@ function display_user_menu()
}
}
- echo "</div>\n";
+ if($i)
+ echo "</div>\n";
return;
}