diff options
author | arun <arun@nubati.net> | 2007-04-08 19:49:22 +0000 |
---|---|---|
committer | arun <arun> | 2007-04-08 19:49:22 +0000 |
commit | ee59b6b39abc3691431b027785341aa308d1313c (patch) | |
tree | 9f647d208f30202d5a5dfd207590f9af82462965 | |
parent | 60a2eca84c04fa112e9c80b0c285136517ba9d34 (diff) | |
download | e-DoKo-ee59b6b39abc3691431b027785341aa308d1313c.tar.gz e-DoKo-ee59b6b39abc3691431b027785341aa308d1313c.tar.bz2 e-DoKo-ee59b6b39abc3691431b027785341aa308d1313c.zip |
cleaned up the interface a bit
-rw-r--r-- | css/standard.css | 55 | ||||
-rw-r--r-- | index.php | 65 | ||||
-rw-r--r-- | 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 @@ -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 "<p class=\"gamenumber\"> Game $gameid </p>\n"; /* display rule set */ - echo "<div class=\"ruleset\">\n Rules: <br />"; + echo "<div class=\"ruleset\">\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]."<br />"; - echo "schweinchen: ".$r[3]."<br />"; + + /* 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 <br />\n"; + + echo "Rules: <br />\n"; + echo "10ofhearts : ".$r[2]."<br />\n"; + echo "schweinchen: ".$r[3]."<br />\n"; echo "</div>\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 "<div class=\"time\">\n Local times:<table>"; - $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 "<tr> <td>$name</td> <td>".date("Y-m-d H:i:s")."</td></tr>\n"; - }; - echo "</table>\n</div>\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 " <span class=\"table".($pos-1)."\">$name</span>\n"; + $user = $r[2]; + + $offset = DB_get_user_timezone($user); + $zone = return_timezone($offset); + date_default_timezone_set($zone); + + echo " <span class=\"table".($pos-1)."\">\n"; + echo " $name <br />\n"; + echo " local time: ".date("Y-m-d H:i:s")."\n"; + echo " </span>\n"; + } echo "</div>\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<ul class=\"tricks\">\n"; - echo " <li> Hello $myname! History: </li>\n"; + echo " <li> Game $gameid: </li>\n"; while($r = mysql_fetch_array($result,MYSQL_NUM)) { @@ -2,15 +2,6 @@ /* functions which only ouput html */ -function display_status($gametype) -{ - echo "<div class=\"info\">"; - echo " Gametype: $gametype"; - echo "</div>\n"; - - return; -} - function display_news() { global $wiki; |