summaryrefslogtreecommitdiffstats
path: root/include/game.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2009-01-16 21:29:18 -0800
committerArun Persaud <arun@nubati.net>2009-01-16 21:29:18 -0800
commit26aa6987c5da1f102e81c4625ed8e7b116c7590b (patch)
treee0d7ffeccb49c2358cab6584428ec3ae06d52d56 /include/game.php
parente7f6b5bf335e80c40219842829548b48569172a6 (diff)
downloade-DoKo-26aa6987c5da1f102e81c4625ed8e7b116c7590b.tar.gz
e-DoKo-26aa6987c5da1f102e81c4625ed8e7b116c7590b.tar.bz2
e-DoKo-26aa6987c5da1f102e81c4625ed8e7b116c7590b.zip
NEW FEATURE: always show current score on main page
show the current score as the link to the score table
Diffstat (limited to 'include/game.php')
-rw-r--r--include/game.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/game.php b/include/game.php
index bb3202d..086a2f9 100644
--- a/include/game.php
+++ b/include/game.php
@@ -174,10 +174,23 @@ if($session)
echo " schweinchen: {$RULES['schweinchen']} <br />\n";
echo " call: {$RULES['call']} <br />\n";
echo " </div>\n </div>\n";
- echo " <div class=\"sessionscore\">Score \n";
+
+ /* show score */
$score = generate_score_table($session);
+ $tmpscore= $score;
+ $finalscore = array_pop($tmpscore);
+ $finalscore = $finalscore['players'];
+
+ echo " <div class=\"sessionscore\">Score: \n";
+ foreach($finalscore as $user=>$value)
+ {
+ $name = DB_get_name('userid',$user);
+ echo " ".substr($name,0,2).": $value ";
+ }
echo format_score_table_html($score,$myid);
echo " </div>\n";
+
+ /* figure out which game in a session we are in and link to the previous and next game if possible */
$hashes = DB_get_hashes_by_session($session,$myid);
$next = NULL;
$i = 1;