BUGFIX: couldn't restart a finished game; force reload of CSS
authorArun Persaud <arun@nubati.net>
Mon, 28 Apr 2008 00:43:11 +0000 (17:43 -0700)
committerArun Persaud <arun@nubati.net>
Mon, 28 Apr 2008 00:43:11 +0000 (17:43 -0700)
problem was that everything on the page was in a form which is now
submitted to the game page, but for new games, we need to call the newgame.php
page. moved the button out of the side and into its own div structure now to fix it.

also renamed the css file to force a reload

Signed-off-by: Arun Persaud <arun@nubati.net>
css/standard001.css [moved from css/standard.css with 99% similarity]
include/game.php
include/output.php

similarity index 99%
rename from css/standard.css
rename to css/standard001.css
index 2862248b08f8e20c1436f384071951fe0cf0314b..b694fe9fbff85b1d162f53f0fcf031f6b22ede07 100644 (file)
@@ -36,6 +36,7 @@
 
 .joingame,.sickness,.poverty,.total,.message {
  position: absolute;
+ background-color: #fff;
  width: 20%;
  top:22em;
  left:40%;
index 51d4320dfaa578315a21d32f42cb5eb51eb47b00..b2c4fb08b7d841e876fd0e617df38843c3bd58a3 100644 (file)
@@ -1727,12 +1727,19 @@ switch($mystatus)
        echo "<hr />";
       }
 
-    echo "<input type=\"submit\" value=\"submit\" />\n";
+    echo "<input type=\"submit\" value=\"submit\" />\n<hr />\n";
 
+    $session = DB_get_session_by_gameid($gameid);
+    $score   = generate_score_table($session);
+
+    echo $score;
+
+    echo "</div>\n";
+
+    echo "</form>\n";
 
     if($mystatus=='gameover' && DB_get_game_status_by_gameid($gameid)=='gameover' )
       {
-       echo "<hr />\n";
 
        $session = DB_get_session_by_gameid($gameid);
        $result  = mysql_query("SELECT id,create_date FROM Game".
@@ -1756,15 +1763,7 @@ switch($mystatus)
          }
       }
 
-    $session = DB_get_session_by_gameid($gameid);
-    $score = generate_score_table($session);
-
-    //  if(size_of($score)>30)
-      echo $score;
 
-    echo "</div>\n";
-
-    echo "</form>\n";
     output_footer();
     DB_close();
     exit();
index 4f4a5b6ff3c493053b4e8a61338c19ab8995a320..6d7deb7e69f3e08c5d87ac04d92a74e121324a1e 100644 (file)
@@ -36,6 +36,7 @@ function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid)
 {
   global $RULES;
 
+  echo "<div class=\"message\">\n<form action=\"index.php?action=new\" method=\"post\">\n";
   echo "Do you want to continue playing?(This will start a new game, with the next person as dealer.)\n";
   echo "  <input type=\"hidden\" name=\"PlayerA\" value=\"$playerA\" />\n";
   echo "  <input type=\"hidden\" name=\"PlayerB\" value=\"$playerB\" />\n";
@@ -46,7 +47,7 @@ function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid)
   echo "  <input type=\"hidden\" name=\"callrule\" value=\"".$RULES["call"]."\" />\n";
   echo "  <input type=\"hidden\" name=\"followup\" value=\"$oldgameid\" />\n";
   echo "  <input type=\"submit\" value=\"keep playing\" />\n";
-
+  echo "</form>\n</div>";
   return;
 }
 
@@ -312,7 +313,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/standard.css" />
+     <link rel="stylesheet" type="text/css" href="css/standard001.css" />
      <script type="text/javascript">
        function hl(num) {
          if(document.getElementById){