moved files to top of domain and found a few links that didn't use the one defined...
[e-DoKo.git] / functions.php
index 0ce10e29801ad8b75d484a71fce53eaae51ffd7e..f77f8aead048b977016e6983c99a177d247e965c 100644 (file)
@@ -1,21 +1,5 @@
 <?php
 
 <?php
 
-/*
- * config 
- */
-
-$host  = "http://doko.nubati.net/index.php";
-$wiki  = "http://wiki.nubati.net/index.php?title=EmailDoko";
-$debug = 1;
-
-$last=-2;
-
-/*
- * end config
- */    
-
-
-/* helper function */
 function mymail($To,$Subject,$message)
 {  
   global $debug;
 function mymail($To,$Subject,$message)
 {  
   global $debug;
@@ -410,7 +394,7 @@ function display_status()
 {
   echo "<div class=\"info\">";
   echo " is someone playing solo, etc?";
 {
   echo "<div class=\"info\">";
   echo " is someone playing solo, etc?";
-  echo "</div>";
+  echo "</div>\n";
   
   return;
 }
   
   return;
 }
@@ -418,11 +402,11 @@ function display_status()
 function display_news()
 {
   global $wiki;
 function display_news()
 {
   global $wiki;
-  echo "<div class=\"bug\"> ".
-    "Please hit shift+reload.<br /><hr />".
-    "New Database backend, lost a few features on the way.<br /><hr />".
-    "If you find more bugs, please list them in the <a href=\"".$wiki.
-    "\">wiki</a>.</div>\n";
+  echo "<div class=\"bug\">\n".
+    "  Please hit <strong>shift+reload</strong>.<br /><hr />\n".
+    "  added local time display, let me know what you think<br /><hr />\n".
+    "  If you find more bugs, please list them in the <a href=\"".$wiki.
+    "\">wiki</a>.\n</div>\n";
   return;
 }
 
   return;
 }
 
@@ -431,4 +415,39 @@ function display_cards($me,$myturn)
   return;
 }
 
   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 output_form_for_new_game()
+{
+?>
+    <p>Please add 4 names, please make sure that the names are correct! </p>
+       <form action="index.php" method="post">
+   Name:  <input name="PlayerA" type="text" size="10" maxlength="20" /> 
+   Name:  <input name="PlayerB" type="text" size="10" maxlength="20" /> 
+   Name:  <input name="PlayerC" type="text" size="10" maxlength="20" /> 
+   Name:  <input name="PlayerD" type="text" size="10" maxlength="20" /> 
+
+   <input type="submit" value="start game" />
+ </form>
+<?php
+}
+
 ?>
\ No newline at end of file
 ?>
\ No newline at end of file