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>
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".
$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)
}
}
- echo "</div>\n";
+ if($i)
+ echo "</div>\n";
return;
}