diff options
-rw-r--r-- | css/standard.css | 89 | ||||
-rw-r--r-- | functions.php | 169 | ||||
-rw-r--r-- | index.php | 256 | ||||
-rw-r--r-- | output.php | 40 |
4 files changed, 302 insertions, 252 deletions
diff --git a/css/standard.css b/css/standard.css index b2157a8..c2cb6f7 100644 --- a/css/standard.css +++ b/css/standard.css @@ -1,25 +1,44 @@ .header { - background-color:white; - text-align:center; - border-bottom:3px solid gray; + background-color: white; + text-align: center; + height: 4em; + border-bottom: 3px solid gray; } + +.main { + min-height: 40em; +} + .footer { - margin:0; - margin-top:0.3em; - padding:0; - border-top: 2px solid #444; - font-size:smaller; - clear:both; - } + margin:0; + margin-top:0.3em; + padding:0; + border-top: 2px solid #444; + font-size:smaller; + clear:both; +} .footer .right{ float:right; } .footer .left{ float:left; } .status { - position:absolute; - right:1em; - top:0.1em; - font-size: smaller; - } + position:absolute; + right:1em; + top:0.1em; + font-size: smaller; +} + +.joingame,.sickness,.poverty { + position: absolute; + width: 18em; + + top:21em; + left:22em; + + text-align: center; +} + + + .card { position:absolute; @@ -52,6 +71,11 @@ div.table span { position:absolute; width:13em; } +div.table span span{ + /*background-color:green;*/ + position:relative; +} + div.table span.table0 { top:9em; left:-15em; @@ -225,7 +249,6 @@ ul.tricks li div div span.comment span{ } .mycards { - clear:both; margin:0; margin-top:33em; padding:0; @@ -261,21 +284,37 @@ ul.tricks li div div span.comment span{ text-align:center; } -.ruleset { +.gameinfo { position:absolute; - top:10.5em; - border:2px solid gray; + top:9em; + right:0em; + + width:12em; + + border-top: 2px solid gray; + border-left: 2px solid gray; + border-bottom: 2px solid gray; + padding:0.3em; + + background-color: #eee; } -.bug { +.usermenu { position:absolute; - top:17.5em; - width:10em; - border:2px solid gray; - padding-top:0.5em; - clear:left; + top:9em; + left:0em; + + width: 12em; + + border-top: 2px solid gray; + border-right: 2px solid gray; + border-bottom: 2px solid gray; + + padding:0.3em; + + background-color: #eee; } .over { diff --git a/functions.php b/functions.php index c6a4a09..d738b00 100644 --- a/functions.php +++ b/functions.php @@ -658,4 +658,173 @@ function can_call($what,$hash) return 0; } +function display_table () +{ + global $gameid, $GT, $debug,$host; + + $result = mysql_query("SELECT User.fullname as name,". + " Hand.position as position, ". + " User.id, ". + " Hand.party as party, ". + " Hand.sickness as sickness, ". + " Hand.point_call, ". + " User.last_login, ". + " Hand.hash ". + "FROM Hand ". + "LEFT JOIN User ON User.id=Hand.user_id ". + "WHERE Hand.game_id='".$gameid."' ". + "ORDER BY position ASC"); + + echo "<div class=\"table\">\n". + " <img src=\"pics/table.png\" alt=\"table\" />\n"; + while($r = mysql_fetch_array($result,MYSQL_NUM)) + { + $name = $r[0]; + $pos = $r[1]; + $user = $r[2]; + $party = $r[3]; + $sickness = $r[4]; + $call = $r[5]; + $lastlogin = strtotime($r[6]); + $hash = $r[7]; + + $offset = DB_get_user_timezone($user); + $zone = return_timezone($offset); + date_default_timezone_set($zone); + + echo " <span class=\"table".($pos-1)."\">\n"; + if(!$debug) + echo " $name \n"; + else + echo "<a href=\"".$host."?me=".$hash."\">$name</a>\n"; + + /* add hints for poverty, wedding, solo, etc */ + if($GT=="poverty" && $party=="re") + if($sickness=="poverty") + { + $userhash = DB_get_hash_from_gameid_and_userid($gameid,$user); + $cards = DB_get_all_hand($userhash); + $trumpNR = count_trump($cards); + if($trumpNR) + echo "<img src=\"pics/button/poverty_trump_button.png\" class=\"button\" alt=\"poverty < trump back\" />"; + else + echo "<img src=\"pics/button/poverty_notrump_button.png\" class=\"button\" alt=\"poverty <\" />"; + } + else + echo "<img src=\"pics/button/poverty_partner_button.png\" class=\"button\" alt=\"poverty >\" />"; + + if($GT=="dpoverty") + if($party=="re") + if($sickness=="poverty") + { + $userhash = DB_get_hash_from_gameid_and_userid($gameid,$user); + $cards = DB_get_all_hand($userhash); + $trumpNR = count_trump($cards); + if($trumpNR) + echo "<img src=\"pics/button/poverty_trump_button.png\" class=\"button\" alt=\"poverty < trump back\" />"; + else + echo "<img src=\"pics/button/poverty_notrump_button.png\" class=\"button\" alt=\"poverty <\" />"; + } + else + echo "<img src=\"pics/button/poverty_partner_button.png\" class=\"button\" alt=\"poverty >\" />"; + else + if($sickness=="poverty") + { + $userhash = DB_get_hash_from_gameid_and_userid($gameid,$user); + $cards = DB_get_all_hand($userhash); + $trumpNR = count_trump($cards); + if($trumpNR) + echo "<img src=\"pics/button/poverty2_trump_button.png\" class=\"button\" alt=\"poverty2 < trump back\" />"; + else + echo "<img src=\"pics/button/poverty2_notrump_button.png\" class=\"button\" alt=\"poverty2 <\" />"; + } + else + echo "<img src=\"pics/button/poverty2_partner_button.png\" class=\"button\" alt=\"poverty2 >\" />"; + + if($GT=="wedding" && $party=="re") + if($sickness=="wedding") + echo "<img src=\"pics/button/wedding_button.png\" class=\"button\" alt=\"wedding\" />"; + else + echo "<img src=\"pics/button/wedding_partner_button.png\" class=\"button\" alt=\"wedding partner\" />"; + + if(ereg("solo",$GT) && $party=="re") + { + if(ereg("queen",$GT)) + echo "<img src=\"pics/button/queensolo_button.png\" class=\"button\" alt=\"$GT\" />"; + else if(ereg("jack",$GT)) + echo "<img src=\"pics/button/jacksolo_button.png\" class=\"button\" alt=\"$GT\" />"; + else if(ereg("club",$GT)) + echo "<img src=\"pics/button/clubsolo_button.png\" class=\"button\" alt=\"$GT\" />"; + else if(ereg("spade",$GT)) + echo "<img src=\"pics/button/spadesolo_button.png\" class=\"button\" alt=\"$GT\" />"; + else if(ereg("heart",$GT)) + echo "<img src=\"pics/button/heartsolo_button.png\" class=\"button\" alt=\"$GT\" />"; + else if(ereg("trumpless",$GT)) + echo "<img src=\"pics/button/notrumpsolo_button.png\" class=\"button\" alt=\"$GT\" />"; + else if(ereg("trump",$GT)) + echo "<img src=\"pics/button/trumpsolo_button.png\" class=\"button\" alt=\"$GT\" />"; + } + + /* add point calls */ + if($call!=NULL) + { + if($party=="re") + echo "<img src=\"pics/button/re_button.png\" class=\"button\" alt=\"re\" />"; + else + echo "<img src=\"pics/button/contra_button.png\" class=\"button\" alt=\"contra\" />"; + switch($call) + { + case "0": + echo "<img src=\"pics/button/0_button.png\" class=\"button\" alt=\"0\" />"; + break; + case "30": + echo "<img src=\"pics/button/30_button.png\" class=\"button\" alt=\"30\" />"; + break; + case "60": + echo "<img src=\"pics/button/60_button.png\" class=\"button\" alt=\"60\" />"; + break; + case "90": + echo "<img src=\"pics/button/90_button.png\" class=\"button\" alt=\"90\" />"; + break; + } + } + + echo "<br />\n"; + echo " <span title=\"".date("Y-m-d H:i:s")."\">local time</span>"; + echo " <span title=\"".date("Y-m-d H:i:s",$lastlogin)."\">last login</span>"; + echo " </span>\n"; + + } + echo "</div>\n"; /* end output table */ + + + return; +} + + +function display_user_menu() +{ + global $wiki,$myid,$host; + echo "<div class=\"usermenu\">\n". + "<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". + " WHERE Hand.user_id='$myid'". + " AND Game.player='$myid'". + " AND Game.status<>'gameover'" ); + if(mysql_num_rows($result)) + echo "<hr />It's your turn in these games:<br />\n"; + + while( $r = mysql_fetch_array($result,MYSQL_NUM)) + { + echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a><br />\n"; + } + + echo + "<hr />Report bugs in the <a href=\"". $wiki."\">wiki</a>\n"; + echo "</div>\n"; + return; +} + ?> @@ -239,7 +239,6 @@ else if(myisset("me")) DB_get_PREF($myid); /* end set pref */ - /* get rule set for this game */ $result = mysql_query("SELECT * FROM Rulesets". " LEFT JOIN Game ON Game.ruleset=Rulesets.id ". @@ -250,7 +249,6 @@ else if(myisset("me")) $RULES["schweinchen"] = $r[3]; $RULES["call"] = $r[4]; - /* get some infos about the game */ $gametype = DB_get_gametype_by_gameid($gameid); $gamestatus = DB_get_game_status_by_gameid($gameid); @@ -260,9 +258,31 @@ else if(myisset("me")) $gametype = DB_get_solo_by_gameid($gameid); $GT = $gametype." ".$GT; } + + /* does anyone have both foxes */ + $GAME["schweinchen"]=0; + for($i=1;$i<5;$i++) + { + $hash = DB_get_hash_from_game_and_pos($gameid,$i); + $cards = DB_get_all_hand($hash); + if( in_array("19",$cards) && in_array("20",$cards) ) + { + $GAME["schweinchen"]=1; + $GAME["schweinchen-who"]=$hash; + } + }; + + /* put everyting in a form */ + echo "<form action=\"index.php?me=$me\" method=\"post\">\n"; + + /* output left menu */ + + display_user_menu(); + + /* output right menu */ - /* display rule set for this game */ - echo "<div class=\"ruleset\">\n"; + /* display rule set for this game */ + echo "<div class=\"gameinfo\">\n"; if($gamestatus != 'pre') echo " Gametype: $GT <br />\n"; @@ -271,8 +291,22 @@ else if(myisset("me")) echo "10ofhearts : ".$RULES["dullen"] ."<br />\n"; echo "schweinchen: ".$RULES["schweinchen"] ."<br />\n"; echo "call: ".$RULES["call"] ."<br />\n"; + + echo "<hr />\n"; + if($mystatus == 'play' ) + { + output_form_calls($me); + + echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"15\" maxlength=\"100\" />\n"; + echo "<hr />"; + } + + echo "<input type=\"submit\" value=\"submit\" />\n"; + echo "</div>\n"; + /* output game */ + /* output extra division in case this game is part of a session */ if($session) { @@ -290,20 +324,9 @@ else if(myisset("me")) } echo "</div>\n"; } - - - /* does anyone have both foxes */ - $GAME["schweinchen"]=0; - for($i=1;$i<5;$i++) - { - $hash = DB_get_hash_from_game_and_pos($gameid,$i); - $cards = DB_get_all_hand($hash); - if( in_array("19",$cards) && in_array("20",$cards) ) - { - $GAME["schweinchen"]=1; - $GAME["schweinchen-who"]=$hash; - } - }; + + /* display the table and the names */ + display_table(); /* mystatus gets the player through the different stages of a game. * start: yes/no @@ -357,17 +380,16 @@ else if(myisset("me")) } else { - echo "Thanks for joining the game..."; - $mycards = DB_get_hand($me); sort($mycards); - echo "<p class=\"mycards\" style=\"margin-top:8em;\">your cards are: <br />\n"; + + output_check_for_sickness($me,$mycards); + + echo "<p class=\"mycards\">your cards are: <br />\n"; foreach($mycards as $card) display_card($card,$PREF["cardset"]); echo "</p>\n"; - output_check_for_sickness($me,$mycards); - /* move on to the next stage*/ DB_set_hand_status_by_hash($me,'check'); } @@ -755,12 +777,11 @@ else if(myisset("me")) $result = mysql_query("UPDATE Hand_Card SET hand_id='$myhand' WHERE hand_id='$userhand' AND card_id<'27'" ); /* add hidden button with trump in it to get to the next point */ - echo "<form action=\"index.php\" method=\"post\">\n"; + echo "<div class=\"poverty\">\n"; echo " <input type=\"hidden\" name=\"exchange\" value=\"-1\" />\n"; echo " <input type=\"hidden\" name=\"trump\" value=\"".$trump."\" />\n"; - echo " <input type=\"hidden\" name=\"me\" value=\"".$me."\" />\n"; echo " <input type=\"submit\" class=\"submitbutton\" value=\"select cards to give back\" />\n"; - echo "</form>\n"; + echo "</div>\n"; } else if(myisset("trump","exchange") && $_REQUEST["trump"]>0 && ($who==$mypos || $who==$mypos*10)) { @@ -861,24 +882,24 @@ else if(myisset("me")) else { /* else show all trump, have lowest card pre-selected, have hidden setting for */ - echo "you need to get rid of a few cards<br />\n"; + echo "<div class=\"poverty\"> you need to get rid of a few cards</div>\n"; set_gametype($gametype); /* this sets the $CARDS variable */ $mycards = DB_get_hand($me); $mycards = mysort($mycards,$gametype); - echo "<form class=\"exchange\" action=\"index.php\" method=\"post\">\n"; $type="exchange"; + echo "<div class=\"mycards\">Your cards are: <br />\n"; foreach($mycards as $card) display_link_card($card,$PREF["cardset"],$type); echo " <input type=\"hidden\" name=\"trump\" value=\"".$trump."\" />\n"; - echo " <input type=\"hidden\" name=\"me\" value=\"".$me."\" />\n"; echo " <input type=\"submit\" class=\"submitbutton\" value=\"select one card to give back\" />\n"; - echo "</form>\n"; + echo "</div>\n"; } } else if($who == $mypos || $who == $mypos*10) { + echo "<div class=\"poverty\">\n"; foreach($userids as $user) { $name = DB_get_name_by_userid($user); @@ -892,15 +913,16 @@ else if(myisset("me")) /* count trump */ if($nrtrump<4) echo "Player $name has $nrtrump trump. Do you want to take them?". - "<a href=\"index.php?me=$me&trump=$user\">yes</a> <br />"; + "<a href=\"index.php?me=$me&trump=$user\">yes</a> <br />\n"; } } - echo "<a href=\"index.php?me=$me&trump=no\">No,way I take those trump...</a> <br />"; - + echo "<a href=\"index.php?me=$me&trump=no\">No,way I take those trump...</a> <br />\n"; + echo "</div>\n"; + echo "Your cards are: <br />\n"; $mycards = DB_get_hand($me); sort($mycards); - echo "<p class=\"mycards\" style=\"margin-top:8em;\">your cards are: <br />\n"; + echo "<p class=\"mycards\">your cards are: <br />\n"; foreach($mycards as $card) display_card($card,$PREF["cardset"]); echo "</p>\n"; @@ -999,16 +1021,6 @@ else if(myisset("me")) /* get some infos about the game */ $gamestatus = DB_get_game_status_by_gameid($gameid); - /* display useful things in divs */ - - /* display links to the users status page */ - $result = mysql_query("SELECT email,password from User WHERE id='$myid'" ); - $r = mysql_fetch_array($result,MYSQL_NUM); - - display_links($r[0],$r[1]); - - /* end display useful things*/ - /* has the game started? No, then just wait here...*/ if($gamestatus == 'pre') { @@ -1017,143 +1029,6 @@ else if(myisset("me")) break; /* not sure this works... the idea is that you can * only play a card after everyone is ready to play */ } - - /* display the table and the names */ - $result = mysql_query("SELECT User.fullname as name,". - " Hand.position as position, ". - " User.id, ". - " Hand.party as party, ". - " Hand.sickness as sickness, ". - " Hand.point_call, ". - " User.last_login, ". - " Hand.hash ". - "FROM Hand ". - "LEFT JOIN User ON User.id=Hand.user_id ". - "WHERE Hand.game_id='".$gameid."' ". - "ORDER BY position ASC"); - - echo "<div class=\"table\">\n". - " <img src=\"pics/table.png\" alt=\"table\" />\n"; - while($r = mysql_fetch_array($result,MYSQL_NUM)) - { - $name = $r[0]; - $pos = $r[1]; - $user = $r[2]; - $party = $r[3]; - $sickness = $r[4]; - $call = $r[5]; - $lastlogin = strtotime($r[6]); - $hash = $r[7]; - - $offset = DB_get_user_timezone($user); - $zone = return_timezone($offset); - date_default_timezone_set($zone); - - echo " <span class=\"table".($pos-1)."\">\n"; - if(!$debug) - echo " $name \n"; - else - { - echo "<a href=\"".$host."?me=".$hash."\">$name</a>\n"; - } - /* add hints for poverty, wedding, solo, etc */ - if($GT=="poverty" && $party=="re") - if($sickness=="poverty") - { - $userhash = DB_get_hash_from_gameid_and_userid($gameid,$user); - $cards = DB_get_all_hand($userhash); - $trumpNR = count_trump($cards); - if($trumpNR) - echo "<img src=\"pics/button/poverty_trump_button.png\" class=\"button\" alt=\"poverty < trump back\" />"; - else - echo "<img src=\"pics/button/poverty_notrump_button.png\" class=\"button\" alt=\"poverty <\" />"; - } - else - echo "<img src=\"pics/button/poverty_partner_button.png\" class=\"button\" alt=\"poverty >\" />"; - - if($GT=="dpoverty") - if($party=="re") - if($sickness=="poverty") - { - $userhash = DB_get_hash_from_gameid_and_userid($gameid,$user); - $cards = DB_get_all_hand($userhash); - $trumpNR = count_trump($cards); - if($trumpNR) - echo "<img src=\"pics/button/poverty_trump_button.png\" class=\"button\" alt=\"poverty < trump back\" />"; - else - echo "<img src=\"pics/button/poverty_notrump_button.png\" class=\"button\" alt=\"poverty <\" />"; - } - else - echo "<img src=\"pics/button/poverty_partner_button.png\" class=\"button\" alt=\"poverty >\" />"; - else - if($sickness=="poverty") - { - $userhash = DB_get_hash_from_gameid_and_userid($gameid,$user); - $cards = DB_get_all_hand($userhash); - $trumpNR = count_trump($cards); - if($trumpNR) - echo "<img src=\"pics/button/poverty2_trump_button.png\" class=\"button\" alt=\"poverty2 < trump back\" />"; - else - echo "<img src=\"pics/button/poverty2_notrump_button.png\" class=\"button\" alt=\"poverty2 <\" />"; - } - else - echo "<img src=\"pics/button/poverty2_partner_button.png\" class=\"button\" alt=\"poverty2 >\" />"; - - if($GT=="wedding" && $party=="re") - if($sickness=="wedding") - echo "<img src=\"pics/button/wedding_button.png\" class=\"button\" alt=\"wedding\" />"; - else - echo "<img src=\"pics/button/wedding_partner_button.png\" class=\"button\" alt=\"wedding partner\" />"; - - if(ereg("solo",$GT) && $party=="re") - { - if(ereg("queen",$GT)) - echo "<img src=\"pics/button/queensolo_button.png\" class=\"button\" alt=\"$GT\" />"; - else if(ereg("jack",$GT)) - echo "<img src=\"pics/button/jacksolo_button.png\" class=\"button\" alt=\"$GT\" />"; - else if(ereg("club",$GT)) - echo "<img src=\"pics/button/clubsolo_button.png\" class=\"button\" alt=\"$GT\" />"; - else if(ereg("spade",$GT)) - echo "<img src=\"pics/button/spadesolo_button.png\" class=\"button\" alt=\"$GT\" />"; - else if(ereg("heart",$GT)) - echo "<img src=\"pics/button/heartsolo_button.png\" class=\"button\" alt=\"$GT\" />"; - else if(ereg("trumpless",$GT)) - echo "<img src=\"pics/button/notrumpsolo_button.png\" class=\"button\" alt=\"$GT\" />"; - else if(ereg("trump",$GT)) - echo "<img src=\"pics/button/trumpsolo_button.png\" class=\"button\" alt=\"$GT\" />"; - } - - /* add point calls */ - if($call!=NULL) - { - if($party=="re") - echo "<img src=\"pics/button/re_button.png\" class=\"button\" alt=\"re\" />"; - else - echo "<img src=\"pics/button/contra_button.png\" class=\"button\" alt=\"contra\" />"; - switch($call) - { - case "0": - echo "<img src=\"pics/button/0_button.png\" class=\"button\" alt=\"0\" />"; - break; - case "30": - echo "<img src=\"pics/button/30_button.png\" class=\"button\" alt=\"30\" />"; - break; - case "60": - echo "<img src=\"pics/button/60_button.png\" class=\"button\" alt=\"60\" />"; - break; - case "90": - echo "<img src=\"pics/button/90_button.png\" class=\"button\" alt=\"90\" />"; - break; - } - } - - echo "<br />\n"; - echo " local time: ".date("Y-m-d H:i:s")."<br />\n"; - echo " last login: ".date("Y-m-d H:i:s",$lastlogin)."<br />\n"; - echo " </span>\n"; - - } - echo "</div>\n"; /* get time from the last action of the game */ $result = mysql_query("SELECT mod_date from Game WHERE id='$gameid' " ); @@ -1515,7 +1390,6 @@ else if(myisset("me")) { echo "Hello ".$myname.", it's your turn! <br />\n"; echo "Your cards are: <br />\n"; - echo "<form action=\"index.php?me=$me\" method=\"post\">\n"; /* do we have to follow suite? */ $followsuit = 0; @@ -1529,27 +1403,12 @@ else if(myisset("me")) else display_link_card($card,$PREF["cardset"]); } - - output_form_calls($me); - - echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"30\" maxlength=\"100\" />\n"; - echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n"; - echo "<input type=\"submit\" value=\"submit\" />\n"; - echo "</form>\n"; } else if($mystatus=='play' ) { echo "Your cards are: <br />\n"; foreach($mycards as $card) display_card($card,$PREF["cardset"]); - - echo "<form action=\"index.php?me=$me\" method=\"post\">\n"; - output_form_calls($me); - echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"30\" maxlength=\"100\" />\n"; - echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n"; - echo "<input type=\"submit\" value=\"submit\" />\n"; - echo "</form>\n"; - } else if($mystatus=='gameover') { @@ -1560,11 +1419,9 @@ else if(myisset("me")) if( $gameend < 60*60*24*7 ) { - echo "<form action=\"index.php?me=$me\" method=\"post\">\n"; echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"30\" maxlength=\"100\" />\n"; echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n"; echo "<input type=\"submit\" value=\"submit\" />\n"; - echo "</form>\n"; } $oldcards = DB_get_all_hand($me); @@ -1661,6 +1518,7 @@ else if(myisset("me")) default: myerror("error in testing the status"); } + echo "</form>\n"; output_footer(); DB_close(); exit(); @@ -2,23 +2,6 @@ /* functions which only ouput html */ -function display_links($email,$password) -{ - global $wiki; - echo "<div class=\"bug\">\n". - "Report bugs in the <a href=\"". $wiki."\">wiki</a>.<hr />\n"; - output_link_to_user_page($email,$password); - echo "</div>\n"; - return; -} - -function output_link_to_user_page($email,$password) -{ - echo "<a href=\"index.php\"> go to my user page </a>"; - - return; -} - function output_user_settings($email,$password) { global $PREF; @@ -145,7 +128,7 @@ function display_link_card($card,$dir="english",$type="card") function output_check_for_sickness($me,$mycards) { ?> - <form action="index.php" method="post"> + <div class="sickness"> Thanks for joining the game...<br /> do you want to play solo? <select name="solo" size="1"> @@ -198,7 +181,7 @@ function output_check_for_sickness($me,$mycards) echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n"; echo "<input type=\"submit\" value=\"count me in\" />\n"; - echo "</form>\n"; + echo "</div>\n"; return; } @@ -213,30 +196,30 @@ function output_form_calls($me) " <input type=\"radio\" name=\"call90\" value=\"yes\" /> <br />"; if( can_call(60,$me) ) echo " 60:". - " <input type=\"radio\" name=\"call60\" value=\"yes\" /> "; + " <input type=\"radio\" name=\"call60\" value=\"yes\" /> <br />"; if( can_call(30,$me) ) echo " 30:". - " <input type=\"radio\" name=\"call30\" value=\"yes\" /> "; + " <input type=\"radio\" name=\"call30\" value=\"yes\" /> <br />"; if( can_call(0,$me) ) echo " 0:". - " <input type=\"radio\" name=\"call0\" value=\"yes\" /> ". + " <input type=\"radio\" name=\"call0\" value=\"yes\" /> <br />". " no call:". - " <input type=\"radio\" name=\"call0\" value=\"no\" /> "; + " <input type=\"radio\" name=\"call0\" value=\"no\" /> <br />"; } function output_check_want_to_play($me) { ?> - <form action="index.php" method="post"> - Do you want to play a game of DoKo? + <div class="joingame"> + 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 /> <?php echo "<input type=\"hidden\" name=\"me\" value=\"$me\" />\n"; echo "\n"; - echo "<input type=\"submit\" value=\"count me in\" />\n"; - echo " </form>\n"; + echo "<input type=\"submit\" value=\"submit\" />\n"; + echo " </div>\n"; return; } @@ -338,7 +321,7 @@ function output_header() <div class="header"> <h1> Welcome to E-Doko <sup style="color:#888;">(beta)</sup> </h1> </div> - +<div class="main"> <?php return; } @@ -347,6 +330,7 @@ function output_footer() { global $REV,$PREF; + echo "</div>"; echo "<div class=\"footer\">\n"; echo "<p class=\"left\"> copyright 2006-2007 Arun Persaud <br />\n". "Verwendung der [deutschen] Kartenbilder mit Genehmigung <br />der Spielkartenfabrik Altenburg GmbH,(c) ASS Altenburger <br />". |