feature: added link to game in final email, CC'ed people in final email
[e-DoKo.git] / db.php
diff --git a/db.php b/db.php
index 98e77249f6f2aab77271ac1d553986d1b940fc72..64a80b9f7abfc10e597a4fbb78c37807364f87a5 100644 (file)
--- a/db.php
+++ b/db.php
@@ -704,5 +704,32 @@ function DB_set_party_by_hash($hash,$party)
   return;
 }
 
+function DB_get_PREF($myid)
+{
+  global $PREF;
+
+    $result = mysql_query("SELECT value from User_Prefs".
+                         " WHERE user_id='$myid' AND pref_key='cardset'" );
+    $r = mysql_fetch_array($result,MYSQL_NUM);
+    if($r)
+      {
+       if($r[0]=="germancards" && (time()-strtotime( "2009-12-31 23:59:59")<0) ) /* licence only valid until then */
+         $PREF["cardset"]="altenburg";
+      else
+       $PREF["cardset"]="english";
+      }
+    else
+      $PREF["cardset"]="english";
+
+    $result = mysql_query("SELECT value from User_Prefs".
+                         " WHERE user_id='$myid' AND pref_key='ccemail'" );
+    $r = mysql_fetch_array($result,MYSQL_NUM);
+    if($r)
+      $PREF["ccemail"]=$r[0];
+    else
+      $PREF["ccemail"]="no";
+
+    return;
+}
 
 ?>
\ No newline at end of file