X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fgame.php;h=845a5629b6cea269fab793e38ef4bff6b3b1af8d;hp=377d0aa017dba09776f81d21718274fc7c1f8769;hb=65322d53842f9ee7e166970e5250f76c36fc3e6a;hpb=c1585e23cb3ea757674c234c9193889b4f2f2090 diff --git a/include/game.php b/include/game.php index 377d0aa..845a562 100644 --- a/include/game.php +++ b/include/game.php @@ -215,12 +215,23 @@ if($session) $finalscore = array_pop($tmpscore); $finalscore = $finalscore['players']; - echo "
Score: \n"; - foreach($finalscore as $user=>$value) + echo "
"; + if($finalscore) + { + echo "Score: \n"; + /* output the final score on the front page */ + foreach($finalscore as $user=>$value) + { + $name = DB_get_name('userid',$user); + echo " ".substr($name,0,2).": $value "; + } + } + else { - $name = DB_get_name('userid',$user); - echo " ".substr($name,0,2).": $value "; + /* first game, no score yet */ + echo " "; } + echo format_score_table_html($score,$myid); echo "
\n";