better selection of players for new game
[e-DoKo.git] / output.php
index 000c2b2227b061ee405e1268a11cf15289959ca7..ef67cccc04961f41ac892b22fa24b6bc5ca50266 100644 (file)
@@ -16,9 +16,9 @@ function display_news()
   global $wiki;
   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";
+    "  The server now keeps score... (only from now on) <br /><hr />".
+    "  If you find more bugs, please list them in the <a href=\"".
+    $wiki."\">wiki</a>.\n</div>\n";
   return;
 }
 
@@ -83,15 +83,20 @@ function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid)
   return;
 }
 
-function output_form_for_new_game()
+function output_form_for_new_game($names)
 {
 ?>
-    <p>Please add 4 names, please make sure that the names are correct! </p>
+    <p>Please select four players </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" /> 
+<?php
+  foreach( array("PlayerA","PlayerB","PlayerC","PlayerD") as $player)
+  {
+    echo "    Name:  <select name=\"$player\" size=\"1\" />  \n";
+     foreach($names as $name)
+      echo "     <option>$name</option>\n";
+    echo "  </select>\n";
+   }
+?>   
 
    <input type="submit" value="start game" />
  </form>
@@ -123,7 +128,7 @@ function display_link_card($card)
 function check_for_sickness($me,$mycards)
 {
  ?>
-  <p> nothing implemented so far, but give it a try anyway ;) </p>               
+  <p> Solo will work, but the first player will not change. Nothing else implemented. </p>               
 
   <form action="index.php" method="post">
 
@@ -230,6 +235,7 @@ function output_home_page()
 
 function output_header()
 {
+   global $REV;
 ?>
 <!DOCTYPE html PUBLIC
     "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
@@ -267,6 +273,7 @@ function output_header()
 <body onload="high_last();">
 <div class="header">
 <h1> Welcome to E-Doko </h1>
+<p> Revision: <?php echo "$REV"; ?></p>
 </div>
 
 <?php