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;
}
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 (or use the randomly pre-selected names)</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)
+ {
+ srand((float) microtime() * 10000000);
+ $randkey = array_rand($names);
+ $rand = $names[$randkey];
+ echo " Name: <select name=\"$player\" size=\"1\" /> \n";
+ foreach($names as $name)
+ {
+ if($name==$rand)
+ {
+ echo " <option selected=\"selected\">$name</option>\n";
+ }
+ else
+ echo " <option>$name</option>\n";
+ }
+ echo " </select>\n";
+ unset($names[$randkey]);
+ }
+?>
<input type="submit" value="start game" />
</form>
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">
function output_header()
{
+ global $REV;
?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
<body onload="high_last();">
<div class="header">
<h1> Welcome to E-Doko </h1>
+<p> Revision: <?php echo "$REV"; ?></p>
</div>
<?php