diff options
author | Arun Persaud <arun@nubati.net> | 2008-05-26 14:28:29 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-05-26 14:28:29 -0700 |
commit | af2ee6fe421192cd2b42fcb4bbd09179bbce3943 (patch) | |
tree | d5d3fd62cb9c3d7070269d9ec114708c0d21bc19 /include/functions.php | |
parent | 61ced3e42a77e624e2209a94c5f324a2071eef7d (diff) | |
download | e-DoKo-af2ee6fe421192cd2b42fcb4bbd09179bbce3943.tar.gz e-DoKo-af2ee6fe421192cd2b42fcb4bbd09179bbce3943.tar.bz2 e-DoKo-af2ee6fe421192cd2b42fcb4bbd09179bbce3943.zip |
LAYOUT: more tables on the statistics page
changed the last two tables to the new CSS-tables.
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php index 9f58f51..a338f38 100644 --- a/include/functions.php +++ b/include/functions.php @@ -934,6 +934,8 @@ function generate_score_table($session) function generate_global_score_table() { + $return = array(); + /* get all ids */ $gameids = DB_get_gameids_of_finished_games_by_session(0); @@ -967,7 +969,6 @@ function generate_global_score_table() } } - echo "<table>\n <tr>\n"; function cmp($a,$b) { if($a['nr']==0 ) return 1; @@ -981,14 +982,15 @@ function generate_global_score_table() return ($a > $b) ? -1 : 1; } usort($player,"cmp"); + foreach($player as $pl) { + /* limit to players with at least 10 games */ if($pl['nr']>10) - echo " <tr><td>",$pl['name'],"</td><td>",round($pl['points']/$pl['nr'],3),"</td></tr>\n"; + $return[] = array( $pl['name'], round($pl['points']/$pl['nr'],3) ); } - echo "</table>\n"; - return; + return $return; } |