From a28cbfa660f2ff982f1cdcee41c09cec772d84af Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sun, 16 Dec 2007 14:54:06 +0100 Subject: BUGFIX: time display used wrong timezones. also optimized things a bit Got rid of a few db-queries for getting the right timezone. The timezone was also set after the timefunction was called and therefore the timezone didn't have any effect. --- output.php | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'output.php') diff --git a/output.php b/output.php index 8dc0c2e..29fd8f3 100644 --- a/output.php +++ b/output.php @@ -267,7 +267,7 @@ function output_home_page($pre,$game,$done,$avgtime) echo "$done games have been completed on this server. Average time of a game: $avgtime days

"; ?> -

Please register, in case you haven't done that yet
+

Please register, in case you have not done that yet
or login with you email-address or name and password here:

@@ -333,8 +333,29 @@ function output_header()

Welcome to E-Doko (beta)

-
\n"; + echo $name; + echo " logout\n"; + echo "
"; + + /* last logon time */ + $myid = DB_get_userid_by_name($name); + $zone = DB_get_user_timezone($myid); + date_default_timezone_set($zone); + + $time = DB_get_user_timestamp($myid); + $unixtime = strtotime($time); + + echo "
last login: ".date("r",$unixtime)."
"; + }; + + echo "
"; return; } @@ -365,10 +386,6 @@ function output_footer() function output_status($name) { - echo "
\n"; - echo $name; - echo " logout\n"; - echo "
"; return; } -- cgit v1.2.3-18-g5258