summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2007-12-16 14:54:06 +0100
committerArun Persaud <arun@nubati.net>2007-12-16 22:33:43 +0100
commita28cbfa660f2ff982f1cdcee41c09cec772d84af (patch)
treee2c70082d93a44b373b6d57899590ac01dcc0d5c /index.php
parent672791e22e1de68e278e2f0d5c6d7331d5994ecb (diff)
downloade-DoKo-a28cbfa660f2ff982f1cdcee41c09cec772d84af.tar.gz
e-DoKo-a28cbfa660f2ff982f1cdcee41c09cec772d84af.tar.bz2
e-DoKo-a28cbfa660f2ff982f1cdcee41c09cec772d84af.zip
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.
Diffstat (limited to 'index.php')
-rw-r--r--index.php17
1 files changed, 0 insertions, 17 deletions
diff --git a/index.php b/index.php
index 8acb871..6584f0e 100644
--- a/index.php
+++ b/index.php
@@ -1153,13 +1153,8 @@ else if(myisset("me"))
$seq = $r[2];
$trick = $r[3];
$comment = $r[4];
- $timeplayed = strtotime($r[5]);
$user = $r[6];
- $offset = DB_get_user_timezone($user);
- $zone = return_timezone($offset);
- date_default_timezone_set($zone);
-
/* check if first schweinchen has been played */
if( $GAME["schweinchen"] && ($r[0] == 19 || $r[0] == 20) )
$GAME["schweinchen"]++;
@@ -2057,24 +2052,12 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
}
else /* output default user page */
{
- $time = DB_get_user_timestamp($myid);
- $unixtime = strtotime($time);
-
- $offset = DB_get_user_timezone($myid);
- $zone = return_timezone($offset);
- date_default_timezone_set($zone);
-
$myname = DB_get_name_by_email($email);
$_SESSION["name"] = $myname;
- if(isset($_SESSION["name"]))
- output_status($_SESSION["name"]);
-
/* display links to settings */
output_user_settings();
- echo "<div class=\"lastlogin\">last login: ".date("r",$unixtime)."</div>";
-
DB_update_user_timestamp($myid);
display_user_menu();