2 /* make sure that we are not called from outside the scripts,
3 * use a variable defined in config.php to check this
8 /* this outputs the default home page with some extra statistics on it */
10 $pre[0]=0;$game[0]=0;$done[0]=0;
11 $r=mysql_query("SELECT COUNT(id) FROM Game GROUP BY status");
13 $pre = mysql_fetch_array($r,MYSQL_NUM);
14 $game = mysql_fetch_array($r,MYSQL_NUM);
15 $done = mysql_fetch_array($r,MYSQL_NUM);
18 $r=mysql_query("SELECT AVG(datediff(mod_date,create_date)) FROM Game where status='gameover' ");
20 $avgage= mysql_fetch_array($r,MYSQL_NUM);
24 output_home_page($pre[0],$game[0],$done[0],$avgage[0]);