From ee59b6b39abc3691431b027785341aa308d1313c Mon Sep 17 00:00:00 2001 From: arun Date: Sun, 8 Apr 2007 19:49:22 +0000 Subject: [PATCH 1/1] cleaned up the interface a bit --- css/standard.css | 55 ++++++++++++++++------------------------ index.php | 65 ++++++++++++++++++++++++++---------------------- output.php | 9 ------- 3 files changed, 57 insertions(+), 72 deletions(-) diff --git a/css/standard.css b/css/standard.css index 166642d..f1384ab 100644 --- a/css/standard.css +++ b/css/standard.css @@ -14,12 +14,6 @@ .footer .right{ float:right; } .footer .left{ float:left; } -p.gamenumber { - position:absolute; - top:0; - text-align:center; -} - .card { position:absolute; z-index:20; @@ -47,35 +41,34 @@ div.table img { z-index:9; } div.table span { -/* background-color:green;*/ + /*background-color:green;*/ position:absolute; + width:13em; } div.table span.table0 { - top:10em; - left:-5em; + top:9em; + left:-15em; text-align:right; } div.table span.table1 { - top:-2em; + top:-3.5em; left: 0em; width:20em; text-align:center; } div.table span.table2 { - top:10em; - left:21em; + top:9em; + left:22em; text-align:left; vertical-align:center; } div.table span.table3 { - top:23em; + top:21.5em; left: 0em; width:20em; text-align:center; } - - ul.tricks { position:relative; list-style:none; @@ -83,11 +76,9 @@ ul.tricks { padding:0; /*background-color:yellow;*/ text-align:center; - + border-bottom:1px solid #444; } - ul.tricks a { text-decoration:none; color:#000;} - ul.tricks li { /*background-color:blue;*/ margin:0.2em 0.5em; @@ -197,12 +188,12 @@ ul.tricks li div div span { z-index:11; } ul.tricks li div div.card0 span{ - top:1em; + top:4em; left:-10em; border: 3px solid green; } ul.tricks li div div.card1 span{ - top:0em; + top:-2em; left:1em; border: 3px solid green; } @@ -212,7 +203,7 @@ ul.tricks li div div.card2 span{ border: 3px solid green; } ul.tricks li div div.card3 span{ - top:1em; + top:4em; left:3em; border: 3px solid green; } @@ -220,7 +211,7 @@ ul.tricks li div div.card3 span{ .mycards { clear:both; margin:0; - margin-top:38em; + margin-top:33em; padding:0; border:1px solid red; background-color:yellow; @@ -237,16 +228,13 @@ ul.tricks li div div.card3 span{ padding:0; } -.info { - float:right; - border:2px solid gray; - border-top:0; -} .ruleset { - float:right; + position:absolute; + top:7.5em; border:2px solid gray; - border-top:0; + padding:0.3em; + margin:0; } .time { @@ -256,16 +244,17 @@ ul.tricks li div div.card3 span{ } .over { - float:right; + position:absolute; + top:12.5em; border:2px solid black; - clear:right; + } .bug { - float:left; + position:absolute; + top:14.5em; width:10em; border:2px solid gray; - border-top:0; padding-top:0.5em; clear:left; } \ No newline at end of file diff --git a/index.php b/index.php index 6d43ddb..a4ace5c 100644 --- a/index.php +++ b/index.php @@ -218,19 +218,33 @@ else if(myisset("me")) $mystatus = DB_get_status_by_hash($me); $mypos = DB_get_pos_by_hash($me); - /* display the game number */ - echo "

Game $gameid

\n"; /* display rule set */ - echo "
\n Rules:
"; + echo "
\n"; $result = mysql_query("SELECT * FROM Rulesets LEFT JOIN Game ON Game.ruleset=Rulesets.id WHERE Game.id='$gameid'" ); $r = mysql_fetch_array($result,MYSQL_NUM); $RULES["dullen"]=$r[2]; $RULES["schweinchen"]=$r[3]; - - echo "10ofhearts : ".$r[2]."
"; - echo "schweinchen: ".$r[3]."
"; + + /* get some infos about the game */ + $gametype = DB_get_gametype_by_gameid($gameid); + $gamestatus = DB_get_game_status_by_gameid($gameid); + $GT = $gametype; + if($gametype=="solo") + { + $gametype = DB_get_solo_by_gameid($gameid); + $GT = $gametype." ".$GT; + } + else + $gametype="normal"; + + if($gamestatus != 'pre') + echo " Gametype: $GT
\n"; + + echo "Rules:
\n"; + echo "10ofhearts : ".$r[2]."
\n"; + echo "schweinchen: ".$r[3]."
\n"; echo "
\n"; /* does anyone have both foxes */ @@ -245,7 +259,6 @@ else if(myisset("me")) $GAME["schweinchen-who"]=$hash; } }; - /* mystatus gets the player through the different stages of a game. * start: yes/no @@ -607,24 +620,6 @@ else if(myisset("me")) /* display useful things in divs */ - /* display local time */ - echo "
\n Local times:"; - $users = array(); - $users = DB_get_all_userid_by_gameid($gameid); - foreach($users as $user) - { - $offset = DB_get_user_timezone($user); - $zone = return_timezone($offset); - date_default_timezone_set($zone); - $name = DB_get_name_by_userid($user); - - echo "\n"; - }; - echo "
$name ".date("Y-m-d H:i:s")."
\n
\n"; - - if($gamestatus != 'pre') - display_status($GT); - /* 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); @@ -644,7 +639,8 @@ else if(myisset("me")) /* display the table and the names */ $result = mysql_query("SELECT User.fullname as name,". - " Hand.position as position ". + " Hand.position as position, ". + " User.id ". "FROM Hand ". "LEFT JOIN User ON User.id=Hand.user_id ". "WHERE Hand.game_id='".$gameid."' ". @@ -656,11 +652,20 @@ else if(myisset("me")) { $name = $r[0]; $pos = $r[1]; - - echo " $name\n"; + $user = $r[2]; + + $offset = DB_get_user_timezone($user); + $zone = return_timezone($offset); + date_default_timezone_set($zone); + + echo " \n"; + echo " $name
\n"; + echo " local time: ".date("Y-m-d H:i:s")."\n"; + echo "
\n"; + } echo "
\n"; - + /* get everything relevant to display the tricks */ $result = mysql_query("SELECT Hand_Card.card_id as card,". " Hand.position as position,". @@ -684,7 +689,7 @@ else if(myisset("me")) $firstcard = ""; /* first card in a trick */ echo "\n