summaryrefslogtreecommitdiffstats
path: root/include/output.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2012-02-04 11:16:42 -0800
committerArun Persaud <apersaud@lbl.gov>2012-02-04 11:16:42 -0800
commit95231cf6650d277fc13f5c0e1c1a0e1bb9c30edb (patch)
tree730b3980d9eaad8a840ab11bac4f0a720ff7e757 /include/output.php
parentaf2046f113109cc6ceaafcbce96377978e12c5a5 (diff)
downloade-DoKo-95231cf6650d277fc13f5c0e1c1a0e1bb9c30edb.tar.gz
e-DoKo-95231cf6650d277fc13f5c0e1c1a0e1bb9c30edb.tar.bz2
e-DoKo-95231cf6650d277fc13f5c0e1c1a0e1bb9c30edb.zip
fixed showing re/contra call at beginning of game; allowed pre-game comments; DB upgrade
the problem with re/contra at the beginning of a game was that no playid was set yet, so we couldn't record when the call was made. Added two special playid (-1 and -2), for pre-game comments and re/contra calls before the first card is played. For this we need to record the gameid in the comment table => DB update
Diffstat (limited to 'include/output.php')
-rw-r--r--include/output.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/output.php b/include/output.php
index 96ab114..781fbb7 100644
--- a/include/output.php
+++ b/include/output.php
@@ -678,6 +678,19 @@ function output_exchanged_cards()
$show=1;
for($mypos=1;$mypos<5;$mypos++)
{
+ /* output comments */
+ if($mypos==2)
+ {
+ /* display all comments on the top right (card1)*/
+ $comments = DB_get_pre_comment($gameid);
+ /* display card */
+ echo " <div class=\"card1\">\n";
+ /* display comments */
+ foreach( $comments as $comment )
+ echo " <span class=\"comment\">".$comment[1].": ".$comment[0]."</span>\n";
+ echo " </div>\n"; /* end div card */
+ }
+
$usersick = DB_get_sickness_by_pos_and_gameid($mypos,$gameid);
if($usersick!=NULL ||
$mypos==$povertypos1 || $mypos==$partnerpos1 ||