summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2011-11-14 20:14:00 -0800
committerArun Persaud <apersaud@lbl.gov>2011-11-14 20:14:00 -0800
commit34dca92fa9209df27921dcc58b9ea5bfb8f131f0 (patch)
tree753729253c7683ff0083c325f9cb915e927acd67 /include
parent21973b9985f6325315721cba1c4e046fbbe3a1f0 (diff)
downloade-DoKo-34dca92fa9209df27921dcc58b9ea5bfb8f131f0.tar.gz
e-DoKo-34dca92fa9209df27921dcc58b9ea5bfb8f131f0.tar.bz2
e-DoKo-34dca92fa9209df27921dcc58b9ea5bfb8f131f0.zip
LAYOUT: moved game status to top; cleaned up some css
Diffstat (limited to 'include')
-rw-r--r--include/functions.php8
-rw-r--r--include/game.php53
-rw-r--r--include/output.php2
3 files changed, 29 insertions, 34 deletions
diff --git a/include/functions.php b/include/functions.php
index 9f36330..fc46a61 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1181,16 +1181,16 @@ function display_user_menu($id)
{
if($i==0)
{
- echo "<div class=\"usermenu\">\n ";
- echo _('It\'s your turn in these games').":<br />\n";
+ echo "\n<div class=\"usermenu\">\n ";
+ echo _('It\'s your turn in these games').":\n";
}
$i++;
echo " <a href=\"".$INDEX."?action=game&amp;me=".$r[0].
- "\">game ".DB_format_gameid($r[1])." </a><br />\n";
+ "\">game ".DB_format_gameid($r[1])." </a>\n";
if($i>4)
{
- echo " ...<br />\n";
+ echo " ...\n";
break;
}
}
diff --git a/include/game.php b/include/game.php
index b8963d2..c78482c 100644
--- a/include/game.php
+++ b/include/game.php
@@ -49,7 +49,6 @@ global $GAME,$RULES,$CARDS;
$gameid = DB_get_gameid_by_hash($me);
$myname = DB_get_name('hash',$me);
$mystatus = DB_get_status_by_hash($me);
-$origmystatus = DB_get_status_by_hash($me); /* to show "it's your turn" menu when game has just finished */
$mypos = DB_get_pos_by_hash($me);
$myhand = DB_get_handid('hash',$me);
$myparty = DB_get_party_by_hash($me);
@@ -175,6 +174,30 @@ if(myisset('call') && $_REQUEST['call'] == '0' && can_call(0,$me))
}
+
+/*****************************************************************
+ * output other games where it is the users turn
+ * make sure that the people looking at old games don't see the wrong games here
+ *****************************************************************/
+
+if( $gamestatus != 'gameover' && isset($_SESSION['id']) )
+ {
+ /* game isn't over, only valid user can get here, so show menu */
+ display_user_menu($myid);
+ }
+else if( $mystatus == 'gameover' && isset($_SESSION['id']) )
+ {
+ /* user is looking at someone else's game, show the menu for the correct user */
+ display_user_menu($_SESSION['id']);
+ }
+else
+ {
+ echo "<div class=\"usermenu\">\n";
+ echo "It's your turn in these games: \n";
+ echo "Please log in to see this information.\n";
+ echo "</div>\n\n";
+ }
+
/*****************************************************************
* output extra division in case this game is part of a session
*****************************************************************/
@@ -307,7 +330,6 @@ if($mystatus!='gameover')
if(isset($_SESSION['id']))
DB_update_user_timestamp($_SESSION['id']);
-
/******************************************************************************
* Output tricks played, table, messages, and cards (depending on game status)
******************************************************************************/
@@ -2111,33 +2133,6 @@ if( sizeof($messages) )
* Comments, re/contra calls, user menu
***********************************************/
-/* output other games where it is the users turn
- * make sure that the people looking at old games don't see the wrong games here
- */
-if( $gamestatus != 'gameover' )
- {
- /* game isn't over, only valid user can get here, so show menu */
- display_user_menu($myid);
- }
-else if( $origmystatus != 'gameover' )
- {
- /* user just played the very last card, game is now over, it's still ok to show the menu though */
- display_user_menu($myid);
- }
-else if( $mystatus == 'gameover'
- && isset($_SESSION['id']) )
- {
- /* user is looking at someone else's game, show the menu for the correct user */
- display_user_menu($_SESSION['id']);
- }
-else
- {
- echo "<div class=\"usermenu\">\n";
- echo "It's your turn in these games:<br />\n";
- echo "Please log in to see this information.\n";
- echo "</div>\n\n";
- }
-
/*
* display gameinfo: re/contra, comment-box, play-card button, games played by others
*/
diff --git a/include/output.php b/include/output.php
index 42f4085..325cf4a 100644
--- a/include/output.php
+++ b/include/output.php
@@ -409,7 +409,7 @@ function output_footer()
" Verwendung der [deutschen] Kartenbilder mit Genehmigung <br />der Spielkartenfabrik Altenburg GmbH,(c) ASS Altenburger <br />\n".
" - ASS Altenburger Spielkarten - Spielkartenfabrik Altenburg GmbH <br />\n".
" a Carta Mundi Company Email: info@spielkarten.com Internet: www.spielkarten.com</p>\n";
- echo " <p class=\"right\"> See the latest changes <a href=\"http://nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=summary\">\n".
+ echo " <p class=\"right\"> See the latest changes <a href=\"http://nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=summary\">\n".
" via git </a> <br />or download the source via <br />\n'git clone http://nubati.net/git/e-DoKo.git' <br />\n".
" <a href=\"http://www.dreamhost.com/green.cgi\">\n".
" <img alt=\"Green Web Hosting! This site hosted by DreamHost.\"".