From: Arun Persaud Date: Sat, 24 May 2008 21:50:34 +0000 (-0700) Subject: LAYOUT: only display user menu if it's your turn in some games X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=671da1a387eb879aec526ea9b7614ff9381e7c0f;p=e-DoKo.git 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 --- 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 "
\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 "
\n"; + $i++; echo "game ".DB_format_gameid($r[1])."
\n"; if($i>4) @@ -870,7 +872,8 @@ function display_user_menu() } } - echo "
\n"; + if($i) + echo "
\n"; return; }