From: Arun Persaud Date: Sun, 8 Jun 2008 17:29:20 +0000 (-0700) Subject: BUGIFX: notes are now available during every phase of the game X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=36b10f3b006cfc919fdb657e1f06f41969082f0e BUGIFX: notes are now available during every phase of the game you can now take notes also during the pre-game phase. Signed-off-by: Arun Persaud --- diff --git a/css/standard008.css b/css/standard008.css index efae674..46b738c 100644 --- a/css/standard008.css +++ b/css/standard008.css @@ -440,6 +440,7 @@ table.score { height:10em; overflow: auto; + z-index:50; } .user { margin-left:25%;margin-right:5%; } diff --git a/include/game.php b/include/game.php index 3a01566..8d59103 100644 --- a/include/game.php +++ b/include/game.php @@ -107,7 +107,16 @@ set_gametype('normal'); /* put everyting in a form */ echo "
\n"; -/* output game */ +/* handle user notes (only possible while game is running)*/ +if( $mystatus!='gameover' ) + if(myisset("note")) +{ + $note = $_REQUEST['note']; + + if($note != "") + DB_insert_note($note,$gameid,$myid); +}; +output_user_notes($myid,$gameid,$mystatus); /* output extra division in case this game is part of a session */ if($session) @@ -1027,16 +1036,6 @@ switch($mystatus) DB_insert_comment($comment,$playid,$myid); }; - /* handle notes in case player didn't play a card, allow notes only during a game */ - if( (!myisset("card") && $mystatus=='play') ) - if(myisset("note")) - { - $note = $_REQUEST["note"]; - - if($note != "") - DB_insert_note($note,$gameid,$myid); - }; - /* get everything relevant to display the tricks */ $result = DB_query("SELECT Hand_Card.card_id as card,". " Hand.position as position,". @@ -1726,13 +1725,6 @@ switch($mystatus) echo "
  • next
  • \n"; echo "\n"; /* end ul tricks*/ - echo "
    Personal notes:
    \n"; - $notes = DB_get_notes_by_userid_and_gameid($myid,$gameid); - foreach($notes as $note) - echo "$note
    \n"; - echo "\n"; - echo "
    \n"; - $mycards = DB_get_hand($me); $mycards = mysort($mycards,$gametype); echo "
    \n"; @@ -1903,7 +1895,6 @@ switch($mystatus) } } - output_footer(); DB_close(); exit(); diff --git a/include/output.php b/include/output.php index e57ed04..2f846be 100644 --- a/include/output.php +++ b/include/output.php @@ -428,4 +428,18 @@ function output_password_recovery($email,$password) Personal notes:
    \n"; + $notes = DB_get_notes_by_userid_and_gameid($userid,$gameid); + foreach($notes as $note) + echo "$note
    \n"; + if($userstatus!='gameover') + echo "\n"; + echo "
    \n"; + + return; +} + ?> \ No newline at end of file