projects
/
e-DoKo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a0b3efd
)
removed one debug message; added timestamp update for game when playing a card
author
arun
<arun@nubati.net>
Tue, 10 Apr 2007 08:58:23 +0000
(08:58 +0000)
committer
arun
<arun>
Tue, 10 Apr 2007 08:58:23 +0000
(08:58 +0000)
db.php
patch
|
blob
|
history
index.php
patch
|
blob
|
history
diff --git
a/db.php
b/db.php
index 31098d4ea40dd430851e7f2c78ec95b052a876bd..b3651bd4beffc7bf0e99be833f12f2efcee52643 100644
(file)
--- a/
db.php
+++ b/
db.php
@@
-446,6
+446,13
@@
function DB_get_all_names()
return $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));
function DB_update_user_timestamp($userid)
{
mysql_query("UPDATE User SET last_login = CURRENT_TIMESTAMP WHERE id=".DB_quote_smart($userid));
diff --git
a/index.php
b/index.php
index 7addf0ef375a7f371238ffda434f372b3c2fbef9..a0029f091ca82b292c67a5558770aed20af5ddd4 100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-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));
/* 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 */
/* check for schweinchen */
- echo "schweinchen = ".$GAME["schweinchen"]." --$card-<br />";
+
//
echo "schweinchen = ".$GAME["schweinchen"]." --$card-<br />";
if($card == 19 || $card == 20 )
{
$GAME["schweinchen"]++;
if($card == 19 || $card == 20 )
{
$GAME["schweinchen"]++;