diff options
author | Arun Persaud <arun@nubati.net> | 2008-06-08 11:13:14 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-06-15 23:49:56 -0700 |
commit | 11429eb9238bb0ba7a10a783d293d9051b146795 (patch) | |
tree | 651f8f04df487cf30f47c7217f116d5723dc3bac /include | |
parent | 47fc7e1eec3fc99633a9085c9292ddf1ad065efd (diff) | |
download | e-DoKo-11429eb9238bb0ba7a10a783d293d9051b146795.tar.gz e-DoKo-11429eb9238bb0ba7a10a783d293d9051b146795.tar.bz2 e-DoKo-11429eb9238bb0ba7a10a783d293d9051b146795.zip |
BUGFIX: if a call is made the icon will show up right away
check at the beginning if a call was made, so that the information
is up to date when the output for the table is generated.
Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/game.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/game.php b/include/game.php index 8d59103..0350d9e 100644 --- a/include/game.php +++ b/include/game.php @@ -118,6 +118,18 @@ if( $mystatus!='gameover' ) }; output_user_notes($myid,$gameid,$mystatus); +/* handle calls */ +if(myisset("call") && $_REQUEST["call"] == "120" && can_call(120,$me)) + $result = DB_query("UPDATE Hand SET point_call='120' WHERE hash='$me' "); +if(myisset("call") && $_REQUEST["call"] == "90" && can_call(90,$me)) + $result = DB_query("UPDATE Hand SET point_call='90' WHERE hash='$me' "); +if(myisset("call") && $_REQUEST["call"] == "60" && can_call(60,$me)) + $result = DB_query("UPDATE Hand SET point_call='60' WHERE hash='$me' "); +if(myisset("call") && $_REQUEST["call"] == "30" && can_call(30,$me)) + $result = DB_query("UPDATE Hand SET point_call='30' WHERE hash='$me' "); +if(myisset("call") && $_REQUEST["call"] == "0" && can_call(0,$me)) + $result = DB_query("UPDATE Hand SET point_call='0' WHERE hash='$me' "); + /* output extra division in case this game is part of a session */ if($session) { @@ -1190,18 +1202,6 @@ switch($mystatus) /* update Game timestamp */ DB_update_game_timestamp($gameid); - /* check if a call was made, must do this before we set the card status to played */ - if(myisset("call") && $_REQUEST["call"] == "120" && can_call(120,$me)) - $result = DB_query("UPDATE Hand SET point_call='120' WHERE hash='$me' "); - if(myisset("call") && $_REQUEST["call"] == "90" && can_call(90,$me)) - $result = DB_query("UPDATE Hand SET point_call='90' WHERE hash='$me' "); - if(myisset("call") && $_REQUEST["call"] == "60" && can_call(60,$me)) - $result = DB_query("UPDATE Hand SET point_call='60' WHERE hash='$me' "); - if(myisset("call") && $_REQUEST["call"] == "30" && can_call(30,$me)) - $result = DB_query("UPDATE Hand SET point_call='30' WHERE hash='$me' "); - if(myisset("call") && $_REQUEST["call"] == "0" && can_call(0,$me)) - $result = DB_query("UPDATE Hand SET point_call='0' WHERE hash='$me' "); - /* mark card as played */ DB_query("UPDATE Hand_Card SET played='true' WHERE hand_id='$handid' AND card_id=". DB_quote_smart($card)); |