X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fgame.php;h=dcc08c36f34dc835379116c7b4cdf63d5f06dce3;hp=0e16292abd5fb4459152e7b507531260ff21d4f6;hb=1aee459a01f55814a095bbb16f7f9b074f4fc667;hpb=09515348107d9aab7823a12d31b082a2ebb75555 diff --git a/include/game.php b/include/game.php index 0e16292..dcc08c3 100644 --- a/include/game.php +++ b/include/game.php @@ -1,13 +1,21 @@ \n"; + output_footer(); + DB_close(); + exit(); + } $me = $_REQUEST["me"]; -/* test for valid ID */ +/* Ok, got a hash, but is it valid? */ $myid = DB_get_userid('hash',$me); if(!$myid) { @@ -17,12 +25,12 @@ if(!$myid) DB_close(); exit(); } - + /* user might get here by clicking on the link in an email, so session might not be set */ if(isset($_SESSION["name"])) output_status($_SESSION["name"]); -/* the user had done something, update the timestamp */ +/* the user has done something, update the timestamp */ DB_update_user_timestamp($myid); /* get some information from the DB */ @@ -33,18 +41,11 @@ $mypos = DB_get_pos_by_hash($me); $myhand = DB_get_handid('hash',$me); $session = DB_get_session_by_gameid($gameid); -/* get prefs and save them */ -DB_get_PREF($myid); +/* get prefs and save them in a variable*/ +$PREF = DB_get_PREF($myid); /* get rule set for this game */ -$result = mysql_query("SELECT * FROM Rulesets". - " LEFT JOIN Game ON Game.ruleset=Rulesets.id ". - " WHERE Game.id='$gameid'" ); -$r = mysql_fetch_array($result,MYSQL_NUM); - -$RULES["dullen"] = $r[2]; -$RULES["schweinchen"] = $r[3]; -$RULES["call"] = $r[4]; +$RULES = DB_get_RULES($gameid); /* get some infos about the game */ $gametype = DB_get_gametype_by_gameid($gameid); @@ -70,7 +71,7 @@ for($i=1;$i<5;$i++) }; /* put everyting in a form */ -echo "
\n"; output_footer(); DB_close(); exit();