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;
12 $r=DB_query("SELECT COUNT(id) FROM Game GROUP BY status");
14 $pre = DB_fetch_array($r);
15 $game = DB_fetch_array($r);
16 $done = DB_fetch_array($r);
19 $r=DB_query("SELECT AVG(datediff(mod_date,create_date)) FROM Game where status='gameover' ");
21 $avgage= DB_fetch_array($r);
30 echo "<p> If you want to play a game of Doppelkopf, you found the right place ;)".
31 " For more information please visit our <a href=\"$WIKI\">wiki</a>. </p>";
34 echo "<p> At the moment there are no games that are being started ";
36 echo "<p> At the moment there is one games that is being started ";
38 echo "<p> At the moment there are $pre games that are being started ";
43 echo "zero games that are ongoing. ";
45 echo "one game that is ongoing. ";
47 echo "$game games that are ongoing. ";
52 echo "No game has been completed on this server. </p>";
54 echo "One game has been completed on this server. </p>";
56 echo "$done games have been completed on this server. Average time of a game: $avgage days</p>";
59 <p> Please <a href="index.php?action=register">register</a>, in case you have not done that yet <br />
60 or login with you email-address or name and password here:
62 <form action="index.php?action=login" method="post">
64 <legend>Login</legend>
67 <td><label for="email">Email:</label></td>
68 <td><input type="text" id="email" name="email" size="20" maxlength="30" /> </td>
70 <td><label for="password">Password:</label></td>
71 <td><input type="password" id="password" name="password" size="20" maxlength="30" /></td>
73 <td> <input type="submit" class="submitbutton" name="login" value="login" /></td>
74 <td> <input type="submit" class="submitbutton" name="forgot" value="Forgot your password?" /></td>