Preparation for adding german cards
[e-DoKo.git] / output.php
index ba3c47352b92987f6edd89588c5e86f13b8aa12e..1e747e67314e6705e7846e342b0e302e459c0c43 100644 (file)
@@ -141,25 +141,25 @@ function output_form_for_new_game($names)
 <?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)
-    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
-    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;
 }
 
-function display_link_card($card)
+function display_link_card($card,$dir="english")
 {
   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
-    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;
 }
 
@@ -260,11 +260,15 @@ function output_home_page()
             <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>
-               <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>
-               <td> <input type="submit" value="login" /></td>
+                <td> <input type="submit" value="login" /></td>
+                <td></td>
+              </tr>
              </table>
           </fieldset>
         </form>