summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2007-06-02 16:25:28 +0000
committerarun <arun>2007-06-02 16:25:28 +0000
commit65d3845752e76b9f1895cd9e2bf1a4fa6021f0af (patch)
treeb7255dfbff31733a17e678b9ec4e6eedaf2ac4c8 /index.php
parent88321df4d58a8d42f484ec202b0b4ec30f2d4e97 (diff)
downloade-DoKo-65d3845752e76b9f1895cd9e2bf1a4fa6021f0af.tar.gz
e-DoKo-65d3845752e76b9f1895cd9e2bf1a4fa6021f0af.tar.bz2
e-DoKo-65d3845752e76b9f1895cd9e2bf1a4fa6021f0af.zip
added output of average time for a game on the homepage
Diffstat (limited to 'index.php')
-rw-r--r--index.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/index.php b/index.php
index 1a825de..0bb04d4 100644
--- a/index.php
+++ b/index.php
@@ -1731,7 +1731,14 @@ else if(myisset("me"))
$game = mysql_fetch_array($r,MYSQL_NUM);
$done = mysql_fetch_array($r,MYSQL_NUM);
}
- output_home_page($pre[0],$game[0],$done[0]);
+
+ $r=mysql_query("SELECT AVG(datediff(mod_date,create_date)) FROM Game where status='gameover' ");
+ if($r)
+ $avgage= mysql_fetch_array($r,MYSQL_NUM);
+ else
+ $avgage[0]=0;
+
+ output_home_page($pre[0],$game[0],$done[0],$avgage[0]);
}
output_footer();