diff options
-rw-r--r-- | db.php | 7 | ||||
-rw-r--r-- | index.php | 6 |
2 files changed, 11 insertions, 2 deletions
@@ -446,6 +446,13 @@ function DB_get_all_names() return $names; } +function DB_update_game_timestamp($gameid) +{ + mysql_query("UPDATE Game SET mod_date = CURRENT_TIMESTAMP WHERE id=".DB_quote_smart($gameid)); + return; +} + + function DB_update_user_timestamp($userid) { mysql_query("UPDATE User SET last_login = CURRENT_TIMESTAMP WHERE id=".DB_quote_smart($userid)); @@ -790,9 +790,11 @@ else if(myisset("me")) /* mark card as played */ mysql_query("UPDATE Hand_Card SET played='true' WHERE hand_id='$handid' AND card_id=". DB_quote_smart($card)); - + /* update Game timestamp */ + DB_update_game_timestamp($gameid); + /* check for schweinchen */ - echo "schweinchen = ".$GAME["schweinchen"]." --$card-<br />"; + //echo "schweinchen = ".$GAME["schweinchen"]." --$card-<br />"; if($card == 19 || $card == 20 ) { $GAME["schweinchen"]++; |