summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-09-13 09:43:25 -0700
committerArun Persaud <arun@nubati.net>2008-09-13 09:51:36 -0700
commitc85a02555f543be61a122001bd430070dc45ba1d (patch)
treec8c03d00a98bb42fc2b5dfccf738776e442af237
parentb0430639c8bb809dc46252ad240bb883a0937527 (diff)
downloade-DoKo-c85a02555f543be61a122001bd430070dc45ba1d.tar.gz
e-DoKo-c85a02555f543be61a122001bd430070dc45ba1d.tar.bz2
e-DoKo-c85a02555f543be61a122001bd430070dc45ba1d.zip
LAYOUT: removed some overlapping areas
the total points and the game points for re/contra now only show up on the "score" trick. This way they don't overlap with graphics when looking at older tricks. Signed-off-by: Arun Persaud <arun@nubati.net>
-rw-r--r--css/standard012.css (renamed from css/standard011.css)50
-rw-r--r--include/game.php75
-rw-r--r--include/output.php2
3 files changed, 64 insertions, 63 deletions
diff --git a/css/standard011.css b/css/standard012.css
index 90abd69..e7fd8a4 100644
--- a/css/standard011.css
+++ b/css/standard012.css
@@ -38,7 +38,7 @@ body { background-color: #ddd; }
top:0;
left:3em;
}
-.lastlogin span {
+.lastlogin span {
font-size:smaller;
}
@@ -83,20 +83,24 @@ body { background-color: #ddd; }
z-index:22
}
-
+.total {
+ top:11em;
+ width: 14%;
+ left: 43%;
+}
/* scoring */
.total .re {
position: absolute;
- left: -4em;
+ left: -12em;
top:8em;
- background-color: #fff;
+ background-color: #eee;
z-index:15;
}
.total .contra {
position: absolute;
- right: -4em;
+ right: -14em;
top:8em;
- background-color: #fff;
+ background-color: #eee;
z-index:15;
}
@@ -397,12 +401,12 @@ ul.tricks li div div span.comment span{
border-bottom:1px solid #000;
text-align:center;
}
-div.session div.sessionrules {
+div.session div.sessionrules {
width:19em;
float:left ;
text-align: left;
}
-div.session div.sessionscore {
+div.session div.sessionscore {
width:19em;
float:right ;
text-align: right;
@@ -555,21 +559,21 @@ div span img.button {
font-size:larger;
}
-caption {
+caption {
text-align: center;
margin: 0.5em;
padding: 0.5em;
padding-bottom: 0em;
margin-bottom: 0;
}
-table.stats { margin: 0.5em 1em;
+table.stats { margin: 0.5em 1em;
border: solid 0.2em #aeaeae;
-moz-border-radius: 0.5em ;
float: left;
}
table.stats tr.odd { background-color:#aeaeae; }
table.stats tr.even { background-color:#eaeaea; }
-table.stats td, table.stats th {
+table.stats td, table.stats th {
margin-left: 0.2em;
margin-right: 0.2em;
padding-left: 0.2em;
@@ -582,43 +586,43 @@ table.stats th { border-bottom: solid 0.2em #000 }
/* the login window */
-.login {
+.login {
text-align:center;
padding-top: 1em;
}
-.login p, {
+.login p, {
padding: 0.1em 0.1em 0.15em;
}
-.login h4 {
+.login h4 {
padding: 0.3em 0.3em 0.45em;
}
-.login form{
- width: 20em;
+.login form{
+ width: 20em;
margin: 0.5em auto;
padding: 0.5em 0.5em 1.5em;
text-align: center;
}
-.login legend, .login label, .login input{
+.login legend, .login label, .login input{
padding: 0.5em 0.5em 0.75em;
}
-.login fieldset {
- border: 2px solid #000;
+.login fieldset {
+ border: 2px solid #000;
padding: 0.5em 0.5em 0.75em;
- background-color: #eee;
+ background-color: #eee;
}
.login .submitbutton {
- background-color: #fff;
+ background-color: #fff;
}
.login .submitbutton:hover {
- background-color: #aaa;
+ background-color: #aaa;
}
-.login tr.center td{
+.login tr.center td{
text-align: center;
}
diff --git a/include/game.php b/include/game.php
index b509de3..4c7710d 100644
--- a/include/game.php
+++ b/include/game.php
@@ -1808,6 +1808,42 @@ switch($mystatus)
" <div class=\"score\">".$r[2]."<br /> ".$r[1]."</div>\n".
" </div>\n";
+ /* display totals */
+ $result = DB_query("SELECT Hand.party, IFNULL(SUM(Card.points),0) FROM Hand".
+ " LEFT JOIN Trick ON Trick.winner=Hand.position AND Trick.game_id=Hand.game_id".
+ " LEFT JOIN User ON User.id=Hand.user_id".
+ " LEFT JOIN Play ON Trick.id=Play.trick_id".
+ " LEFT JOIN Hand_Card ON Hand_Card.id=Play.hand_card_id".
+ " LEFT JOIN Card ON Card.id=Hand_Card.card_id".
+ " WHERE Hand.game_id='$gameid'".
+ " GROUP BY Hand.party" );
+ echo "<div class=\"total\">\n Totals:<br />\n";
+ while( $r = DB_fetch_array($result))
+ echo " ".$r[0]." ".$r[1]."<br />\n";
+
+ $queryresult = DB_query("SELECT timediff(mod_date,create_date) ".
+ " FROM Game WHERE id='$gameid'");
+ $r = DB_fetch_array($queryresult);
+ echo " <p>This game took ".$r[0]." hours.</p>\n";
+
+ echo " <div class=\"re\">\n Points Re: <br />\n";
+ $queryresult = DB_query("SELECT score FROM Score ".
+ " WHERE game_id=$gameid AND party='re'".
+ " ");
+ while($r = DB_fetch_array($queryresult) )
+ echo " ".$r[0]."<br />\n";
+ echo " </div>\n";
+
+ echo " <div class=\"contra\">\n Points Contra: <br />\n";
+ $queryresult = DB_query("SELECT score FROM Score ".
+ " WHERE game_id=$gameid AND party='contra'".
+ " ");
+ while($r = DB_fetch_array($queryresult) )
+ echo " ".$r[0]."<br />\n";
+ echo " </div>\n";
+
+ echo "</div>\n";
+
echo " </div>\n </li>\n"; /* end div trick, end li trick */
}
@@ -1884,45 +1920,6 @@ switch($mystatus)
{
echo "The game is over for you.. other people still need to play though";
}
- else
- {
- $result = DB_query("SELECT Hand.party, IFNULL(SUM(Card.points),0) FROM Hand".
- " LEFT JOIN Trick ON Trick.winner=Hand.position AND Trick.game_id=Hand.game_id".
- " LEFT JOIN User ON User.id=Hand.user_id".
- " LEFT JOIN Play ON Trick.id=Play.trick_id".
- " LEFT JOIN Hand_Card ON Hand_Card.id=Play.hand_card_id".
- " LEFT JOIN Card ON Card.id=Hand_Card.card_id".
- " WHERE Hand.game_id='$gameid'".
- " GROUP BY Hand.party" );
- echo "<div class=\"total\"> Totals:<br />\n";
- while( $r = DB_fetch_array($result))
- echo " ".$r[0]." ".$r[1]."<br />\n";
-
- $queryresult = DB_query("SELECT timediff(mod_date,create_date) ".
- " FROM Game WHERE id='$gameid'");
- $r = DB_fetch_array($queryresult);
- echo "<p>This game took ".$r[0]." hours.</p>";
-
- echo "<div class=\"re\">\n Points Re: <br />\n";
- $queryresult = DB_query("SELECT score FROM Score ".
- " WHERE game_id=$gameid AND party='re'".
- " ");
- while($r = DB_fetch_array($queryresult) )
- echo " ".$r[0]."<br />\n";
- echo "</div>\n";
-
- echo "<div class=\"contra\">\n Points Contra: <br />\n";
- $queryresult = DB_query("SELECT score FROM Score ".
- " WHERE game_id=$gameid AND party='contra'".
- " ");
- while($r = DB_fetch_array($queryresult) )
- echo " ".$r[0]."<br />\n";
- echo "</div>\n";
-
- echo "</div>\n";
-
-
- }
break;
default:
myerror("error in testing the status");
diff --git a/include/output.php b/include/output.php
index db9e2f1..f2fe524 100644
--- a/include/output.php
+++ b/include/output.php
@@ -270,7 +270,7 @@ function output_header()
<title>e-Doko</title>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<link rel="shortcut icon" type="image/x-icon" href="pics/edoko-favicon.png" />
- <link rel="stylesheet" type="text/css" href="css/standard011.css" />
+ <link rel="stylesheet" type="text/css" href="css/standard012.css" />
<script type="text/javascript">
var current=0;
function hl(num) {