From 8141a807cda3a5387e3288e4d644cde94b9ab8fd Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 24 May 2008 14:46:39 -0700 Subject: LAYOUT: rearranged the user menu to show up in the top right corner also limited the amount of games that show up in the user menu if it is your turn Signed-off-by: Arun Persaud --- include/functions.php | 20 +++++++++----------- include/output.php | 13 +++++++++---- 2 files changed, 18 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/functions.php b/include/functions.php index 5267bfb..31fc286 100644 --- a/include/functions.php +++ b/include/functions.php @@ -847,8 +847,7 @@ function display_table () function display_user_menu() { global $WIKI,$myid,$INDEX; - echo "
\n". - " Go to my user page "; + echo "
\n"; $result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand". " LEFT JOIN Game On Hand.game_id=Game.id". @@ -857,21 +856,20 @@ function display_user_menu() " AND Game.status<>'gameover'". " ORDER BY Game.session" ); if(DB_num_rows($result)) - echo "
It's your turn in these games:
\n"; + echo "It's your turn in these games:
\n"; + $i=0; while( $r = DB_fetch_array($result)) { + $i++; echo "game ".DB_format_gameid($r[1])."
\n"; + if($i>4) + { + echo "...
\n"; + break; + } } - echo "
Start a new game\n"; - - echo "
Change settings\n"; - - echo "
Statistics\n"; - - echo - "
Report bugs in the wiki\n"; echo "
\n"; return; } diff --git a/include/output.php b/include/output.php index 33fb87b..62ab264 100644 --- a/include/output.php +++ b/include/output.php @@ -291,15 +291,20 @@ function output_footer() function output_status() { - global $defaulttimezone; + global $defaulttimezone,$INDEX,$WIKI; if(isset($_SESSION["name"])) { $name = $_SESSION["name"]; /* logout info */ - echo "\n
"; - echo $name; - echo " logout"; + echo "\n
\n"; + echo $name,"\n"; + echo " | mypage \n"; + echo " | settings\n"; + echo " | new game\n"; + echo " | statistics\n"; + echo " | wiki\n"; + echo " |    logout\n"; echo "
\n"; /* last logon time */ -- cgit v1.2.3-18-g5258