LAYOUT: 1st round of changes to get rid of overlapping areas
authorArun <arun@etaner.(none)>
Tue, 9 Oct 2007 10:50:22 +0000 (12:50 +0200)
committerArun <arun@etaner.(none)>
Tue, 9 Oct 2007 10:50:22 +0000 (12:50 +0200)
centered table, moved menus to correct place (this also fixed
a bug that still showed that it was your turn in a game after
you moved) and some other small changes.

css/standard.css
functions.php
index.php

index 71ae5689514453a1dcac598b126d4615d99dcbc5..7d44f0a1549085f0443a49aea211fff518afcf7d 100644 (file)
@@ -7,8 +7,6 @@
 
 .main {
   min-height: 40em;
 
 .main {
   min-height: 40em;
-//  margin-left: 12.5em;
-//  margin-right: 12.5em;
 }
 
 .footer { 
 }
 
 .footer { 
@@ -58,49 +56,55 @@ margin-top:20em;
 /* display the table and the names */
 div.table {
   position:absolute;
 /* display the table and the names */
 div.table {
   position:absolute;
+  left:25%;
+  right:25%;
   margin:0;
   padding:0;
 /*  border: 5px solid blue;*/
   margin:0;
   padding:0;
 /*  border: 5px solid blue;*/
-  top: 14em;
-  left: 20em;
+  top: 16em;
+  text-align:center;
 }
 
 div.table img { 
 }
 
 div.table img { 
-  height:20em;
-  width:20em;
+  top:25%;
+  bottom:25%;
+  height:50%;
+  width:50%;
   z-index:9;
   z-index:9;
+  display: block;
+  margin-left: auto;
+  margin-right: auto
 }
 }
-div.table span {
+div.table div {
   /*background-color:green;*/
   position:absolute;
   /*background-color:green;*/
   position:absolute;
-  width:13em;
+  width:25%;
+  height:25%;
 }
 }
-div.table span span{
+div.table div img{
   /*background-color:green;*/
   /*background-color:green;*/
-  position:relative;
+  width:25%;
+  height:25%;
 }
 
 }
 
-div.table span.table0 {
-  top:9em;
-  left:-15em;
+div.table div.table0 {
+  top:37.5%;
+  left:0%;
   text-align:right;
 }
   text-align:right;
 }
-div.table span.table1 {
-  top:-3.5em;
-  left: 0em;
-  width:20em;
+div.table div.table1 {
+  top:-25%;
+  left:37.5%; 
   text-align:center;
 }
   text-align:center;
 }
-div.table span.table2 {
-  top:9em;
-  left:22em;
+div.table div.table2 {
+  top:37.5%;
+  left:75%;
   text-align:left;
   text-align:left;
-  vertical-align:center;
 }
 }
-div.table span.table3 {
-  top:21.5em;
-  left: 0em;
-  width:20em;
+div.table div.table3 {
+  bottom:-25%;
+  left: 37.5%;
   text-align:center;
 }
 
   text-align:center;
 }
 
@@ -126,13 +130,12 @@ ul.tricks li.nohighlight:hover {  background-color: #fff;}
 
 ul.tricks li div.trick {
   position:absolute;
 
 ul.tricks li div.trick {
   position:absolute;
+  left:37.5%;
+  right:37.5%;
+  top:9em;
   margin:0;
   padding:0;
 /*  border: 5px solid green;*/
   margin:0;
   padding:0;
 /*  border: 5px solid green;*/
-  top: 8em;
-  left: 20em;
-  height:20em;
-  width:20em;
   z-index:9;
   display:none;
 }
   z-index:9;
   display:none;
 }
@@ -297,9 +300,11 @@ ul.tricks li div div span.comment span{
 }
 
 .gameinfo, .useroptions {
 }
 
 .gameinfo, .useroptions {
-  float:right;
+  position:absolute;
+  top:10em;
+  right:0em;
   margin:1em;
   margin:1em;
-  margin-top:3em;
+  margin-top:0em;
   margin-right:0em;
 
   width:12em;
   margin-right:0em;
 
   width:12em;
@@ -314,9 +319,11 @@ ul.tricks li div div span.comment span{
 }
 
 .usermenu {
 }
 
 .usermenu {
-  float: left;
+  position:absolute;
+  top:10em;
+  left:0;
   margin:1em;
   margin:1em;
-  margin-top:3em;
+  margin-top:0em;
   margin-left:0em;
 
   width: 12em;
   margin-left:0em;
 
   width: 12em;
@@ -330,6 +337,8 @@ ul.tricks li div div span.comment span{
   background-color: #eee;
 }
 
   background-color: #eee;
 }
 
+.user { margin-left:25%;margin-right:25%; } 
+
 .over { 
   text-align:center;
   margin-bottom:0.1em;
 .over { 
   text-align:center;
   margin-bottom:0.1em;
index 5c9827481742e43be2ae7fedc5e2911bffff4cd1..73d04f62113cc5df5a4af2a7b713b78ebcb0f18b 100644 (file)
@@ -692,7 +692,7 @@ function display_table ()
       $zone   = return_timezone($offset);
       date_default_timezone_set($zone);
       
       $zone   = return_timezone($offset);
       date_default_timezone_set($zone);
       
-      echo " <span class=\"table".($pos-1)."\">\n";
+      echo " <div class=\"table".($pos-1)."\">\n";
       if(!$debug)
        echo " $name \n";
       else
       if(!$debug)
        echo " $name \n";
       else
@@ -792,7 +792,7 @@ function display_table ()
       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 "<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";
       
     }
   echo  "</div>\n"; /* end output table */
       
     }
   echo  "</div>\n"; /* end output table */
index f2fa3d69d71a616b0d5cff7973b1925943257e72..7d2d4abeb3fbe39c89c1197eb813b028a362e305 100644 (file)
--- a/index.php
+++ b/index.php
@@ -337,69 +337,6 @@ else if(myisset("me"))
     /* put everyting in a form */
     echo "<form action=\"index.php?me=$me\" method=\"post\">\n";
 
     /* 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=\"gameinfo\">\n";
-
-    if($gamestatus != 'pre')
-      echo " Gametype: $GT <br />\n";
-    
-    echo "Rules: <br />\n";
-    echo "10ofhearts : ".$RULES["dullen"]      ."<br />\n";
-    echo "schweinchen: ".$RULES["schweinchen"] ."<br />\n";
-    echo "call:        ".$RULES["call"]        ."<br />\n";
-
-    echo "<hr />\n";
-    if($gamestatus == 'play' )
-      output_form_calls($me);
-
-    /* get time from the last action of the game */
-    $result  = mysql_query("SELECT mod_date from Game WHERE id='$gameid' " );
-    $r       = mysql_fetch_array($result,MYSQL_NUM);
-    $gameend = time() - strtotime($r[0]);
-    
-    if($gamestatus == 'play' || $gameend < 60*60*24*7)
-      {
-       echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"15\" maxlength=\"100\" />\n";
-       echo "<hr />";
-      }
-
-    echo "<input type=\"submit\" value=\"submit\" />\n";
-
-
-    if($mystatus=='gameover' && DB_get_game_status_by_gameid($gameid)=='gameover' )
-      {
-       echo "<hr />\n";
-       
-       $session = DB_get_session_by_gameid($gameid);
-       $result  = mysql_query("SELECT id,create_date FROM Game".
-                              " WHERE session=$session".
-                              " ORDER BY create_date DESC".
-                              " LIMIT 1");
-       $r = -1;
-       if($result)
-         $r = mysql_fetch_array($result,MYSQL_NUM);
-       
-       if(!$session || $gameid==$r[0])
-         {
-           /* suggest a new game with the same people in it, just rotated once (unless last game was solo) */
-           $names = DB_get_all_names_by_gameid($gameid);
-           $type  = DB_get_gametype_by_gameid($gameid);
-           
-           if($type=="solo")
-             output_ask_for_new_game($names[0],$names[1],$names[2],$names[3],$gameid);
-           else
-             output_ask_for_new_game($names[1],$names[2],$names[3],$names[0],$gameid);
-         }
-      }
-
-    echo "</div>\n";
-
     /* output game */
 
     /* output extra division in case this game is part of a session */
     /* output game */
 
     /* output extra division in case this game is part of a session */
@@ -1595,6 +1532,69 @@ else if(myisset("me"))
     default:
       myerror("error in testing the status");
     }
     default:
       myerror("error in testing the status");
     }
+    /* output left menu */
+    display_user_menu();
+
+    /* output right menu */
+
+      /* display rule set for this game */
+    echo "<div class=\"gameinfo\">\n";
+
+    if($gamestatus != 'pre')
+      echo " Gametype: $GT <br />\n";
+    
+    echo "Rules: <br />\n";
+    echo "10ofhearts : ".$RULES["dullen"]      ."<br />\n";
+    echo "schweinchen: ".$RULES["schweinchen"] ."<br />\n";
+    echo "call:        ".$RULES["call"]        ."<br />\n";
+
+    echo "<hr />\n";
+    if($gamestatus == 'play' )
+      output_form_calls($me);
+
+    /* get time from the last action of the game */
+    $result  = mysql_query("SELECT mod_date from Game WHERE id='$gameid' " );
+    $r       = mysql_fetch_array($result,MYSQL_NUM);
+    $gameend = time() - strtotime($r[0]);
+    
+    if($gamestatus == 'play' || $gameend < 60*60*24*7)
+      {
+       echo "<br />\nA short comment:<input name=\"comment\" type=\"text\" size=\"15\" maxlength=\"100\" />\n";
+       echo "<hr />";
+      }
+
+    echo "<input type=\"submit\" value=\"submit\" />\n";
+
+
+    if($mystatus=='gameover' && DB_get_game_status_by_gameid($gameid)=='gameover' )
+      {
+       echo "<hr />\n";
+       
+       $session = DB_get_session_by_gameid($gameid);
+       $result  = mysql_query("SELECT id,create_date FROM Game".
+                              " WHERE session=$session".
+                              " ORDER BY create_date DESC".
+                              " LIMIT 1");
+       $r = -1;
+       if($result)
+         $r = mysql_fetch_array($result,MYSQL_NUM);
+       
+       if(!$session || $gameid==$r[0])
+         {
+           /* suggest a new game with the same people in it, just rotated once (unless last game was solo) */
+           $names = DB_get_all_names_by_gameid($gameid);
+           $type  = DB_get_gametype_by_gameid($gameid);
+           
+           if($type=="solo")
+             output_ask_for_new_game($names[0],$names[1],$names[2],$names[3],$gameid);
+           else
+             output_ask_for_new_game($names[1],$names[2],$names[3],$names[0],$gameid);
+         }
+      }
+
+    echo "</div>\n";
+
+
     echo "</form>\n";
     output_footer();
     DB_close();
     echo "</form>\n";
     output_footer();
     DB_close();
@@ -1766,6 +1766,7 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
             
               display_user_menu();
   
             
               display_user_menu();
   
+              echo "<div class=\"user\">";
               echo "<h4>These are all your games:</h4>\n";
               echo "<p>Session: <br />\n";
               echo "<span class=\"gamestatuspre\"> p </span> =  pre-game phase ";
               echo "<h4>These are all your games:</h4>\n";
               echo "<p>Session: <br />\n";
               echo "<span class=\"gamestatuspre\"> p </span> =  pre-game phase ";
@@ -1832,7 +1833,7 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
               $names = DB_get_all_names();
               echo "<h4>Registered players:</h4>\n<p>\n";
               echo implode(", ",$names)."\n";
               $names = DB_get_all_names();
               echo "<h4>Registered players:</h4>\n<p>\n";
               echo implode(", ",$names)."\n";
-              echo "</p>\n";
+              echo "</p>\n</div>";
             }
         }
        else
             }
         }
        else