';
- 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 '
';
@@ -293,60 +328,60 @@ function output_check_for_sickness($me,$mycards)
function output_form_calls($me,$myparty)
{
- $highstart = "
";
- $highend = " ";
+ $highstart = '
';
+ $highend = ' ';
$tmp = can_call(120,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
if($myparty=='re')
- echo "re (120):";
+ echo ' re (120):';
else if ($myparty=='contra')
- echo "contra (120):";
+ echo ' contra (120):';
else
- echo " re/contra (120):";
- echo "
";
+ echo ' re/contra (120):';
+ echo '
';
if($tmp==2) echo $highend;
- echo "
\n";
+ echo "\n";
}
- $tmp = can_call(90,$me);
+ $tmp = can_call(90,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
- echo " 90:".
- "
";
+ echo ' 90:'.
+ '
';
if($tmp==2) echo $highend;
- echo "
\n";
+ echo "\n";
}
$tmp = can_call(60,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
- echo " 60:".
- "
";
+ echo ' 60:'.
+ '
';
if($tmp==2) echo $highend;
- echo "
\n";
+ echo "\n";
}
$tmp = can_call(30,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
- echo " 30:".
- "
";
+ echo ' 30:'.
+ '
';
if($tmp==2) echo $highend;
- echo "
\n";
+ echo "\n";
}
$tmp = can_call(0,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
- echo " 0:".
- "
";
+ echo ' 0:'.
+ '
';
if($tmp==2) echo $highend;
- echo "
\n".
- " no call:".
- "
";
+ echo "\n".
+ ' no call:'.
+ '
'."\n";
}
}
@@ -368,31 +403,29 @@ function output_header()
{
global $REV;
?>
-
-
+
+
e-Doko
-
-
-
-
+
+
+
+
+
+
+
+
-
+
";
@@ -401,23 +434,21 @@ function output_header()
function output_footer()
{
- global $REV,$PREF;
+ global $REV, $PREF, $INDEX;
echo "
\n\n";
- echo "\n";
-
+ echo "\n\n";
echo "\n";
echo "\n";
@@ -454,15 +485,9 @@ function output_status()
echo " |