summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-05-24 14:46:39 -0700
committerArun Persaud <arun@nubati.net>2008-05-24 14:46:39 -0700
commit8141a807cda3a5387e3288e4d644cde94b9ab8fd (patch)
tree1228d536ae75379d65b09b782d6f4150c6bc270c /include
parent95b72fab501b778555252b005ea8618a3305ad4c (diff)
downloade-DoKo-8141a807cda3a5387e3288e4d644cde94b9ab8fd.tar.gz
e-DoKo-8141a807cda3a5387e3288e4d644cde94b9ab8fd.tar.bz2
e-DoKo-8141a807cda3a5387e3288e4d644cde94b9ab8fd.zip
LAYOUT: rearranged the user menu to show up in the top right corner
also limited the amount of games that show up in the user menu if it is your turn Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include')
-rw-r--r--include/functions.php20
-rw-r--r--include/output.php13
2 files changed, 18 insertions, 15 deletions
diff --git a/include/functions.php b/include/functions.php
index 5267bfb..31fc286 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -847,8 +847,7 @@ function display_table ()
function display_user_menu()
{
global $WIKI,$myid,$INDEX;
- echo "<div class=\"usermenu\">\n".
- "<a href=\"".$INDEX."\"> Go to my user page </a>";
+ echo "<div class=\"usermenu\">\n";
$result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
" LEFT JOIN Game On Hand.game_id=Game.id".
@@ -857,21 +856,20 @@ function display_user_menu()
" AND Game.status<>'gameover'".
" ORDER BY Game.session" );
if(DB_num_rows($result))
- echo "<hr />It's your turn in these games:<br />\n";
+ echo "It's your turn in these games:<br />\n";
+ $i=0;
while( $r = DB_fetch_array($result))
{
+ $i++;
echo "<a href=\"".$INDEX."?action=game&me=".$r[0]."\">game ".DB_format_gameid($r[1])." </a><br />\n";
+ if($i>4)
+ {
+ echo "...<br />\n";
+ break;
+ }
}
- echo "<hr /> <a href=\"".$INDEX."?action=new\">Start a new game</a>\n";
-
- echo "<hr /> <a href=\"".$INDEX."?action=prefs\">Change settings</a>\n";
-
- echo "<hr /> <a href=\"".$INDEX."?action=stats\">Statistics</a>\n";
-
- echo
- "<hr />Report bugs in the <a href=\"".$WIKI."\">wiki</a>\n";
echo "</div>\n";
return;
}
diff --git a/include/output.php b/include/output.php
index 33fb87b..62ab264 100644
--- a/include/output.php
+++ b/include/output.php
@@ -291,15 +291,20 @@ function output_footer()
function output_status()
{
- global $defaulttimezone;
+ global $defaulttimezone,$INDEX,$WIKI;
if(isset($_SESSION["name"]))
{
$name = $_SESSION["name"];
/* logout info */
- echo "\n<div class=\"status\">";
- echo $name;
- echo " <a href=\"index.php?action=logout\">logout</a>";
+ echo "\n<div class=\"status\">\n";
+ echo $name,"\n";
+ echo " | <a href=\"".$INDEX."\"> mypage </a>\n";
+ echo " | <a href=\"".$INDEX."?action=prefs\">settings</a>\n";
+ echo " | <a href=\"".$INDEX."?action=new\">new game</a>\n";
+ echo " | <a href=\"".$INDEX."?action=stats\">statistics</a>\n";
+ echo " | <a href=\"".$WIKI."\">wiki</a>\n";
+ echo " |&nbsp;&nbsp;&nbsp; <a href=\"".$INDEX."?action=logout\">logout</a>\n";
echo "</div>\n";
/* last logon time */