added footer, moved revision into footer
[e-DoKo.git] / output.php
index ba3c47352b92987f6edd89588c5e86f13b8aa12e..77aba216b69282f81c1cf2b1b89ea9dda74ee255 100644 (file)
@@ -15,8 +15,8 @@ function display_news()
 {
   global $wiki;
   echo "<div class=\"bug\">\n".
 {
   global $wiki;
   echo "<div class=\"bug\">\n".
-    "  Please hit <strong>shift+reload</strong>.<br /><hr />\n".
-    "  The server now keeps score... (only from now on) <br /><hr />".
+    "  Schweinchen should work now (only for new games).<br
+  /><hr />".
     "  If you find more bugs, please list them in the <a href=\"".
     $wiki."\">wiki</a>.\n</div>\n";
   return;
     "  If you find more bugs, please list them in the <a href=\"".
     $wiki."\">wiki</a>.\n</div>\n";
   return;
@@ -141,25 +141,25 @@ function output_form_for_new_game($names)
 <?php
 }
 
 <?php
 }
 
-function display_card($card)
+function display_card($card,$dir="english")
 {
   /* cards are only availabl for the odd values, e.g. 1.png, 3.png, ... 
    * convert even cards to the matching odd value */
 
   if( $card/2 - (int)($card/2) == 0.5)
 {
   /* cards are only availabl for the odd values, e.g. 1.png, 3.png, ... 
    * convert even cards to the matching odd value */
 
   if( $card/2 - (int)($card/2) == 0.5)
-    echo "<img src=\"cards/".$card.".png\"  alt=\"".card_to_name($card)."\" />\n";
+    echo "<img src=\"cards/".$dir."/".$card.".png\"  alt=\"".card_to_name($card)."\" />\n";
   else
   else
-    echo "<img src=\"cards/".($card-1).".png\"  alt=\"".card_to_name($card-1)."\" />\n";
+    echo "<img src=\"cards/".$dir."/".($card-1).".png\"  alt=\"".card_to_name($card-1)."\" />\n";
 
   return;
 }
 
 
   return;
 }
 
-function display_link_card($card)
+function display_link_card($card,$dir="english")
 {
   if( $card/2 - (int)($card/2) == 0.5)
 {
   if( $card/2 - (int)($card/2) == 0.5)
-    echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".$card.".png\" alt=\"\" />\n";
+    echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".$dir."/".$card.".png\" alt=\"\" />\n";
   else
   else
-    echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".($card-1).".png\" alt=\"\" />\n";
+    echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".$dir."/".($card-1).".png\" alt=\"\" />\n";
   return;
 }
 
   return;
 }
 
@@ -260,11 +260,15 @@ function output_home_page()
             <legend>Login</legend>
              <table>
               <tr>
             <legend>Login</legend>
              <table>
               <tr>
-               <td><label for="email">Email:</label></td><td><input type="text" id="email" name="email" size="20" maxlength="30" /> </td>
+                 <td><label for="email">Email:</label></td>
+                 <td><input type="text" id="email" name="email" size="20" maxlength="30" /> </td>
               </tr><tr>
               </tr><tr>
-               <td><label for="password">Password:</label></td><td><input type="password" id="password" name="password" size="20" maxlength="30" /></td>
+                 <td><label for="password">Password:</label></td>
+                 <td><input type="password" id="password" name="password" size="20" maxlength="30" /></td>
               </tr><tr>
               </tr><tr>
-               <td> <input type="submit" value="login" /></td>
+                <td> <input type="submit" value="login" /></td>
+                <td></td>
+              </tr>
              </table>
           </fieldset>
         </form>
              </table>
           </fieldset>
         </form>
@@ -313,7 +317,6 @@ function output_header()
 <body onload="high_last();">
 <div class="header">
 <h1> Welcome to E-Doko </h1>
 <body onload="high_last();">
 <div class="header">
 <h1> Welcome to E-Doko </h1>
-<p> Revision: <?php echo "$REV"; ?></p>
 </div>
 
 <?php
 </div>
 
 <?php
@@ -324,6 +327,14 @@ function output_header()
 
 function output_footer()
 {
 
 function output_footer()
 {
+  global $REV;
+
+  echo "<div class=\"footer\">\n";
+  echo "<p class=\"left\"> copyright 2006-2007 Arun Persaud</p>\n";
+  echo "<p class=\"right\"> Revision: $REV; </p> \n";
+  echo "\n";
+  echo "</div>\n";
+
   echo "</body>\n";
   echo "</html>\n";
 
   echo "</body>\n";
   echo "</html>\n";