X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Ffunctions.php;h=31fc28646cd1d0ba19267910629b41a226bb6904;hp=31f9ba8e1c94ee4085e6d437fd21a0ac2681b551;hb=8141a807cda3a5387e3288e4d644cde94b9ab8fd;hpb=5973166a4b936e2f8e2d923bc6dcb8bc3db89d85 diff --git a/include/functions.php b/include/functions.php index 31f9ba8..31fc286 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1,5 +1,5 @@ "; if($GT=="poverty" && $party=="re") @@ -813,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". @@ -823,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; } @@ -931,7 +963,7 @@ function generate_global_score_table() $player[$key]['nr']+=1; } } - + echo "\n \n"; function cmp($a,$b) { @@ -941,7 +973,7 @@ function generate_global_score_table() $a=$a['points']/$a['nr']; $b=$b['points']/$b['nr']; - if ($a == $b) + if ($a == $b) return 0; return ($a > $b) ? -1 : 1; } @@ -952,7 +984,7 @@ function generate_global_score_table() echo " \n"; } echo "
",$pl['name'],"",round($pl['points']/$pl['nr'],3),"
\n"; - + return; }