summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2007-08-05 10:44:12 -0700
committerArun Persaud <arun@nubati.net>2007-08-05 10:44:12 -0700
commit092ae96405d4da11bc392dc92e7e103ce48b6045 (patch)
tree20b8349bf34114de9684eaf2d0ef943f8b5dbe07 /index.php
parent465e73265bc236531832686a8ae54894be928b81 (diff)
downloade-DoKo-092ae96405d4da11bc392dc92e7e103ce48b6045.tar.gz
e-DoKo-092ae96405d4da11bc392dc92e7e103ce48b6045.tar.bz2
e-DoKo-092ae96405d4da11bc392dc92e7e103ce48b6045.zip
BUGFIX: output call only after game started; move after game comments to right menu
the re/contra, etc. box showed up after a user finished the setup, changed it so that it now only shows up after the game has started. The input form for comments after a game has finished was still in the card area, moved it to the right game menu.
Diffstat (limited to 'index.php')
-rw-r--r--index.php24
1 files changed, 9 insertions, 15 deletions
diff --git a/index.php b/index.php
index de8dc1d..c565607 100644
--- a/index.php
+++ b/index.php
@@ -303,10 +303,16 @@ else if(myisset("me"))
echo "call: ".$RULES["call"] ."<br />\n";
echo "<hr />\n";
- if($mystatus == 'play' )
+ if($gamestatus == 'play' )
+ output_form_calls($me);
+
+ /* get time from the last action of the game */
+ $result = mysql_query("SELECT mod_date from Game WHERE id='$gameid' " );
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+ $gameend = time() - strtotime($r[0]);
+
+ if($gamestatus == 'play' || $gameend < 60*60*24*7)
{
- output_form_calls($me);
-
echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"15\" maxlength=\"100\" />\n";
echo "<hr />";
}
@@ -1481,18 +1487,6 @@ else if(myisset("me"))
}
else if($mystatus=='gameover')
{
- /* get time from the last action of the game */
- $result = mysql_query("SELECT mod_date from Game WHERE id='$gameid' " );
- $r = mysql_fetch_array($result,MYSQL_NUM);
- $gameend = time() - strtotime($r[0]);
-
- if( $gameend < 60*60*24*7 )
- {
- echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"30\" maxlength=\"100\" />\n";
- echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n";
- echo "<input type=\"submit\" value=\"submit\" />\n";
- }
-
$oldcards = DB_get_all_hand($me);
$oldcards = mysort($oldcards,$gametype);
echo "Your cards were: <br />\n";