no game in progress, please input 4 names and email addresses, please make sure that the addresses are correct!
-
\n";
foreach($mycards as $card)
display_card($card);
}
echo "\n";
- /*check if we still have cards left, else set status to gameover */
-
- break;
- case 'gameover':
- echo "the game is over... guess the final score should be displayed here... \n";
- echo "TODO: suggest a new game with the next person as dealer \n";
+
+ /* check if we need to set status to 'gameover' is done during playing of the card */
+ if($mystatus=='play')
+ break;
+ /* the following happens only when the gamestatus is 'gameover' */
+ /* check if game is over, display results */
+ if(DB_get_game_status_by_gameid($gameid)=='play')
+ {
+ echo "the game is over for you.. other people still need to play though";
+ }
+ else
+ {
+ echo "the game is over now... guess the final score should be displayed here... \n";
+
+ /* suggest a new game with the same people in it, just rotated once */
+ $names = DB_get_all_names_by_gameid($gameid);
+
+ echo "Do you want to continue playing?(This will start a new game, with the next person as dealer.)\n";
+ echo "\n";
+ }
break;
default:
echo "error in testing the status";
@@ -472,8 +542,25 @@ else if(isset($_REQUEST["me"]))
if($ok)
{
- echo "ok. your logged in, now what? :) ";
+ $time = DB_get_user_timestamp($uid);
+ $unixtime =strtotime($time);
+ $offset = DB_get_user_timezone($uid);
+ $zone = return_timezone($offset);
+ date_default_timezone_set($zone);
+
+ echo "ok. your logged in, now what? :) last login: ";
+ echo date("r",$unixtime)." ";
+
+ DB_update_user_timestamp($uid);
+
+ $names = DB_get_all_names();
+ echo "