From c44e3cfcc5f363f001b101a82b1c06bfa7b05e69 Mon Sep 17 00:00:00 2001
From: Arun Persaud These are your games that haven't started yet: \n";
while( $r = mysql_fetch_array($result,MYSQL_NUM))
{
echo "game ".DB_format_gameid($r[1])." ";
- if($r[3]==$uid || $r[3]==NULL)
+ if($r[3]==$myid || $r[3]==NULL)
echo "(it's your turn)\n";
else
{
@@ -1742,17 +1745,18 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
}
echo " These are the games you are playing in: \n";
while( $r = mysql_fetch_array($result,MYSQL_NUM))
{
echo "game ".DB_format_gameid($r[1])." ";
if($r[3])
{
- if($r[3]==$uid)
+ if($r[3]==$myid)
echo "(it's your turn)\n";
else
{
@@ -1769,22 +1773,31 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
echo " And these are your games that are already done: Session:\n";
$output = array();
$result = mysql_query("SELECT hash,game_id from Hand".
" LEFT JOIN Game ON Game.id=Hand.game_id".
- " WHERE user_id='$uid' AND Game.status='gameover'".
+ " WHERE user_id='$myid' AND Game.status='gameover'".
" ORDER BY Game.session,Game.create_date" );
+ $gamenrold = 0;
+ echo "
";
mysql_query("UPDATE User SET password='".md5($_REQUEST["password1"]).
- "' WHERE id=".DB_quote_smart($uid));
+ "' WHERE id=".DB_quote_smart($myid));
break;
}
/* set password */
@@ -1698,10 +1698,10 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
}
else /* output default user page */
{
- $time = DB_get_user_timestamp($uid);
+ $time = DB_get_user_timestamp($myid);
$unixtime = strtotime($time);
- $offset = DB_get_user_timezone($uid);
+ $offset = DB_get_user_timezone($myid);
$zone = return_timezone($offset);
date_default_timezone_set($zone);
@@ -1716,17 +1716,20 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
echo "last login: ".date("r",$unixtime)."
";
- DB_update_user_timestamp($uid);
-
- echo "
\n";
+ DB_update_user_timestamp($myid);
+
+ display_user_menu();
+
+ echo "These are your games that haven't started yet:
\n";
$result = mysql_query("SELECT Hand.hash,Hand.game_id,Game.mod_date,Game.player from Hand".
" LEFT JOIN Game On Hand.game_id=Game.id".
- " WHERE Hand.user_id='$uid' AND Game.status='pre'".
+ " WHERE Hand.user_id='$myid' AND Game.status='pre'".
" ORDER BY Game.session" );
+ echo "
\n";
+ echo "These are the games you are playing in:
\n";
$result = mysql_query("SELECT Hand.hash,Hand.game_id,Game.mod_date,Game.player from Hand".
" LEFT JOIN Game On Hand.game_id=Game.id".
- " WHERE Hand.user_id='$uid' AND Game.status='play'".
+ " WHERE Hand.user_id='$myid' AND Game.status='play'".
" ORDER BY Game.session" );
+ echo "
Game: \n";
+ echo "And these are your games that are already done:
\n";
+ echo "
\n";
while( $r = mysql_fetch_array($result,MYSQL_NUM))
- $output[] = "".DB_format_gameid($r[1])." ";
- echo implode(", ",$output)."
$gamenr: ";
+ }
+ echo "I ";
+ }
+ echo "
Registered players:
\n";
+ echo "
\n"; echo implode(", ",$names)."\n"; echo "
\n"; - - echo "Want to start a new game? Visit this page.
"; } } else -- cgit v1.2.3-18-g5258