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 "<div class=\"login\">\n";
32 echo "<p> If you want to play a game of Doppelkopf, you found the right place ;)</p>".
33 "<p> For more information please visit our <a href=\"$WIKI\">wiki</a>. </p>".
34 "<h4>Some statistics:</h4>";
38 echo "<p> At the moment there are no games that are being started ";
40 echo "<p> At the moment there is one games that is being started ";
42 echo "<p> At the moment there are $pre games that are being started ";
47 echo "zero games that are ongoing. ";
49 echo "one game that is ongoing. ";
51 echo "$game games that are ongoing. ";
56 echo "No game has been completed on this server. </p>";
58 echo "One game has been completed on this server. </p>";
60 echo "$done games have been completed on this server. Average time of a game: $avgage days</p>";
63 <h4> Login/Register:</h4>
65 Please <a href="index.php?action=register">register</a>, in case you have not done that yet <br />
66 or login with you email-address or name and password here:
69 <form action="index.php?action=login" method="post">
73 <td><label for="email">Email:</label></td>
74 <td><input type="text" class="submitbutton" id="email" name="email" size="20" maxlength="30" /> </td>
77 <td><label for="password">Password:</label></td>
78 <td><input type="password" class="submitbutton" id="password" name="password" size="20" maxlength="30" /></td>
81 <td> <input type="submit" class="submitbutton" name="login" value="login" /></td>
82 <td> <input type="submit" class="submitbutton" name="forgot" value="Forgot your password?" /></td>