From 26aa6987c5da1f102e81c4625ed8e7b116c7590b Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Fri, 16 Jan 2009 21:29:18 -0800 Subject: [PATCH] NEW FEATURE: always show current score on main page show the current score as the link to the score table --- include/functions.php | 6 +++--- include/game.php | 15 ++++++++++++++- 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 "
\n"; - echo " local time\n"; - echo " last login\n"; + echo " time info\n"; echo " \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']}
\n"; echo " call: {$RULES['call']}
\n"; echo " \n \n"; - echo "
Score \n"; + + /* show score */ $score = generate_score_table($session); + $tmpscore= $score; + $finalscore = array_pop($tmpscore); + $finalscore = $finalscore['players']; + + echo "
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 "
\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; -- 2.25.1