summaryrefslogtreecommitdiffstats
path: root/include/game.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2010-04-19 23:12:20 -0700
committerArun Persaud <arun@nubati.net>2010-04-19 23:12:20 -0700
commit4ce73b7eaf2f650f1500a3c668b0a7d6c0e49042 (patch)
treed9d51ce9c11bb01fe26a820dba92f33cb8ccc862 /include/game.php
parent761622f46541afbaf2303a791595f6595f3208eb (diff)
parent252c638b8028a86ba8cb5e315b3f13992b6fa77d (diff)
downloade-DoKo-4ce73b7eaf2f650f1500a3c668b0a7d6c0e49042.tar.gz
e-DoKo-4ce73b7eaf2f650f1500a3c668b0a7d6c0e49042.tar.bz2
e-DoKo-4ce73b7eaf2f650f1500a3c668b0a7d6c0e49042.zip
Merge branch 'master' of /home/arun/nubati.net/git/e-DoKo
Diffstat (limited to 'include/game.php')
-rw-r--r--include/game.php32
1 files changed, 21 insertions, 11 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";