X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=functions.php;h=0ce3104701f2175c24d53f6e63053904ba8846d7;hp=a9ea34bc9570e9efee9bc50ee96a799a0b040c54;hb=becb5e1267866b1fa858c08125fdba81003dfc65;hpb=5db5f9e9ee3544b1a2b82ad1dc4e250530dd8e64 diff --git a/functions.php b/functions.php index a9ea34b..0ce3104 100644 --- a/functions.php +++ b/functions.php @@ -390,26 +390,6 @@ function display_cards($me,$myturn) return; } -function return_timezone($offset) -{ - switch($offset) - { - case '1': - $zone = "Europe/Berlin"; - break; - case '-8': - $zone = "America/Vancouver"; - break; - case '13': - $zone = "Pacific/Auckland"; - break; - default: - $zone = "Europe/London"; - } - - return $zone; -} - function have_suit($cards,$c) { global $CARDS; @@ -660,7 +640,7 @@ function can_call($what,$hash) function display_table () { - global $gameid, $GT, $debug,$host; + global $gameid, $GT, $debug,$INDEX,$defaulttimezone; $result = mysql_query("SELECT User.fullname as name,". " Hand.position as position, ". @@ -669,7 +649,8 @@ function display_table () " Hand.sickness as sickness, ". " Hand.point_call, ". " User.last_login, ". - " Hand.hash ". + " Hand.hash, ". + " User.timezone ". "FROM Hand ". "LEFT JOIN User ON User.id=Hand.user_id ". "WHERE Hand.game_id='".$gameid."' ". @@ -685,18 +666,18 @@ function display_table () $party = $r[3]; $sickness = $r[4]; $call = $r[5]; - $lastlogin = strtotime($r[6]); $hash = $r[7]; - - $offset = DB_get_user_timezone($user); - $zone = return_timezone($offset); - date_default_timezone_set($zone); + $timezone = $r[8]; + date_default_timezone_set($defaulttimezone); + $lastlogin = strtotime($r[6]); + date_default_timezone_set($timezone); + $timenow = strtotime(date("Y-m-d H:i:s")); echo "
\n"; @@ -804,29 +785,30 @@ function display_table () function display_user_menu() { - global $wiki,$myid,$host; + global $wiki,$myid,$INDEX,$STATS; echo " \n"; return; }