the linebreak for displaying the tricks should be gone now.
Fixed also quite a few other small things at the same time.
font-size:smaller;
clear:both;
}
font-size:smaller;
clear:both;
}
-.footer .right{ float:right; }
-.footer .left{ float:left; }
+.footer .right { float:right; }
+.footer .left { float:left; }
.status {
position:absolute;
.status {
position:absolute;
.joingame,.sickness,.poverty,.total,.message {
position: absolute;
width: 20%;
.joingame,.sickness,.poverty,.total,.message {
position: absolute;
width: 20%;
left:40%;
right:40%;
text-align: center;
left:40%;
right:40%;
text-align: center;
.total .re {
position: absolute;
left: -4em;
top:8em;
background-color: #fff;
.total .re {
position: absolute;
left: -4em;
top:8em;
background-color: #fff;
}
.total .contra {
position: absolute;
right: -4em;
top:8em;
background-color: #fff;
}
.total .contra {
position: absolute;
right: -4em;
top:8em;
background-color: #fff;
.poverty {
top:32em;
z-index:15;
.poverty {
top:32em;
z-index:15;
/* display the table and the names */
div.table {
position:absolute;
/* display the table and the names */
div.table {
position:absolute;
+ width:99%;
+ height:35em;
-/* border: 5px solid blue;*/
- top: 16em;
+// border: 3px solid blue;
+ top: 8.2em;
-div.table img {
- top:25%;
- bottom:25%;
- height:50%;
- width:50%;
+div.table img.table {
+ position:absolute;
+ width:25%;
+ top:20%;
+ height:22em;
+ left:37.5%;
z-index:9;
display: block;
z-index:9;
display: block;
- margin-left: auto;
- margin-right: auto
}
div.table div {
/*background-color:green;*/
position:absolute;
}
div.table div {
/*background-color:green;*/
position:absolute;
- width:25%;
- height:25%;
}
div.table div img{
/*background-color:green;*/
}
div.table div img{
/*background-color:green;*/
- width:25%;
- height:25%;
+ top:45%;
+ right:62.5%;
- top:-25%;
- left:37.5%;
- bottom:-25%;
- left: 37.5%;
+ bottom:5%;
+ left: 43.75%;
ul.tricks a { text-decoration:none; color:#000;}
ul.tricks li {
/*background-color:blue;*/
ul.tricks a { text-decoration:none; color:#000;}
ul.tricks li {
/*background-color:blue;*/
padding:0.2em 0.5em;
display:inline;
}
padding:0.2em 0.5em;
display:inline;
}
ul.tricks li:hover { background-color: #bbb;}
ul.tricks li.nohighlight:hover { background-color: #fff;}
ul.tricks li:hover { background-color: #bbb;}
ul.tricks li.nohighlight:hover { background-color: #fff;}
+ul.tricks li div.trick {
+ position:absolute;
+ width:100%;
+ height:35em;
+ top:1.2em;
+ margin:0;
+ padding:0;
+// border: 2px solid red;
+ display:block;
+}
ul.tricks li div.trick {
display:none;
}
ul.tricks li div.trick {
display:none;
}
/* border: 5px solid blue;*/
text-align:center;
width:16%;
/* border: 5px solid blue;*/
text-align:center;
width:16%;
margin:0;
padding:0;
/*border: 1px solid red;*/
margin:0;
padding:0;
/*border: 1px solid red;*/
left:37.5%;
right:56x.5%;
width:6%;
left:37.5%;
right:56x.5%;
width:6%;
margin:0;
padding:0;
/*border: 1px solid red;*/
margin:0;
padding:0;
/*border: 1px solid red;*/
right:66.5%;
left:17.5%;
width:16%;
right:66.5%;
left:17.5%;
width:16%;
margin:0;
padding:0;
/*border: 1px solid red;*/
margin:0;
padding:0;
/*border: 1px solid red;*/
left:47%;
right:47%;
width:6%;
left:47%;
right:47%;
width:6%;
margin:0;
padding:0;
/*border: 1px solid red;*/
margin:0;
padding:0;
/*border: 1px solid red;*/
left:66.5%;
right:17.5%;
width:16%;
left:66.5%;
right:17.5%;
width:16%;
margin:0;
padding:0;
/*border: 1px solid red;*/
margin:0;
padding:0;
/*border: 1px solid red;*/
right:37.5%;
left:56x.5%;
width:6%;
right:37.5%;
left:56x.5%;
width:6%;
margin:0;
padding:0;
/*border: 1px solid red;*/
margin:0;
padding:0;
/*border: 1px solid red;*/
left:66.5%;
right:17.5%;
width:16%;
left:66.5%;
right:17.5%;
width:16%;
margin:0;
padding:0;
/*border: 1px solid red;*/
margin:0;
padding:0;
/*border: 1px solid red;*/
left:47%;
right:47%;
width:6%;
left:47%;
right:47%;
width:6%;
margin:0;
padding:0;
/*border: 1px solid red;*/
margin:0;
padding:0;
/*border: 1px solid red;*/
right:66.5%;
left:17.5%;
width:16%;
right:66.5%;
left:17.5%;
width:16%;
padding:0;
border:1px solid red;
background-color:yellow;
padding:0;
border:1px solid red;
background-color:yellow;
table.score {
width:10em;
border-collapse:collapse;
table.score {
width:10em;
border-collapse:collapse;
+}
+
+.bigger {
+ font-size:larger;
}
\ No newline at end of file
}
\ No newline at end of file
"ORDER BY position ASC");
echo "<div class=\"table\">\n".
"ORDER BY position ASC");
echo "<div class=\"table\">\n".
- " <img src=\"pics/table.png\" alt=\"table\" />\n";
+ " <img class=\"table\" src=\"pics/table.png\" alt=\"table\" />\n";
while($r = mysql_fetch_array($result,MYSQL_NUM))
{
$name = $r[0];
while($r = mysql_fetch_array($result,MYSQL_NUM))
{
$name = $r[0];
{
global $wiki,$myid,$host;
echo "<div class=\"usermenu\">\n".
{
global $wiki,$myid,$host;
echo "<div class=\"usermenu\">\n".
- "<a href=\"index.php\"> go to my user page </a>";
+ "<a href=\"index.php\"> Go to my user page </a>";
$result = mysql_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
" LEFT JOIN Game On Hand.game_id=Game.id".
$result = mysql_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
" LEFT JOIN Game On Hand.game_id=Game.id".
echo "<a href=\"".$host."?me=".$r[0]."\">game ".DB_format_gameid($r[1])." </a><br />\n";
}
echo "<a href=\"".$host."?me=".$r[0]."\">game ".DB_format_gameid($r[1])." </a><br />\n";
}
- echo "<hr /> <a href=\"".$host."?new\">start a new game</a>\n";
+ echo "<hr /> <a href=\"".$host."?new\">Start a new game</a>\n";
echo "<hr /> <a href=\"".substr($host,0,-9)."stats.php\">Statistics</a>\n";
echo "<hr /> <a href=\"".substr($host,0,-9)."stats.php\">Statistics</a>\n";
session_unset();
session_destroy();
$_SESSION = array();
session_unset();
session_destroy();
$_SESSION = array();
- echo "you are now logged out!";
+ echo "<div class=\"message\"><span class=\"bigger\">You are now logged out!</span><br />\n".
+ "(<a href=\"$host\">This will take you back to the home-page</a>)</div>";
}
else if(myisset("new"))
{
if( isset($_SESSION["name"]) )
{
$names = DB_get_all_names();
}
else if(myisset("new"))
{
if( isset($_SESSION["name"]) )
{
$names = DB_get_all_names();
+ echo "<div class=\"user\">\n";
output_form_for_new_game($names);
output_form_for_new_game($names);
+ echo "</div>\n";
+ display_user_menu();
+ echo "<div class=\"message\">Please <a href=\"$host\">log in</a>.</div>";
}
}
/*check if everything is ready to set up a new game */
}
}
/*check if everything is ready to set up a new game */
" <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
}
" <img class=\"arrow\" src=\"pics/arrow".($pos-1).".png\" alt=\"table\" />\n";
}
- echo "<div class=\"card".($pos-1)."\">";
+ echo " <div class=\"card".($pos-1)."\">\n ";
/* display comments */
display_card($card,$PREF["cardset"]);
if($comment!="")
/* display comments */
display_card($card,$PREF["cardset"]);
if($comment!="")
- echo " <span class=\"comment\"> ".$comment."</span>\n";
- echo "</div></div></li>\n";
+ echo "\n <span class=\"comment\"> ".$comment."</span>\n";
+ echo " </div>\n";
/*check if we still have cards left, else set status to gameover */
if(sizeof(DB_get_hand($me))==0)
/*check if we still have cards left, else set status to gameover */
if(sizeof(DB_get_hand($me))==0)
" GROUP BY User.fullname" );
while( $r = mysql_fetch_array($result,MYSQL_NUM))
echo " <div class=\"card".($r[3]-1)."\">\n".
" GROUP BY User.fullname" );
while( $r = mysql_fetch_array($result,MYSQL_NUM))
echo " <div class=\"card".($r[3]-1)."\">\n".
- " <span class=\"score\">".$r[2]."<br /> ".$r[1]."</span>\n".
+ " <div class=\"score\">".$r[2]."<br /> ".$r[1]."</div>\n".
" </div>\n";
echo " </div>\n </li>\n"; /* end div trick, end li trick */
" </div>\n";
echo " </div>\n </li>\n"; /* end div trick, end li trick */
/* check if game is over, display results */
if(DB_get_game_status_by_gameid($gameid)=='play')
{
/* check if game is over, display results */
if(DB_get_game_status_by_gameid($gameid)=='play')
{
- echo "the game is over for you.. other people still need to play though";
+ echo "The game is over for you.. other people still need to play though";
- echo "Sorry email and password don't match. Please <a href=\"$host\">try again</a>. <br />";
+ echo "<div class=\"message\">Sorry email and password don't match. Please <a href=\"$host\">try again</a>. </div>";
echo "<div class=\"useroptions\">\n";
echo "<h4> Settings </h4>\n";
echo "<div class=\"useroptions\">\n";
echo "<h4> Settings </h4>\n";
- echo "<a href=\"index.php?passwd=ask\">change password</a><br />";
+ echo "<a href=\"index.php?passwd=ask\">Change password</a><br />";
echo "<h5> Card set </h5>\n";
if( $PREF["cardset"] == "english" )
echo "<h5> Card set </h5>\n";
if( $PREF["cardset"] == "english" )
- echo "<a href=\"index.php?setpref=germancards\">use german cards</a><br />";
+ echo "<a href=\"index.php?setpref=germancards\">Change to German cards</a><br />";
- echo "<a href=\"index.php?setpref=englishcards\">use english cards</a> <br />";
+ echo "<a href=\"index.php?setpref=englishcards\">Change to English cards</a> <br />";
echo "<h5> Email </h5>\n";
if( $PREF["email"] == "emailaddict" )
echo "<h5> Email </h5>\n";
if( $PREF["email"] == "emailaddict" )
- echo "<a href=\"index.php?setpref=emailnonaddict\">I'm not addicted (emails for each move)</a><br />";
+ echo "<a href=\"index.php?setpref=emailnonaddict\">Change to non-addicted mode (emails for each move)</a><br />";
- echo "<a href=\"index.php?setpref=emailaddict\">Addicted (minimal amount of emails)</a> <br />";
+ echo "<a href=\"index.php?setpref=emailaddict\">Change to addicted mode (minimal amount of emails)</a> <br />";
/* ask for player names */
$i=0;
foreach( array("PlayerA","PlayerB","PlayerC","PlayerD") as $player)
/* ask for player names */
$i=0;
foreach( array("PlayerA","PlayerB","PlayerC","PlayerD") as $player)
- {
- srand((float) microtime() * 10000000);
- $randkey = array_rand($names);
- $rand = $names[$randkey];
- echo "<span class=\"table".$i."\">";
- $i++;
- echo " Name: <select name=\"$player\" size=\"1\" /> \n";
- foreach($names as $name)
+ srand((float) microtime() * 10000000);
+ $randkey = array_rand($names);
+ $rand = $names[$randkey];
+ echo "<div class=\"table".$i."\">\n";
+ $i++;
+ echo " Name: \n <select name=\"$player\" size=\"1\" /> \n";
+ foreach($names as $name)
- echo " <option selected=\"selected\">$name</option>\n";
+ if($name==$rand)
+ {
+ echo " <option selected=\"selected\">$name</option>\n";
+ }
+ else
+ echo " <option>$name</option>\n";
- else
- echo " <option>$name</option>\n";
+ echo " </select>\n</div>\n";
- echo " </select></span>\n";
- }
-?>
- <h2 class="rules"> Rules </h2>
+ <h2 class="rules"> Rules </h2>
<p> Some areas are grayed out which means that the rule is not implemented yet and therefore cannot be selected </p>
<p> Some areas are grayed out which means that the rule is not implemented yet and therefore cannot be selected </p>
<ul>
<li> <input type="radio" name="dullen" value="none" /> just normal non-trump </li>
<li> <input type="radio" name="dullen" value="firstwins" /> first ten of hearts wins the trick </li>
<li> <input type="radio" name="dullen" value="secondwins" checked="checked" /> second ten of hearts wins the trick </li>
</ul>
</p>
<ul>
<li> <input type="radio" name="dullen" value="none" /> just normal non-trump </li>
<li> <input type="radio" name="dullen" value="firstwins" /> first ten of hearts wins the trick </li>
<li> <input type="radio" name="dullen" value="secondwins" checked="checked" /> second ten of hearts wins the trick </li>
</ul>
</p>
- <p> schweinchen (both foxes), only in normal games or silent solos:
+ <p> Schweinchen (both foxes), only in normal games or silent solos:
<ul>
<li> <input type="radio" name="schweinchen" value="none" checked="checked" /> none </li>
<ul>
<li> <input type="radio" name="schweinchen" value="none" checked="checked" /> none </li>
- <li> <input type="radio" name="schweinchen" value="both" />
+ <li> <input type="radio" name="schweinchen" value="both" />
both become highest trump (automatic call at beginning of the game)
</li>
both become highest trump (automatic call at beginning of the game)
</li>
- <li> <input type="radio" name="schweinchen" value="second" />
+ <li> <input type="radio" name="schweinchen" value="second" />
first one normal, second one becomes highest (call during the game) </li>
first one normal, second one becomes highest (call during the game) </li>
- <li> <input type="radio" name="schweinchen" value="secondaftercall" disabled="disabled" />
+ <li> <input type="radio" name="schweinchen" value="secondaftercall" disabled="disabled" />
second one become highest only in case re/contra was announced (not working yet)
</li>
</ul>
</p>
second one become highest only in case re/contra was announced (not working yet)
</li>
</ul>
</p>
- <p> Call Re/Contra, etc.:
+ <p> Call Re/Contra, etc.:
<ul>
<li><input type="radio" name="call" value="1st-own-card" checked="checked" />
Can call re/contra on the first <strong>own</strong> card played, 90 on the second, etc.</li>
<ul>
<li><input type="radio" name="call" value="1st-own-card" checked="checked" />
Can call re/contra on the first <strong>own</strong> card played, 90 on the second, etc.</li>
- <li><input type="radio" name="call" value="5th-card" />
+ <li><input type="radio" name="call" value="5th-card" />
Can call re/contra until 5th card is played, 90 until 9th card is played, etc.</li>
Can call re/contra until 5th card is played, 90 until 9th card is played, etc.</li>
- <li><input type="radio" name="call" value="9-cards" />
+ <li><input type="radio" name="call" value="9-cards" />
Can call re/contra until 5th card is played, 90 if player still has 9 cards, etc.</li>
</ul>
Can call re/contra until 5th card is played, 90 if player still has 9 cards, etc.</li>
</ul>
<input type="submit" value="start game" />
</form>
<?php
<input type="submit" value="start game" />
</form>
<?php
function display_card($card,$dir="english")
{
function display_card($card,$dir="english")
{
- /* cards are only availabl for the odd values, e.g. 1.png, 3.png, ...
+ /* 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)
* convert even cards to the matching odd value */
if( $card/2 - (int)($card/2) == 0.5)
?>
<div class="sickness"> Thanks for joining the game...<br />
?>
<div class="sickness"> Thanks for joining the game...<br />
- do you want to play solo?
+ do you want to play solo?
<select name="solo" size="1">
<option selected="selected">No</option>
<option>trumpless</option>
<select name="solo" size="1">
<option selected="selected">No</option>
<option>trumpless</option>
<option>club</option>
<option>spade</option>
<option>heart</option>
<option>club</option>
<option>spade</option>
<option>heart</option>
echo "Wedding?";
if(check_wedding($mycards))
{
echo "Wedding?";
if(check_wedding($mycards))
{
Do you want to play a game of DoKo? <br />
yes<input type="radio" name="in" value="yes" />
no<input type="radio" name="in" value="no" /> <br />
Do you want to play a game of DoKo? <br />
yes<input type="radio" name="in" value="yes" />
no<input type="radio" name="in" value="no" /> <br />
echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n";
echo "\n";
echo "<input type=\"submit\" value=\"submit\" />\n";
echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n";
echo "\n";
echo "<input type=\"submit\" value=\"submit\" />\n";
if($game==0)
echo "zero games that are ongoing. ";
if($game==0)
echo "zero games that are ongoing. ";
echo "one game that is ongoing. ";
echo "one game that is ongoing. ";
echo "$game games that are ongoing. ";
echo "<br />\n";
echo "$game games that are ongoing. ";
echo "<br />\n";
<head>
<title>e-Doko</title>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<head>
<title>e-Doko</title>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
- <link rel="stylesheet" type="text/css" href="css/standard.css" />
+ <link rel="stylesheet" type="text/css" href="css/standard.css" />
<script type="text/javascript">
function hl(num) {
if(document.getElementById){
<script type="text/javascript">
function hl(num) {
if(document.getElementById){
echo " <input type=\"hidden\" name=\"email\" value=\"".$email."\" />\n";
echo " <input type=\"hidden\" name=\"password\" value=\"".$password."\" />\n";
echo " <input type=\"hidden\" name=\"passwd\" value=\"set\" />\n";
echo " <input type=\"hidden\" name=\"email\" value=\"".$email."\" />\n";
echo " <input type=\"hidden\" name=\"password\" value=\"".$password."\" />\n";
echo " <input type=\"hidden\" name=\"passwd\" value=\"set\" />\n";
<fieldset>
<legend>Password recovery</legend>
<table>
<fieldset>
<legend>Password recovery</legend>
<table>