';
- echo '
';
- /* ask player for names */
+ echo '
';
- $i=0;
+ echo "
\n";
+ $randkey = array_rand($copy_names);
+ $rand = $copy_names[$randkey];
+ /* delete this name from the list of possible names */
+ unset($copy_names[$randkey]);
+ echo " \n";
+ foreach($names as $name)
+ {
+ if($name==$rand)
+ echo " $name \n";
+ else
+ echo " $name \n";
+ }
+ echo " \n
\n";
- /* delete players name, since he will be on position D anyway */
- unset($copy_names[array_search($_SESSION["name"],$copy_names)]);
+ echo '
';
- srand((float) microtime() * 10000000);
- foreach( array("PlayerA","PlayerB","PlayerC","PlayerD") as $player)
+ $randkey = array_rand($copy_names);
+ $rand = $copy_names[$randkey];
+ /* delete this name from the list of possible names */
+ unset($copy_names[$randkey]);
+ echo "
\n";
+ echo " \n";
+ foreach($names as $name)
{
- /* pick 3 names at random and put the players name on position D*/
- if($i<3)
- {
- $randkey = array_rand($copy_names);
- $rand = $copy_names[$randkey];
- /* delete this name from the list of possible names */
- unset($copy_names[$randkey]);
- }
+ if($name==$rand)
+ echo " $name \n";
else
- {
- $rand = $_SESSION["name"];
- }
+ echo " $name \n";
+ }
+ echo " \n
\n";
- echo "
\n";
- $i++;
- echo " \n";
- foreach($names as $name)
- {
- if($name==$rand)
- {
- echo " $name \n";
- }
- else
- echo " $name \n";
- }
- echo " \n
\n";
+ echo '
';
+ $randkey = array_rand($copy_names);
+ $rand = $copy_names[$randkey];
+ /* delete this name from the list of possible names */
+ unset($copy_names[$randkey]);
+ echo "
\n";
+ echo " \n";
+ foreach($names as $name)
+ {
+ if($name==$rand)
+ echo " $name \n";
+ else
+ echo " $name \n";
}
+ echo " \n
\n";
+
+ echo '
';
+ $rand = $_SESSION["name"];
+ echo "
\n";
+ $i++;
+ echo " \n";
+ foreach($names as $name)
+ {
+ if($name==$rand)
+ echo " $name \n";
+ else
+ echo " $name \n";
+ }
+ echo " \n
\n";
+
+ /* ask player for names */
echo '
';
echo '';
@@ -202,12 +234,15 @@ function display_card($card,$dir="english")
return;
}
-function display_link_card($card,$dir="english",$type="card")
+function display_link_card($card,$dir="english",$type="card", $selected=0)
{
+ if($selected)
+ $selected = 'checked="checked"';
+
if( $card/2 - (int)($card/2) == 0.5)
- echo "
\n";
+ echo "
\n";
else
- echo "
\n";
+ echo "
\n";
return;
}
@@ -219,14 +254,14 @@ function output_check_for_sickness($me,$mycards)
echo '';
echo ' '._('Do you want to play solo?').'';
echo '
';
- echo ' '.'No'.' ';
- echo ' '.'trumpless'.' ';
- echo ' '.'trump'.' ';
- echo ' '.'queen'.' ';
- echo ' '.'jack'.' ';
- echo ' '.'club'.' ';
- echo ' '.'spade'.' ';
- echo ' '.'heart'.' ';
+ echo ' '.'No'.' ';
+ echo ' '._('trumpless').' ';
+ echo ' '._('trump').' ';
+ echo ' '._('queen').' ';
+ echo ' '._('jack').' ';
+ echo ' '._('club').' ';
+ echo ' '._('spade').' ';
+ echo ' '._('heart').' ';
echo ' ';
echo '
';
@@ -368,44 +403,29 @@ function output_header()
{
global $REV;
?>
-
-
+
+
e-Doko
-
-
-
-
+
+
+
+
+
+
+
+
-
+
";
@@ -417,20 +437,18 @@ function output_footer()
global $REV, $PREF, $INDEX;
echo "
\n\n";
- echo "\n";
-
+ echo "\n\n";
echo "\n";
echo "\n";
@@ -467,15 +485,9 @@ function output_status()
echo " |