summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--include/functions.php6
-rw-r--r--include/game.php15
2 files changed, 17 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php
index cb09d6c..9103c6f 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -727,7 +727,7 @@ function can_call($what,$hash)
function display_table ()
{
- global $gameid, $GT, $debug,$INDEX,$defaulttimezone;
+ global $gameid, $GT, $debug,$INDEX,$defaulttimezone,$session;
global $RULES,$GAME,$gametype;
$result = DB_query("SELECT User.fullname as name,".
@@ -863,8 +863,8 @@ function display_table ()
}
echo " <br />\n";
- echo " <span title=\"".date("Y-m-d H:i:s",$timenow). "\">local time</span>\n";
- echo " <span title=\"".date("Y-m-d H:i:s",$lastlogin)."\">last login</span>\n";
+ echo " <span title=\"local time: ".date("Y-m-d H:i:s",$timenow). " ".
+ "last login: ".date("Y-m-d H:i:s",$lastlogin)."\">time info</span>\n";
echo " </div>\n";
}
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;