diff options
author | Arun Persaud <arun@nubati.net> | 2009-01-30 21:05:32 -0800 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2009-01-30 21:05:32 -0800 |
commit | c1585e23cb3ea757674c234c9193889b4f2f2090 (patch) | |
tree | 3f87836cef1a81e400e4a660c0433ad4080acc97 /include/db.php | |
parent | ee08bf05ddb0bb5722b0f8b1569d7ab4473a798d (diff) | |
download | e-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.php | 23 |
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; } |