summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/game.php32
-rw-r--r--include/output.php46
2 files changed, 44 insertions, 34 deletions
diff --git a/include/game.php b/include/game.php
index aa25616..bd25e78 100644
--- a/include/game.php
+++ b/include/game.php
@@ -2095,41 +2095,51 @@ else
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&amp;me=$otherhash\">$othername</a><br />";
+ echo " <a href=\"$INDEX?action=game&amp;me=$otherhash\">$othername</a> ";
}
- echo "</p>\n";
+ echo " </p>\n";
}
-echo "</div>\n";
+echo "</div>\n"; /* end gameinfo */
echo "</form>\n";
diff --git a/include/output.php b/include/output.php
index 9c4316c..03e6ced 100644
--- a/include/output.php
+++ b/include/output.php
@@ -293,60 +293,60 @@ function output_check_for_sickness($me,$mycards)
function output_form_calls($me,$myparty)
{
- $highstart = "<span class=\"highcall\">";
- $highend = "</span>";
+ $highstart = ' <span class="highcall">';
+ $highend = '</span>';
$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 " <input type=\"radio\" name=\"call\" value=\"120\" />";
+ echo ' re/contra (120):';
+ echo ' <input type="radio" name="call" value="120" />';
if($tmp==2) echo $highend;
- echo "<br />\n";
+ echo "\n";
}
- $tmp = can_call(90,$me);
+ $tmp = can_call(90,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
- echo " 90:".
- " <input type=\"radio\" name=\"call\" value=\"90\" />";
+ echo ' 90:'.
+ ' <input type="radio" name="call" value="90" />';
if($tmp==2) echo $highend;
- echo "<br />\n";
+ echo "\n";
}
$tmp = can_call(60,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
- echo " 60:".
- " <input type=\"radio\" name=\"call\" value=\"60\" />";
+ echo ' 60:'.
+ ' <input type="radio" name="call" value="60" />';
if($tmp==2) echo $highend;
- echo "<br />\n";
+ echo "\n";
}
$tmp = can_call(30,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
- echo " 30:".
- " <input type=\"radio\" name=\"call\" value=\"30\" />";
+ echo ' 30:'.
+ ' <input type="radio" name="call" value="30" />';
if($tmp==2) echo $highend;
- echo "<br />\n";
+ echo "\n";
}
$tmp = can_call(0,$me);
if( $tmp )
{
if($tmp==2) echo $highstart;
- echo " 0:".
- " <input type=\"radio\" name=\"call\" value=\"0\" />";
+ echo ' 0:'.
+ ' <input type="radio" name="call" value="0" />';
if($tmp==2) echo $highend;
- echo "<br />\n".
- " no call:".
- " <input type=\"radio\" name=\"call\" value=\"no\" /> <br />";
+ echo "\n".
+ ' no call:'.
+ ' <input type="radio" name="call" value="no" />'."\n";
}
}
@@ -376,7 +376,7 @@ function output_header()
<title>e-Doko</title>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<link rel="shortcut icon" type="image/x-icon" href="pics/edoko-favicon.png" />
- <link rel="stylesheet" type="text/css" href="css/standard023.css" />
+ <link rel="stylesheet" type="text/css" href="css/standard024.css" />
<script type="text/javascript" src="include/game.js"> </script>
<script type="text/javascript" src="include/jquery.js"> </script>
<script type="text/javascript" src="include/jquery.tablesorter.js"></script>