summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2006-12-08 14:00:56 +0000
committerarun <arun>2006-12-08 14:00:56 +0000
commitf0bbdae184fed051df8ae0e93a41e88c9442a7db (patch)
tree938102ae35324a9bb3e91492a53b4f48414ec2b6 /db.php
parent351e3df476b7cc3d6d3db7ec5833367e449bbdfa (diff)
downloade-DoKo-f0bbdae184fed051df8ae0e93a41e88c9442a7db.tar.gz
e-DoKo-f0bbdae184fed051df8ae0e93a41e88c9442a7db.tar.bz2
e-DoKo-f0bbdae184fed051df8ae0e93a41e88c9442a7db.zip
added local time output
Diffstat (limited to 'db.php')
-rw-r--r--db.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/db.php b/db.php
index 10c5de2..9f00205 100644
--- a/db.php
+++ b/db.php
@@ -349,4 +349,31 @@ function DB_get_all_names()
return $names;
}
+
+function DB_update_user_timestamp($userid)
+{
+ mysql_query("UPDATE User SET last_login = CURRENT_TIMESTAMP WHERE id=".DB_quote_smart($userid));
+ return;
+}
+
+function DB_get_user_timestamp($userid)
+{
+ $result = mysql_query("SELECT last_login FROM User WHERE id=".DB_quote_smart($userid));
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+
+ if($r)
+ return $r[0];
+ else
+ return NULL;
+}
+function DB_get_user_timezone($userid)
+{
+ $result = mysql_query("SELECT timezone FROM User WHERE id=".DB_quote_smart($userid));
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+
+ if($r)
+ return $r[0];
+ else
+ return 0;
+}
?> \ No newline at end of file