some more testing and bugfixes
authorarun <arun@nubati.net>
Sat, 14 Apr 2007 10:34:28 +0000 (10:34 +0000)
committerarun <arun>
Sat, 14 Apr 2007 10:34:28 +0000 (10:34 +0000)
css/standard.css
index.php
output.php

index ca170e028ae4c02476e5aa8391d537ffd76b6473..d6eebc594718537705f3430e5c3e0a9c67ba46f8 100644 (file)
@@ -244,24 +244,17 @@ ul.tricks li div div.card3 span{
 
 
 .ruleset {
-  position:absolute;
-  top:17.5em;
-//  top:7.5em;
+  float:left;
+  margin:0;
+  margin-top:10.5em;
   border:2px solid gray;
   padding:0.3em;
-  margin:0;
 }
 
-.time { 
-  float:left;
-  border:2px solid gray;
-  border-top:0;
-}
 
 .bug {
-  position:absolute;
-  top:24.5em;
-//  top:14.5em;
+  float:left;
+  margin-top:8.5em;
   width:10em;
   border:2px solid gray;
   padding-top:0.5em;
@@ -274,12 +267,12 @@ ul.tricks li div div.card3 span{
 }
 
 .submitbutton { 
- border:0;
- background-color: #efe;
- }
 border:0;
 background-color: #efe;
+}
 
 .submitbutton:hover { 
-background-color:#afa; 
+  background-color:#afa; 
 }
 
 .useroptions{
@@ -294,4 +287,18 @@ background-color:#afa;
     padding:0.1em;
     padding-left:0em;
     text-aling:left;
+}
+
+.cardinput {
+  display:inline;
+  position:relative;
+  border: 1px solid black;
+}
+
+.cardinput img {
+  width: 4em;
+}
+
+.cardinput:hover{
+  background-color:red;
 }
\ No newline at end of file
index a4d774fb9f910bf6c445a769dbea71fc41bad974..8e303ad28b12aafd9b4c6f25688e86e802a97bd9 100644 (file)
--- a/index.php
+++ b/index.php
@@ -309,7 +309,7 @@ else if(myisset("me"))
         */
        if( !myisset("in") )
          {
-           echo "you need to answer the <a href=\"$host?me=$me\">question</a>.";
+           echo "<p> you need to answer the <a href=\"$host?me=$me\">question</a>.</p>";
            DB_set_hand_status_by_hash($me,'start');
          }
        else
@@ -649,17 +649,18 @@ else if(myisset("me"))
                {
                  /* user doesn't want to take trump */
                  /* set next player who needs to be asked */
-                 $firstsick  = DB_get_sickness_by_pos_and_gameid($mypos+1,$gameid);
-                 $secondsick = DB_get_sickness_by_pos_and_gameid($mypos+2,$gameid);
-                 if($firstsick!="poverty")
-                   DB_set_sickness_by_gameid($gameid,$who+$add);
-                 else
+                 $firstsick  = (string) DB_get_sickness_by_pos_and_gameid($mypos+1,$gameid);
+                 $secondsick = (string) DB_get_sickness_by_pos_and_gameid($mypos+2,$gameid);
+                 
+                 if($firstsick=="poverty")
                    {
-                     if($secondsick!="poverty")
-                       DB_set_sickness_by_gameid($gameid,$who+$add*2);
-                     else
+                     if($secondsick=="poverty")
                        DB_set_sickness_by_gameid($gameid,$who+$add*3);
-                   };
+                     else
+                       DB_set_sickness_by_gameid($gameid,$who+$add*2);
+                   }
+                 else
+                   DB_set_sickness_by_gameid($gameid,$who+$add);
 
                  /* this user is done */
                  DB_set_hand_status_by_hash($me,'play');
@@ -702,8 +703,6 @@ else if(myisset("me"))
                  $exchange = $_REQUEST["exchange"];
                  $userhand = DB_get_handid_by_gameid_and_userid($gameid,$trump);
 
-                 echo "you give $exchange to your partner";
-
                  /* if exchange is set to a value>0, exchange that card back to user $trump */
                  if($exchange >0)
                    {
@@ -1218,7 +1217,7 @@ 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";
+         echo "<form  action=\"index.php?me=$me\" method=\"post\">\n";
          
          /* do we have to follow suite? */
          $followsuit = 0;
index 728703048ebdef81bd1f54507fbd72f72a378b76..ed6287b06b394c0056013c76103756c5ac7491ee 100644 (file)
@@ -172,9 +172,9 @@ function display_card($card,$dir="english")
 function display_link_card($card,$dir="english",$type="card")
 {
   if( $card/2 - (int)($card/2) == 0.5)
-    echo "<input type=\"radio\" name=\"".$type."\" value=\"".$card."\" /><img src=\"cards/".$dir."/".$card.".png\" alt=\"\" />\n";
+    echo "<div class=\"cardinput\"><input type=\"radio\" name=\"".$type."\" value=\"".$card."\" /><img src=\"cards/".$dir."/".$card.".png\" alt=\"\" /></div>\n";
   else
-    echo "<input type=\"radio\" name=\"".$type."\" value=\"".$card."\" /><img src=\"cards/".$dir."/".($card-1).".png\" alt=\"\" />\n";
+    echo "<div class=\"cardinput\" ><input type=\"radio\" name=\"".$type."\" value=\"".$card."\" /><img src=\"cards/".$dir."/".($card-1).".png\" alt=\"\" /></div>\n";
   return;
 }