if($finalscore)
{
- echo "Score: \n";
+ echo _('Score').": \n";
foreach($finalscore as $user=>$value)
{
$name = DB_get_name('userid',$user);
$mycards = DB_get_hand($me);
$mycards = mysort($mycards,$gametype);
- /* output sickness of other playes, in case the already selected and are sitting in front of the current player */
+ /* output sickness of other playes, in case they already selected and are sitting in front of the current player */
echo "\n<ul class=\"tricks\">\n";
echo " <li class=\"nohighlight\"> Game ".DB_format_gameid($gameid).": </li>\n";
echo " <li onclick=\"hl('0');\" class=\"current\"><a href=\"#\">Pre</a>\n".
$firstcard = ''; /* first card in a trick */
echo "\n<ul class=\"tricks\">\n";
- echo " <li class=\"nohighlight\"> Game ".DB_format_gameid($gameid).": </li>\n";
+ echo ' <li class="nohighlight"> '._('Game').' '.DB_format_gameid($gameid).": </li>\n";
/* output vorbehalte */
- $mygametype = DB_get_gametype_by_gameid($gameid);
- if($mygametype != 'normal' && $mygametype != 'silent') /* only show when needed */
- {
- echo " <li onclick=\"hl('0');\" class=\"current\"><a href=\"#\">Pre</a>\n".
- " <div class=\"trick\" id=\"trick0\">\n";
+ $mygametype = DB_get_gametype_by_gameid($gameid);
+ $mygamesolo = DB_get_solo_by_gameid($gameid);
+ if($mygametype != 'normal') /* only show when needed */
+ if(!( $mygametype == 'solo' && $mygamesolo == 'silent') )
+ {
+ echo " <li onclick=\"hl('0');\" class=\"current\"><a href=\"#\">Pre</a>\n".
+ " <div class=\"trick\" id=\"trick0\">\n";
- /* get information so show the cards that have been handed over in a poverty game */
- output_exchanged_cards();
+ /* get information so show the cards that have been handed over in a poverty game */
+ output_exchanged_cards();
- echo " </div>\n </li>\n"; /* end div trick, end li trick */
- }
+ echo " </div>\n </li>\n"; /* end div trick, end li trick */
+ }
/* output tricks */
while($r = DB_fetch_array($result))
if($trick!=$lasttrick)
{
/* start of an old trick? */
- echo " <li onclick=\"hl('$trickNR');\" class=\"old\"><a href=\"#\">Trick $trickNR</a>\n".
+ echo " <li onclick=\"hl('$trickNR');\" class=\"old\"><a href=\"#\">"._('Trick')." $trickNR</a>\n".
" <div class=\"trick\" id=\"trick".$trickNR."\">\n".
" <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
}
else if($trick==$lasttrick)
{
/* start of a last trick? */
- echo " <li onclick=\"hl('$trickNR');\" class=\"current\"><a href=\"#\">Trick $trickNR</a>\n".
+ echo " <li onclick=\"hl('$trickNR');\" class=\"current\"><a href=\"#\">"._('Trick')." $trickNR</a>\n".
" <div class=\"trick\" id=\"trick".$trickNR."\">\n".
" <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
};
$pos = DB_get_pos_by_hash($me);
if($sequence==1)
{
- echo " <li onclick=\"hl('".($tricknr)."');\" class=\"current\"><a href=\"#\">Trick ".($tricknr)."</a>\n".
+ echo " <li onclick=\"hl('".($tricknr)."');\" class=\"current\"><a href=\"#\">"._('Trick').' '.($tricknr)."</a>\n".
" <div class=\"trick\" id=\"trick".($tricknr)."\">\n".
" <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
}
/* display points in case game is over */
if($mystatus=='gameover' && DB_get_game_status_by_gameid($gameid)=='gameover' )
{
- echo " <li onclick=\"hl('13');\" class=\"current\"><a href=\"#\">Score</a>\n".
+ echo " <li onclick=\"hl('13');\" class=\"current\"><a href=\"#\">"._('Score')."</a>\n".
" <div class=\"trick\" id=\"trick13\">\n";
/* add pic for re/contra
" <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";*/
echo " </div>\n </li>\n"; /* end div trick, end li trick */
}
- echo " <li onclick=\"hl_prev();\" class=\"old\"><a href=\"#\">prev</a></li>\n";
- echo " <li onclick=\"hl_next();\" class=\"old\"><a href=\"#\">next</a></li>\n";
+ echo " <li onclick=\"hl_prev();\" class=\"old\"><a href=\"#\">"._('prev')."</a></li>\n";
+ echo " <li onclick=\"hl_next();\" class=\"old\"><a href=\"#\">"._('next')."</a></li>\n";
echo "</ul>\n"; /* end ul tricks*/
$mycards = DB_get_hand($me);
echo "</div>\n";
}
-/* display rule set for this game */
+/*
+ * display gameinfo: re/contra, comment-box, play-card button, games played by others
+ */
+
echo "<div class=\"gameinfo\">\n";
+/* get time from the last action of the game */
+$r = DB_query_array("SELECT mod_date from Game WHERE id='$gameid' " );
+$gameend = time() - strtotime($r[0]);
+
+/* comment box */
+if($gamestatus == 'play' || $gameend < 60*60*24*7)
+ {
+ echo ' '._('A short comment').":<input name=\"comment\" type=\"text\" size=\"20\" maxlength=\"100\" />\n";
+ }
+
+/* re-contra */
if($gamestatus == 'play' )
{
$myparty = DB_get_party_by_hash($me);
output_form_calls($me,$myparty);
}
-/* get time from the last action of the game */
-$r = DB_query_array("SELECT mod_date from Game WHERE id='$gameid' " );
-$gameend = time() - strtotime($r[0]);
+/* play-card button */
if($gamestatus == 'play' || $gameend < 60*60*24*7)
{
- echo "<br />\n"._('A short comment').":<input name=\"comment\" type=\"text\" size=\"15\" maxlength=\"100\" />\n";
+ echo " <input type=\"submit\" value=\""._('submit')."\" />\n";
}
-echo "<input type=\"submit\" value=\""._('submit')."\" />\n";
-
/* has this hand been played by others? */
$other_game_ids = DB_played_by_others($gameid);
if(sizeof($other_game_ids)>0 && $mystatus=='gameover')
{
$mypos = DB_get_pos_by_hash($me);
- echo "<p>See how other played the same hand: <br />\n";
+ echo " <p>See how other played the same hand: \n";
foreach($other_game_ids as $id)
{
$otherhash = DB_get_hash_from_game_and_pos($id,$mypos);
$othername = DB_get_name('hash',$otherhash);
- echo "<a href=\"$INDEX?action=game&me=$otherhash\">$othername</a><br />";
+ echo " <a href=\"$INDEX?action=game&me=$otherhash\">$othername</a> ";
}
- echo "</p>\n";
+ echo " </p>\n";
}
-echo "</div>\n";
+echo "</div>\n"; /* end gameinfo */
echo "</form>\n";