summaryrefslogtreecommitdiffstats
path: root/include/db.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2009-01-30 21:05:32 -0800
committerArun Persaud <arun@nubati.net>2009-01-30 21:05:32 -0800
commitc1585e23cb3ea757674c234c9193889b4f2f2090 (patch)
tree3f87836cef1a81e400e4a660c0433ad4080acc97 /include/db.php
parentee08bf05ddb0bb5722b0f8b1569d7ab4473a798d (diff)
downloade-DoKo-c1585e23cb3ea757674c234c9193889b4f2f2090.tar.gz
e-DoKo-c1585e23cb3ea757674c234c9193889b4f2f2090.tar.bz2
e-DoKo-c1585e23cb3ea757674c234c9193889b4f2f2090.zip
NEW FEATURE: vacation support
users can specify a vacation start and end date and a message. Once they are on vacation their name will be shown in a different color at the table and on the user page (in case it is their turn).
Diffstat (limited to 'include/db.php')
-rw-r--r--include/db.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/db.php b/include/db.php
index 27d639e..b8bcea8 100644
--- a/include/db.php
+++ b/include/db.php
@@ -763,6 +763,29 @@ function DB_get_PREF($myid)
else
$PREF['open_for_games']='yes';
+ /* Vacation start */
+ $r = DB_query_array("SELECT value FROM User_Prefs".
+ " WHERE user_id='$myid' AND pref_key='vacation start'" );
+ if($r)
+ $PREF['vacation_start'] = $r[0];
+ else
+ $PREF['vacation_start'] = NULL;
+
+ /* Vacation stop */
+ $r = DB_query_array("SELECT value FROM User_Prefs".
+ " WHERE user_id='$myid' AND pref_key='vacation stop'" );
+ if($r)
+ $PREF['vacation_stop'] = $r[0];
+ else
+ $PREF['vacation_stop'] = NULL;
+
+ /* Vacation comment */
+ $r = DB_query_array("SELECT value FROM User_Prefs".
+ " WHERE user_id='$myid' AND pref_key='vacation comment'" );
+ if($r)
+ $PREF['vacation_comment'] = $r[0];
+ else
+ $PREF['vacation_comment'] = "";
return $PREF;
}