* use a variable defined in config.php to check this
*/
if(!isset($HOST))
exit;
/* test id and password, should really be done in one step */
* use a variable defined in config.php to check this
*/
if(!isset($HOST))
exit;
/* test id and password, should really be done in one step */
/* verify password and email */
if(strlen($password)!=32)
$password = md5($password);
/* verify password and email */
if(strlen($password)!=32)
$password = md5($password);
if($ok)
{
/* user information is ok */
$myname = DB_get_name('email',$email);
$_SESSION["name"] = $myname;
if($ok)
{
/* user information is ok */
$myname = DB_get_name('email',$email);
$_SESSION["name"] = $myname;
/* display all games the user has played */
echo "<div class=\"user\">";
echo "<h4>These are all your games:</h4>\n";
echo "<p>Session: <br />\n";
echo "<span class=\"gamestatuspre\"> p </span> = pre-game phase ";
echo "<span class=\"gamestatusplay\">P </span> = game in progess ";
/* display all games the user has played */
echo "<div class=\"user\">";
echo "<h4>These are all your games:</h4>\n";
echo "<p>Session: <br />\n";
echo "<span class=\"gamestatuspre\"> p </span> = pre-game phase ";
echo "<span class=\"gamestatusplay\">P </span> = game in progess ";
- $result = DB_query("SELECT Hand.hash,Hand.game_id,Game.mod_date,Game.player,Game.status from Hand".
- " LEFT JOIN Game ON Game.id=Hand.game_id".
+ $result = DB_query("SELECT Hand.hash,Hand.game_id,G.mod_date,G.player,G.status, ".
+ " (SELECT count(H.randomnumbers) FROM Game H WHERE H.randomnumbers=G.randomnumbers) AS count ".
+ " FROM Hand".
+ " LEFT JOIN Game G ON G.id=Hand.game_id".
/* display last 5 users that have signed up to e-DoKo */
$names = DB_get_names_of_new_logins(5);
echo "<h4>New Players:</h4>\n<p>\n";
echo implode(", ",$names).",...\n";
echo "</p>\n";
/* display last 5 users that have signed up to e-DoKo */
$names = DB_get_names_of_new_logins(5);
echo "<h4>New Players:</h4>\n<p>\n";
echo implode(", ",$names).",...\n";
echo "</p>\n";
/* display last 5 users that logged on */
$names = DB_get_names_of_last_logins(5);
echo "<h4>Players last logged in:</h4>\n<p>\n";
echo implode(", ",$names).",...\n";
echo "</p>\n";
/* display last 5 users that logged on */
$names = DB_get_names_of_last_logins(5);
echo "<h4>Players last logged in:</h4>\n<p>\n";
echo implode(", ",$names).",...\n";
echo "</p>\n";