summaryrefslogtreecommitdiffstats
path: root/include/functions.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-10-20 19:54:13 -0700
committerArun Persaud <arun@nubati.net>2008-10-20 20:34:17 -0700
commit2666bb58429c385b716d2ffd5d5fe9a9e7af4f45 (patch)
tree8b47bb79a20981ccc123d3e18587dcad4da89ebc /include/functions.php
parente1b3eaa640a1e4249b8406e946bd65e902aadfb9 (diff)
downloade-DoKo-2666bb58429c385b716d2ffd5d5fe9a9e7af4f45.tar.gz
e-DoKo-2666bb58429c385b716d2ffd5d5fe9a9e7af4f45.tar.bz2
e-DoKo-2666bb58429c385b716d2ffd5d5fe9a9e7af4f45.zip
BUGFIX: make user menu and personal notes appear again
had them only shown when player was logged in, but there is really no reason to not show them to players who are not logged in in an ongoing game (only the correct player should get to a page with an ongoing game) Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include/functions.php')
-rw-r--r--include/functions.php15
1 files changed, 5 insertions, 10 deletions
diff --git a/include/functions.php b/include/functions.php
index d09408c..ecb9811 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -857,20 +857,14 @@ function display_table ()
}
-function display_user_menu()
+function display_user_menu($id)
{
global $WIKI,$INDEX;
- /* get the id we are looking for */
- if(isset($_SESSION['id']))
- $myid = $_SESSION['id'];
- else
- return;
-
$result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
" LEFT JOIN Game On Hand.game_id=Game.id".
- " WHERE Hand.user_id='$myid'".
- " AND ( Game.player='$myid' OR ISNULL(Game.player) )".
+ " WHERE Hand.user_id='$id'".
+ " AND ( Game.player='$id' OR ISNULL(Game.player) )".
" AND Game.status<>'gameover'".
" ORDER BY Game.session" );
@@ -884,7 +878,8 @@ function display_user_menu()
}
$i++;
- echo "<a href=\"".$INDEX."?action=game&amp;me=".$r[0]."\">game ".DB_format_gameid($r[1])." </a><br />\n";
+ echo "<a href=\"".$INDEX."?action=game&amp;me=".$r[0].
+ "\">game ".DB_format_gameid($r[1])." </a><br />\n";
if($i>4)
{
echo "...<br />\n";