3 /* functions which only ouput html */
5 function display_status()
7 echo "<div class=\"info\">";
8 echo " is someone playing solo, etc?";
14 function display_news()
17 echo "<div class=\"bug\">\n".
18 " Please hit <strong>shift+reload</strong>.<br /><hr />\n".
19 " added local time display, let me know what you think<br /><hr />\n".
20 " If you find more bugs, please list them in the <a href=\"".$wiki.
21 "\">wiki</a>.\n</div>\n";
26 function output_form_for_new_game()
29 <p>Please add 4 names, please make sure that the names are correct! </p>
30 <form action="index.php" method="post">
31 Name: <input name="PlayerA" type="text" size="10" maxlength="20" />
32 Name: <input name="PlayerB" type="text" size="10" maxlength="20" />
33 Name: <input name="PlayerC" type="text" size="10" maxlength="20" />
34 Name: <input name="PlayerD" type="text" size="10" maxlength="20" />
36 <input type="submit" value="start game" />
41 function display_card($card)
43 /* cards are only availabl for the odd values, e.g. 1.png, 3.png, ...
44 * convert even cards to the matching odd value */
46 if( $card/2 - (int)($card/2) == 0.5)
47 echo "<img src=\"cards/".$card.".png\" alt=\"".card_to_name($card)."\" />\n";
49 echo "<img src=\"cards/".($card-1).".png\" alt=\"".card_to_name($card-1)."\" />\n";
54 function display_link_card($card)
56 if( $card/2 - (int)($card/2) == 0.5)
57 echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".$card.".png\" alt=\"\" />\n";
59 echo "<input type=\"radio\" name=\"card\" value=\"".$card."\" /><img src=\"cards/".($card-1).".png\" alt=\"\" />\n";
63 function check_for_sickness($me,$mycards)
66 <p> nothing implemented so far, but give it a try anyway ;) </p>
68 <form action="index.php" method="post">
70 do you want to play solo?
71 <select name="solo" size="1">
73 <option>trumpless</option>
74 <option>trump</option>
75 <option>queen</option>
78 <option>spade</option>
79 <option>heart</option>
86 if(check_wedding($mycards))
88 echo " yes<input type=\"radio\" name=\"wedding\" value=\"yes\" />";
89 echo " no <input type=\"radio\" name=\"wedding\" value=\"no\" /> <br />\n";
93 echo " no <input type=\"hidden\" name=\"wedding\" value=\"no\" /> <br />\n";
96 echo "do you have poverty?";
97 if(count_trump($mycards)<4)
99 echo " yes<input type=\"radio\" name=\"poverty\" value=\"yes\" />";
100 echo " no <input type=\"radio\" name=\"poverty\" value=\"no\" /> <br />\n";
104 echo " no <input type=\"hidden\" name=\"poverty\" value=\"no\" /> <br />\n";
107 echo "do you have too many nines?";
108 if(count_nines($mycards)>4)
110 echo " yes<input type=\"radio\" name=\"nines\" value=\"yes\" />";
111 echo " no <input type=\"radio\" name=\"nines\" value=\"no\" /> <br />\n";
115 echo " no <input type=\"hidden\" name=\"nines\" value=\"no\" /> <br />\n";
118 echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n";
119 echo "<input type=\"submit\" value=\"count me in\" />\n";
126 function check_want_to_play($me)
129 <form action="index.php" method="post">
130 Do you want to play a game of DoKo?
131 yes<input type="radio" name="in" value="yes" />
132 no<input type="radio" name="in" value="no" /> <br />
134 Do you want to get an email for every card played or only if it your move?
135 every card<input type="radio" name="update" value="card" />
136 only on my turn<input type="radio" name="update" value="turn" /> <br />
138 echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n";
140 echo "<input type=\"submit\" value=\"count me in\" />\n";
149 <p> If you want to play a game of Doppelkopf, you found the right place ;) </p>
150 <p> Please <a href="index.php?register">register</a>, in case you haven't done yet <br />
151 or login with you email-address or name and password here:
153 <form action="index.php" method="post">
155 <legend>Login</legend>
158 <td><label for="email">Email:</label></td><td><input type="text" id="email" name="email" size="20" maxlength="30" /> </td>
160 <td><label for="password">Password:</label></td><td><input type="password" id="password" name="password" size="20" maxlength="30" /></td>
162 <td> <input type="submit" value="login" /></td>
171 function output_header()
174 <!DOCTYPE html PUBLIC
175 "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
176 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
177 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
179 <title>e-Doko</title>
180 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
181 <link rel="stylesheet" type="text/css" href="css/standard.css" />
182 <script type="text/javascript">
184 if(document.getElementById){
187 if(document.getElementById("trick"+i))
188 document.getElementById("trick"+i).style.display = 'none';
190 document.getElementById("trick"+num).style.display = 'block';
193 function high_last(){
194 if(document.getElementById){
197 if(document.getElementById("trick"+i))
207 <body onload="high_last();">
209 <h1> Welcome to E-Doko </h1>
216 function output_footer()