summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun <arun@etaner.(none)>2007-10-09 12:50:22 +0200
committerArun <arun@etaner.(none)>2007-10-09 12:50:22 +0200
commitdfbea65d8ae9c21190a9fe5b69ea2ee098dcede7 (patch)
tree39ce4cd2ad74d0aac44350db65e3a921343fbb4a
parentc0e030bb5068085ef52cc8bd0c91f025fb78045e (diff)
downloade-DoKo-dfbea65d8ae9c21190a9fe5b69ea2ee098dcede7.tar.gz
e-DoKo-dfbea65d8ae9c21190a9fe5b69ea2ee098dcede7.tar.bz2
e-DoKo-dfbea65d8ae9c21190a9fe5b69ea2ee098dcede7.zip
LAYOUT: 1st round of changes to get rid of overlapping areas
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.
-rw-r--r--css/standard.css75
-rw-r--r--functions.php4
-rw-r--r--index.php129
3 files changed, 109 insertions, 99 deletions
diff --git a/css/standard.css b/css/standard.css
index 71ae568..7d44f0a 100644
--- a/css/standard.css
+++ b/css/standard.css
@@ -7,8 +7,6 @@
.main {
min-height: 40em;
-// margin-left: 12.5em;
-// margin-right: 12.5em;
}
.footer {
@@ -58,49 +56,55 @@ margin-top:20em;
/* display the table and the names */
div.table {
position:absolute;
+ left:25%;
+ right:25%;
margin:0;
padding:0;
/* border: 5px solid blue;*/
- top: 14em;
- left: 20em;
+ top: 16em;
+ text-align:center;
}
div.table img {
- height:20em;
- width:20em;
+ top:25%;
+ bottom:25%;
+ height:50%;
+ width:50%;
z-index:9;
+ display: block;
+ margin-left: auto;
+ margin-right: auto
}
-div.table span {
+div.table div {
/*background-color:green;*/
position:absolute;
- width:13em;
+ width:25%;
+ height:25%;
}
-div.table span span{
+div.table div img{
/*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;
}
-div.table span.table1 {
- top:-3.5em;
- left: 0em;
- width:20em;
+div.table div.table1 {
+ top:-25%;
+ left:37.5%;
text-align:center;
}
-div.table span.table2 {
- top:9em;
- left:22em;
+div.table div.table2 {
+ top:37.5%;
+ left:75%;
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;
}
@@ -126,13 +130,12 @@ ul.tricks li.nohighlight:hover { background-color: #fff;}
ul.tricks li div.trick {
position:absolute;
+ left:37.5%;
+ right:37.5%;
+ top:9em;
margin:0;
padding:0;
/* border: 5px solid green;*/
- top: 8em;
- left: 20em;
- height:20em;
- width:20em;
z-index:9;
display:none;
}
@@ -297,9 +300,11 @@ ul.tricks li div div span.comment span{
}
.gameinfo, .useroptions {
- float:right;
+ position:absolute;
+ top:10em;
+ right:0em;
margin:1em;
- margin-top:3em;
+ margin-top:0em;
margin-right:0em;
width:12em;
@@ -314,9 +319,11 @@ ul.tricks li div div span.comment span{
}
.usermenu {
- float: left;
+ position:absolute;
+ top:10em;
+ left:0;
margin:1em;
- margin-top:3em;
+ margin-top:0em;
margin-left:0em;
width: 12em;
@@ -330,6 +337,8 @@ ul.tricks li div div span.comment span{
background-color: #eee;
}
+.user { margin-left:25%;margin-right:25%; }
+
.over {
text-align:center;
margin-bottom:0.1em;
diff --git a/functions.php b/functions.php
index 5c98274..73d04f6 100644
--- a/functions.php
+++ b/functions.php
@@ -692,7 +692,7 @@ function display_table ()
$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
@@ -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 " </span>\n";
+ echo " </div>\n";
}
echo "</div>\n"; /* end output table */
diff --git a/index.php b/index.php
index f2fa3d6..7d2d4ab 100644
--- 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";
- /* 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 */
@@ -1595,6 +1532,69 @@ else if(myisset("me"))
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();
@@ -1766,6 +1766,7 @@ else if( myisset("email","password") || isset($_SESSION["name"]) )
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 ";
@@ -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";
- echo "</p>\n";
+ echo "</p>\n</div>";
}
}
else